summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2004-03-05 08:10:19 +0000
committermarkm <markm@FreeBSD.org>2004-03-05 08:10:19 +0000
commit0b0ae8e16e50fd60ad86f4f14ec05cfc50e7eae5 (patch)
tree524ae0ef30bcdfacb05b3c2b01e1c48e80d93e3b /usr.sbin
parentf5816d0166177c6f98d32562b93f6cf287f9b4f5 (diff)
downloadFreeBSD-src-0b0ae8e16e50fd60ad86f4f14ec05cfc50e7eae5.zip
FreeBSD-src-0b0ae8e16e50fd60ad86f4f14ec05cfc50e7eae5.tar.gz
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 <nul> ('\0') was needed, and a few were just "other". Tested on: i386 sparc64
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bluetooth/hccontrol/send_recv.c2
-rw-r--r--usr.sbin/bsnmpd/bsnmpd/Makefile1
-rw-r--r--usr.sbin/burncd/burncd.c2
-rw-r--r--usr.sbin/mountd/mountd.c2
-rw-r--r--usr.sbin/pstat/pstat.c2
5 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/bluetooth/hccontrol/send_recv.c b/usr.sbin/bluetooth/hccontrol/send_recv.c
index fc9c549..12ea8cc 100644
--- a/usr.sbin/bluetooth/hccontrol/send_recv.c
+++ b/usr.sbin/bluetooth/hccontrol/send_recv.c
@@ -50,7 +50,7 @@ hci_request(int s, int opcode, char const *cp, int cp_size, char *rp, int *rp_si
ng_hci_event_pkt_t *e = (ng_hci_event_pkt_t *) buffer;
assert(rp != NULL);
- assert(*rp_size != NULL);
+ assert(rp_size != NULL);
assert(*rp_size > 0);
c->type = NG_HCI_CMD_PKT;
diff --git a/usr.sbin/bsnmpd/bsnmpd/Makefile b/usr.sbin/bsnmpd/bsnmpd/Makefile
index 86351b0..0f70d8f 100644
--- a/usr.sbin/bsnmpd/bsnmpd/Makefile
+++ b/usr.sbin/bsnmpd/bsnmpd/Makefile
@@ -14,6 +14,7 @@ XSYM= snmpMIB begemotSnmpdModuleTable begemotSnmpd begemotTrapSinkTable \
CLEANFILES= oid.h tree.c tree.h
MAN= bsnmpd.1 snmpmod.3
WARNS?= 6
+NO_WERROR=yes
FILESGROUPS= BMIBS DEFS
diff --git a/usr.sbin/burncd/burncd.c b/usr.sbin/burncd/burncd.c
index 778a6a6..500f070 100644
--- a/usr.sbin/burncd/burncd.c
+++ b/usr.sbin/burncd/burncd.c
@@ -274,7 +274,7 @@ main(int argc, char **argv)
if (*file_buf == '#' || *file_buf == '\n')
continue;
if ((eol = strchr(file_buf, '\n')))
- *eol = NULL;
+ *eol = '\0';
add_track(file_buf, block_size, block_type, nogap);
}
if (feof(fp))
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index 6091dab..a52ee0d 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -283,7 +283,7 @@ main(argc, argv)
in_port_t svcport = 0;
udp6conf = tcp6conf = NULL;
- udp6sock = tcp6sock = NULL;
+ udp6sock = tcp6sock = 0;
/* Check that another mountd isn't already running. */
if ((mountdlockfd = (open(MOUNTDLOCK, O_RDONLY|O_CREAT, 0444))) == -1)
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");
OpenPOWER on IntegriCloud