summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/getnetconfig.c
diff options
context:
space:
mode:
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 dae03b8..ea140d4 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);
OpenPOWER on IntegriCloud