mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
04b09dd665
commit
5916bd20ba
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue