svn commit: r298190 - head/usr.bin/m4

Marcelo Araujo araujo at FreeBSD.org
Mon Apr 18 07:09:35 UTC 2016


Author: araujo
Date: Mon Apr 18 07:09:34 2016
New Revision: 298190
URL: https://svnweb.freebsd.org/changeset/base/298190

Log:
  Use NULL instead of 0 for pointers.
  
  fopen(3) will return NULL in case it cannot open the STREAM.
  
  MFC after:	2 weeks.

Modified:
  head/usr.bin/m4/gnum4.c

Modified: head/usr.bin/m4/gnum4.c
==============================================================================
--- head/usr.bin/m4/gnum4.c	Mon Apr 18 07:05:18 2016	(r298189)
+++ head/usr.bin/m4/gnum4.c	Mon Apr 18 07:09:34 2016	(r298190)
@@ -129,7 +129,7 @@ dopath(struct input_file *i, const char 
 
 	for (pe = first; pe; pe = pe->next) {
 		snprintf(path, sizeof(path), "%s/%s", pe->name, filename);
-		if ((f = fopen(path, "r")) != 0) {
+		if ((f = fopen(path, "r")) != NULL) {
 			set_input(i, f, path);
 			return i;
 		}


More information about the svn-src-head mailing list