aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/rpc/getnetconfig.c
diff options
context:
space:
mode:
authorMark Murray <markm@FreeBSD.org>2004-03-05 08:10:19 +0000
committerMark Murray <markm@FreeBSD.org>2004-03-05 08:10:19 +0000
commit16fc3635f7aec3852abfc6dd77f89baef91f22fa (patch)
tree524ae0ef30bcdfacb05b3c2b01e1c48e80d93e3b /lib/libc/rpc/getnetconfig.c
parent5af2e7de06321c8f6aaa876fa79bf08870e8911c (diff)
downloadsrc-16fc3635f7aec3852abfc6dd77f89baef91f22fa.tar.gz
src-16fc3635f7aec3852abfc6dd77f89baef91f22fa.zip
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
Notes
Notes: svn path=/head/; revision=126643
Diffstat (limited to 'lib/libc/rpc/getnetconfig.c')
-rw-r--r--lib/libc/rpc/getnetconfig.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/rpc/getnetconfig.c b/lib/libc/rpc/getnetconfig.c
index dae03b81f403..ea140d437bf9 100644
--- a/lib/libc/rpc/getnetconfig.c
+++ b/lib/libc/rpc/getnetconfig.c
@@ -684,11 +684,11 @@ struct netconfig *ncp;
*/
*p = *ncp;
p->nc_netid = (char *)strcpy(tmp,ncp->nc_netid);
- tmp = strchr(tmp, NULL) + 1;
+ tmp = strchr(tmp, '\0') + 1;
p->nc_protofmly = (char *)strcpy(tmp,ncp->nc_protofmly);
- tmp = strchr(tmp, NULL) + 1;
+ tmp = strchr(tmp, '\0') + 1;
p->nc_proto = (char *)strcpy(tmp,ncp->nc_proto);
- tmp = strchr(tmp, NULL) + 1;
+ tmp = strchr(tmp, '\0') + 1;
p->nc_device = (char *)strcpy(tmp,ncp->nc_device);
p->nc_lookups = (char **)malloc((size_t)(p->nc_nlookups+1) * sizeof(char *));
if (p->nc_lookups == NULL) {
@@ -696,7 +696,7 @@ struct netconfig *ncp;
return(NULL);
}
for (i=0; i < p->nc_nlookups; i++) {
- tmp = strchr(tmp, NULL) + 1;
+ tmp = strchr(tmp, '\0') + 1;
p->nc_lookups[i] = (char *)strcpy(tmp,ncp->nc_lookups[i]);
}
return(p);