From d030d2d2aee170303ffb5eed3183616ef7ddfbb4 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Thu, 18 Sep 1997 14:08:40 +0000 Subject: Many places in the code NULL is used in integer context, where plain 0 should be used. This happens to work because we #define NULL to 0, but is stylistically wrong and can cause problems for people trying to port bits of code to other environments. PR: 2752 Submitted by: Arne Henrik Juul --- usr.bin/error/touch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/error') diff --git a/usr.bin/error/touch.c b/usr.bin/error/touch.c index a21c72d9acb8..755b3139c8b0 100644 --- a/usr.bin/error/touch.c +++ b/usr.bin/error/touch.c @@ -595,7 +595,7 @@ writetouched(overwrite) botch = 0; oktorm = 1; - while((nread = fread(edbuf, 1, sizeof(edbuf), o_touchedfile)) != NULL){ + while((nread = fread(edbuf, 1, sizeof(edbuf), o_touchedfile)) != 0) { if (nread != fwrite(edbuf, 1, nread, n_touchedfile)){ /* * Catastrophe in temporary area: file system full? @@ -655,7 +655,7 @@ int mustoverwrite(preciousfile, tmpfile) { int nread; - while((nread = fread(edbuf, 1, sizeof(edbuf), tmpfile)) != NULL){ + while((nread = fread(edbuf, 1, sizeof(edbuf), tmpfile)) != 0) { if (mustwrite(edbuf, nread, preciousfile) == 0) return(0); } -- cgit v1.3