From f6d87734a673ac761aa6c1d0b9d60c7f193713ea Mon Sep 17 00:00:00 2001 From: pk Date: Sat, 17 May 1997 19:40:47 +0000 Subject: [PATCH] NULL => 0 (Arne Juul; PR#3629) --- usr.bin/error/touch.c | 8 ++++---- usr.bin/finger/finger.c | 6 +++--- usr.bin/finger/net.c | 6 +++--- usr.bin/finger/util.c | 6 +++--- usr.bin/ftp/cmds.c | 12 ++++++------ 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/usr.bin/error/touch.c b/usr.bin/error/touch.c index b70218b10c33..d0ea5554efac 100644 --- a/usr.bin/error/touch.c +++ b/usr.bin/error/touch.c @@ -1,4 +1,4 @@ -/* $NetBSD: touch.c,v 1.4 1997/03/22 03:42:57 lukem Exp $ */ +/* $NetBSD: touch.c,v 1.5 1997/05/17 19:40:47 pk Exp $ */ /* * Copyright (c) 1980, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$NetBSD: touch.c,v 1.4 1997/03/22 03:42:57 lukem Exp $"; +static char rcsid[] = "$NetBSD: touch.c,v 1.5 1997/05/17 19:40:47 pk Exp $"; #endif /* not lint */ #include @@ -599,7 +599,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? @@ -659,7 +659,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); } diff --git a/usr.bin/finger/finger.c b/usr.bin/finger/finger.c index e55d1496dd1f..fa8e80503f3f 100644 --- a/usr.bin/finger/finger.c +++ b/usr.bin/finger/finger.c @@ -1,4 +1,4 @@ -/* $NetBSD: finger.c,v 1.6 1997/01/09 20:19:20 tls Exp $ */ +/* $NetBSD: finger.c,v 1.7 1997/05/17 19:42:24 pk Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -54,7 +54,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)finger.c 5.22 (Berkeley) 6/29/90";*/ -static char rcsid[] = "$NetBSD: finger.c,v 1.6 1997/01/09 20:19:20 tls Exp $"; +static char rcsid[] = "$NetBSD: finger.c,v 1.7 1997/05/17 19:42:24 pk Exp $"; #endif /* not lint */ /* @@ -167,7 +167,7 @@ loginlist() (void)fprintf(stderr, "finger: can't read %s.\n", _PATH_UTMP); exit(2); } - name[UT_NAMESIZE] = NULL; + name[UT_NAMESIZE] = '\0'; while (fread((char *)&user, sizeof(user), 1, stdin) == 1) { if (!user.ut_name[0]) continue; diff --git a/usr.bin/finger/net.c b/usr.bin/finger/net.c index 465a87369772..30ba2f30d1d3 100644 --- a/usr.bin/finger/net.c +++ b/usr.bin/finger/net.c @@ -1,4 +1,4 @@ -/* $NetBSD: net.c,v 1.8 1997/01/09 20:19:23 tls Exp $ */ +/* $NetBSD: net.c,v 1.9 1997/05/17 19:42:25 pk Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)net.c 5.5 (Berkeley) 6/1/90";*/ -static char rcsid[] = "$NetBSD: net.c,v 1.8 1997/01/09 20:19:23 tls Exp $"; +static char rcsid[] = "$NetBSD: net.c,v 1.9 1997/05/17 19:42:25 pk Exp $"; #endif /* not lint */ #include @@ -68,7 +68,7 @@ netfinger(name) lastc = 0; if (!(host = strrchr(name, '@'))) return; - *host++ = NULL; + *host++ = '\0'; if (inet_aton(host, &sin.sin_addr) == 0) { hp = gethostbyname(host); if (hp == 0) { diff --git a/usr.bin/finger/util.c b/usr.bin/finger/util.c index 67e7dd1bd535..ac5fb2b01257 100644 --- a/usr.bin/finger/util.c +++ b/usr.bin/finger/util.c @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.9 1997/01/09 20:19:25 tls Exp $ */ +/* $NetBSD: util.c,v 1.10 1997/05/17 19:42:27 pk Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -39,7 +39,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)util.c 5.14 (Berkeley) 1/17/91";*/ -static char rcsid[] = "$NetBSD: util.c,v 1.9 1997/01/09 20:19:25 tls Exp $"; +static char rcsid[] = "$NetBSD: util.c,v 1.10 1997/05/17 19:42:27 pk Exp $"; #endif /* not lint */ #include @@ -193,7 +193,7 @@ enter_lastlog(pn) (long)pn->uid * sizeof(ll) || read(fd, (char *)&ll, sizeof(ll)) != sizeof(ll)) { /* as if never logged in */ - ll.ll_line[0] = ll.ll_host[0] = NULL; + ll.ll_line[0] = ll.ll_host[0] = '\0'; ll.ll_time = 0; } if ((w = pn->whead) == NULL) diff --git a/usr.bin/ftp/cmds.c b/usr.bin/ftp/cmds.c index 368c1bca3579..f63d180d64ce 100644 --- a/usr.bin/ftp/cmds.c +++ b/usr.bin/ftp/cmds.c @@ -1,4 +1,4 @@ -/* $NetBSD: cmds.c,v 1.23 1997/04/14 09:09:15 lukem Exp $ */ +/* $NetBSD: cmds.c,v 1.24 1997/05/17 19:44:36 pk Exp $ */ /* * Copyright (c) 1985, 1989, 1993, 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94"; #else -static char rcsid[] = "$NetBSD: cmds.c,v 1.23 1997/04/14 09:09:15 lukem Exp $"; +static char rcsid[] = "$NetBSD: cmds.c,v 1.24 1997/05/17 19:44:36 pk Exp $"; #endif #endif /* not lint */ @@ -339,7 +339,7 @@ mput(argc, argv) if (!*tp) { tp = cp; tp2 = tmpbuf; - while ((*tp2 = *tp) != NULL) { + while ((*tp2 = *tp) != '\0') { if (isupper(*tp2)) { *tp2 = 'a' + *tp2 - 'A'; } @@ -482,7 +482,7 @@ usage: if (!*tp) { tp = argv[2]; tp2 = tmpbuf; - while ((*tp2 = *tp) != NULL) { + while ((*tp2 = *tp) != '\0') { if (isupper(*tp2)) { *tp2 = 'a' + *tp2 - 'A'; } @@ -582,7 +582,7 @@ mget(argc, argv) if (mflag && confirm(argv[0], cp)) { tp = cp; if (mcase) { - for (tp2 = tmpbuf; (ch = *tp++) != NULL; ) + for (tp2 = tmpbuf; (ch = *tp++) != 0; ) *tp2++ = isupper(ch) ? tolower(ch) : ch; *tp2 = '\0'; tp = tmpbuf; @@ -1869,7 +1869,7 @@ setpassive(argc, argv) char *argv[]; { - code = togglevar(argc, argv, &passivemode, + code = togglevar(argc, argv, &passivemode, verbose ? "Passive mode" : NULL); }