svn commit: r301820 - stable/10/lib/libc/rpc

Garrett Cooper ngie at FreeBSD.org
Sat Jun 11 01:38:00 UTC 2016


Author: ngie
Date: Sat Jun 11 01:37:59 2016
New Revision: 301820
URL: https://svnweb.freebsd.org/changeset/base/301820

Log:
  MFC r301704:
  
  Test for strchr(3) returning NULL, not 0

Modified:
  stable/10/lib/libc/rpc/getnetpath.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/getnetpath.c
==============================================================================
--- stable/10/lib/libc/rpc/getnetpath.c	Sat Jun 11 01:35:34 2016	(r301819)
+++ stable/10/lib/libc/rpc/getnetpath.c	Sat Jun 11 01:37:59 2016	(r301820)
@@ -264,7 +264,7 @@ int token;		/* char to parse string for 
     *cp++ = '\0';		/* null-terminate token */
     /* get rid of any backslash escapes */
     ep = npp;
-    while ((np = strchr(ep, '\\')) != 0) {
+    while ((np = strchr(ep, '\\')) != NULL) {
 	if (np[1] == '\\')
 	    np++;
 	strcpy(np, (ep = &np[1]));  /* XXX: overlapping string copy */


More information about the svn-src-stable mailing list