From 0b0ae8e16e50fd60ad86f4f14ec05cfc50e7eae5 Mon Sep 17 00:00:00 2001 From: markm 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 --- usr.sbin/pstat/pstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/pstat') diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index 4a8f7a1..d93e76c 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -563,7 +563,7 @@ swapmode_sysctl(void) for (n = 0; ; ++n) { mib[mibsize] = n; size = sizeof xsw; - if (sysctl(mib, mibsize + 1, &xsw, &size, NULL, NULL) == -1) + if (sysctl(mib, mibsize + 1, &xsw, &size, NULL, 0) == -1) break; if (xsw.xsw_version != XSWDEV_VERSION) errx(1, "xswdev version mismatch"); -- cgit v1.1