mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-16 15:11:52 +00: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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=79002
@ -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