From 956c78c92b8b396b74e6293db5a52de78f022c8b Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Mon, 14 Apr 2014 21:09:47 +0000 Subject: [PATCH] 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 --- usr.bin/units/units.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/units/units.c b/usr.bin/units/units.c index c2141f6c934..70bd9ec5b63 100644 --- a/usr.bin/units/units.c +++ b/usr.bin/units/units.c @@ -245,7 +245,7 @@ addsubunit(char *product[], char *toadd) return 1; } if (!*ptr) - *(ptr + 1) = 0; + *(ptr + 1) = NULL; *ptr = dupstr(toadd); return 0; }