confstr() returns (size_t)-1 on failure. Check for this explicitly instead

of trying to see if an unsigned number is less than zero.
This commit is contained in:
tjr 2002-06-04 08:45:38 +00:00
parent a6a057aabb
commit 92fc7ca036

View File

@ -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) {