svn commit: r297761 - head/bin/sh

Pedro F. Giffuni pfg at FreeBSD.org
Sat Apr 9 20:05:41 UTC 2016


Author: pfg
Date: Sat Apr  9 20:05:39 2016
New Revision: 297761
URL: https://svnweb.freebsd.org/changeset/base/297761

Log:
  sh(1): replace 0 with NULL for pointers.
  
  Found with devel/coccinelle.
  
  Reviewed by:	jilles

Modified:
  head/bin/sh/miscbltin.c
  head/bin/sh/parser.c

Modified: head/bin/sh/miscbltin.c
==============================================================================
--- head/bin/sh/miscbltin.c	Sat Apr  9 19:49:40 2016	(r297760)
+++ head/bin/sh/miscbltin.c	Sat Apr  9 20:05:39 2016	(r297761)
@@ -341,7 +341,7 @@ umaskcmd(int argc __unused, char **argv 
 		} else {
 			void *set;
 			INTOFF;
-			if ((set = setmode (ap)) == 0)
+			if ((set = setmode (ap)) == NULL)
 				error("Illegal number: %s", ap);
 
 			mask = getmode (set, ~mask & 0777);

Modified: head/bin/sh/parser.c
==============================================================================
--- head/bin/sh/parser.c	Sat Apr  9 19:49:40 2016	(r297760)
+++ head/bin/sh/parser.c	Sat Apr  9 20:05:39 2016	(r297761)
@@ -628,7 +628,7 @@ simplecmd(union node **rpp, union node *
 
 	/* If we don't have any redirections already, then we must reset */
 	/* rpp to be the address of the local redir variable.  */
-	if (redir == 0)
+	if (redir == NULL)
 		rpp = &redir;
 
 	args = NULL;


More information about the svn-src-head mailing list