From 16fc3635f7aec3852abfc6dd77f89baef91f22fa Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Fri, 5 Mar 2004 08:10:19 +0000 Subject: Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror) that this provokes. "Wherever possible" means "In the kernel OR NOT C++" (implying C). There are places where (void *) pointers are not valid, such as for function pointers, but in the special case of (void *)0, agreement settles on it being OK. Most of the fixes were NULL where an integer zero was needed; many of the fixes were NULL where ascii ('\0') was needed, and a few were just "other". Tested on: i386 sparc64 --- sbin/kldconfig/kldconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin/kldconfig') diff --git a/sbin/kldconfig/kldconfig.c b/sbin/kldconfig/kldconfig.c index 0f7c72100e18..1f53d7cd0b2b 100644 --- a/sbin/kldconfig/kldconfig.c +++ b/sbin/kldconfig/kldconfig.c @@ -113,14 +113,14 @@ getpath(void) if (miblen == 0) getmib(); - if (sysctl(mib, miblen, NULL, &sz, NULL, NULL) == -1) + if (sysctl(mib, miblen, NULL, &sz, NULL, 0) == -1) 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", (unsigned long)sz+1); } - if (sysctl(mib, miblen, path, &sz, NULL, NULL) == -1) + if (sysctl(mib, miblen, path, &sz, NULL, 0) == -1) err(1, "getting path: sysctl(%s)", pathctl); modpath = path; } -- cgit v1.2.3