diff options
author | tjr <tjr@FreeBSD.org> | 2002-06-04 08:45:38 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-06-04 08:45:38 +0000 |
commit | 92fc7ca036bab74b3682ead86f68ccc50a9b74bc (patch) | |
tree | f5c5a8cdcc6efd7a377edafa0ec60c52d0c71e57 /usr.bin/getconf | |
parent | a6a057aabb423d77fe9736daf7a9a7905119768c (diff) | |
download | FreeBSD-src-92fc7ca036bab74b3682ead86f68ccc50a9b74bc.zip FreeBSD-src-92fc7ca036bab74b3682ead86f68ccc50a9b74bc.tar.gz |
confstr() returns (size_t)-1 on failure. Check for this explicitly instead
of trying to see if an unsigned number is less than zero.
Diffstat (limited to 'usr.bin/getconf')
-rw-r--r-- | usr.bin/getconf/getconf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/getconf/getconf.c b/usr.bin/getconf/getconf.c index 87b91b1..721eaa7 100644 --- a/usr.bin/getconf/getconf.c +++ b/usr.bin/getconf/getconf.c @@ -112,7 +112,7 @@ do_confstr(const char *name, int key) size_t len; len = confstr(key, 0, 0); - if (len < 0) + if (len == (size_t)-1) err(EX_OSERR, "confstr: %s", name); if (len == 0) { |