diff options
author | phk <phk@FreeBSD.org> | 1997-09-18 14:08:40 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-09-18 14:08:40 +0000 |
commit | d8ac4091605cafeed429956439b3365036470356 (patch) | |
tree | 86f85152c10afe3de06afc06d7738c614a3210cb /sbin | |
parent | 2d831c7d21d4e39820d9fe862e7ec818476c083b (diff) | |
download | FreeBSD-src-d8ac4091605cafeed429956439b3365036470356.zip FreeBSD-src-d8ac4091605cafeed429956439b3365036470356.tar.gz |
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 <arnej@imf.unit.no>
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dset/dset.c | 2 | ||||
-rw-r--r-- | sbin/i386/ft/ft.c | 2 | ||||
-rw-r--r-- | sbin/restore/dirs.c | 4 | ||||
-rw-r--r-- | sbin/restore/restore.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/sbin/dset/dset.c b/sbin/dset/dset.c index 06d7163..2428289 100644 --- a/sbin/dset/dset.c +++ b/sbin/dset/dset.c @@ -207,7 +207,7 @@ main(ac, av) fatal("kvmread", NULL); dev_found = 0; - while(pos_t!=NULL) { + while(pos_t!=0) { if (kvm_read(kd, pos_t, &buf1, sizeof(struct isa_device)) < 0) fatal("kvmread", NULL); diff --git a/sbin/i386/ft/ft.c b/sbin/i386/ft/ft.c index b1dbbb2..3396eb4 100644 --- a/sbin/i386/ft/ft.c +++ b/sbin/i386/ft/ft.c @@ -53,7 +53,7 @@ QIC_Geom geo; /* tape geometry */ int tvno = 1; /* tape volume number */ int tvlast; /* TRUE if last volume in set */ long tvsize = 0; /* tape volume size in bytes */ -long tvtime = NULL; /* tape change time */ +long tvtime = 0; /* tape change time */ char *tvnote = ""; /* tape note */ int doretension = 0; /* TRUE if we should retension tape */ diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c index f698e93..78a5ff3 100644 --- a/sbin/restore/dirs.c +++ b/sbin/restore/dirs.c @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: dirs.c,v 1.9 1997/06/18 06:28:46 charnier Exp $ */ #ifndef lint @@ -302,7 +302,7 @@ pathsearch(pathname) while (*path == '/') path++; dp = NULL; - while ((name = strsep(&path, "/")) != NULL && *name != NULL) { + while ((name = strsep(&path, "/")) != NULL && *name != '\0') { if ((dp = searchdir(ino, name)) == NULL) return (NULL); ino = dp->d_ino; diff --git a/sbin/restore/restore.c b/sbin/restore/restore.c index 4da97f1..f2d526a 100644 --- a/sbin/restore/restore.c +++ b/sbin/restore/restore.c @@ -817,7 +817,7 @@ checkrestore() ep->e_flags &= ~KEEP; if (ep->e_type == NODE) ep->e_flags &= ~(NEW|EXISTED); - if (ep->e_flags != NULL) + if (ep->e_flags != 0) badentry(ep, "incomplete operations"); } } |