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:
parent
a6a057aabb
commit
92fc7ca036
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user