svn commit: r264475 - head/usr.bin/units

Eitan Adler eadler at FreeBSD.org
Mon Apr 14 21:09:48 UTC 2014


Author: eadler
Date: Mon Apr 14 21:09:47 2014
New Revision: 264475
URL: http://svnweb.freebsd.org/changeset/base/264475

Log:
  units(1): don't compare pointers with 0
  
  For better readability, don't compare pointers with 0 or assign 0
  to them. Use NULL instead.
  
  Inspired by:	DragonflyBSD

Modified:
  head/usr.bin/units/units.c

Modified: head/usr.bin/units/units.c
==============================================================================
--- head/usr.bin/units/units.c	Mon Apr 14 21:07:54 2014	(r264474)
+++ head/usr.bin/units/units.c	Mon Apr 14 21:09:47 2014	(r264475)
@@ -245,7 +245,7 @@ addsubunit(char *product[], char *toadd)
 		return 1;
 	}
 	if (!*ptr)
-		*(ptr + 1) = 0;
+		*(ptr + 1) = NULL;
 	*ptr = dupstr(toadd);
 	return 0;
 }


More information about the svn-src-all mailing list