Don't use NULL where you really mean 0 to sysctlbyname.
This commit is contained in:
parent
842f45255d
commit
9a400152f8
@ -213,7 +213,7 @@ list(const int fd)
|
||||
err(1, "sysctlbyname: kern.disks");
|
||||
if ( (disklist = malloc(dll)) == NULL)
|
||||
err(1, "malloc");
|
||||
if (sysctlbyname("kern.disks", disklist, &dll, NULL, NULL) == -1)
|
||||
if (sysctlbyname("kern.disks", disklist, &dll, NULL, 0) == -1)
|
||||
err(1, "sysctlbyname: kern.disks");
|
||||
|
||||
for (p = disklist;
|
||||
|
Loading…
Reference in New Issue
Block a user