Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jun 2016 01:37:59 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r301820 - stable/10/lib/libc/rpc
Message-ID:  <201606110137.u5B1bxYx089319@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606110137.u5B1bxYx089319>