Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/rpc The second parameter of strchr() is an integer, ...



details:   https://anonhg.NetBSD.org/src/rev/8d47d3c43253
branches:  trunk
changeset: 546461:8d47d3c43253
user:      scw <scw%NetBSD.org@localhost>
date:      Tue Apr 29 14:56:05 2003 +0000

description:
The second parameter of strchr() is an integer, not a pointer.
So use '\0' instead of NULL.

diffstat:

 lib/libc/rpc/getnetconfig.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r f9f3dd9cdfec -r 8d47d3c43253 lib/libc/rpc/getnetconfig.c
--- a/lib/libc/rpc/getnetconfig.c       Tue Apr 29 14:53:12 2003 +0000
+++ b/lib/libc/rpc/getnetconfig.c       Tue Apr 29 14:56:05 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getnetconfig.c,v 1.10 2003/01/18 11:29:04 thorpej Exp $        */
+/*     $NetBSD: getnetconfig.c,v 1.11 2003/04/29 14:56:05 scw Exp $    */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -674,11 +674,11 @@
         */
        *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 *));
@@ -687,7 +687,7 @@
                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);



Home | Main Index | Thread Index | Old Index