diff options
author | Brian Somers <brian@FreeBSD.org> | 2001-08-20 15:09:34 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 2001-08-20 15:09:34 +0000 |
commit | 2313781df23654556cd7d08ca63c3fc184ef1b63 (patch) | |
tree | e4cd080245144f4b39a65872690adec1ed0c8bda /usr.sbin/pkg_install/create | |
parent | f0183cc46aa18095dea6ce4d9b52acd69836baca (diff) | |
download | src-2313781df23654556cd7d08ca63c3fc184ef1b63.tar.gz src-2313781df23654556cd7d08ca63c3fc184ef1b63.zip |
Handle snprintf() returning < 0 (not just -1)
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=81982
Diffstat (limited to 'usr.sbin/pkg_install/create')
-rw-r--r-- | usr.sbin/pkg_install/create/pl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/create/pl.c b/usr.sbin/pkg_install/create/pl.c index a0a34e00a8c6..02bb87b6a8ab 100644 --- a/usr.sbin/pkg_install/create/pl.c +++ b/usr.sbin/pkg_install/create/pl.c @@ -190,7 +190,7 @@ copy_plist(char *home, Package *plist) p->name); last_chdir = home; } - if (add_count == -1 || add_count > maxargs - where_count) { + if (add_count < 0 || add_count > maxargs - where_count) { cleanup(0); errx(2, __FUNCTION__ ": oops, miscounted strings!"); } @@ -228,7 +228,7 @@ copy_plist(char *home, Package *plist) " -C %s %s", mythere ? mythere : where, p->name); - if (add_count == -1 || add_count > maxargs - where_count) { + if (add_count < 0 || add_count > maxargs - where_count) { cleanup(0); errx(2, __FUNCTION__ ": oops, miscounted strings!"); } |