Properly cast a size argument to an unsigned type.
Thanks to: dd for noticing the need for a cast.
This commit is contained in:
parent
2fcbdd664c
commit
21f14c9feb
@ -119,7 +119,8 @@ getpath(void)
|
||||
err(1, "getting path: sysctl(%s) - size only", pathctl);
|
||||
if ((path = malloc(sz + 1)) == NULL) {
|
||||
errno = ENOMEM;
|
||||
err(1, "allocating %lu bytes for the path", (long)sz+1);
|
||||
err(1, "allocating %lu bytes for the path",
|
||||
(unsigned long)sz+1);
|
||||
}
|
||||
if (sysctl(mib, miblen, path, &sz, NULL, NULL) == -1)
|
||||
err(1, "getting path: sysctl(%s)", pathctl);
|
||||
|
Loading…
Reference in New Issue
Block a user