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 /libexec | |
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 'libexec')
-rw-r--r-- | libexec/ftpd/ftpcmd.y | 4 | ||||
-rw-r--r-- | libexec/lfs_cleanerd/library.c | 6 | ||||
-rw-r--r-- | libexec/revnetgroup/revnetgroup.c | 6 | ||||
-rw-r--r-- | libexec/rtld-aout/rtld.c | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y index 659081b..1e9f1cd 100644 --- a/libexec/ftpd/ftpcmd.y +++ b/libexec/ftpd/ftpcmd.y @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ftpcmd.y 8.3 (Berkeley) 4/6/94 - * $Id: ftpcmd.y,v 1.10 1997/02/22 14:21:27 peter Exp $ + * $Id: ftpcmd.y,v 1.11 1997/07/24 09:26:10 davidn Exp $ */ /* @@ -957,7 +957,7 @@ yylex() } (void) alarm(0); #ifdef SETPROCTITLE - if (strncasecmp(cbuf, "PASS", 4) != NULL) + if (strncasecmp(cbuf, "PASS", 4) != 0) setproctitle("%s: %s", proctitle, cbuf); #endif /* SETPROCTITLE */ if ((cp = strchr(cbuf, '\r'))) { diff --git a/libexec/lfs_cleanerd/library.c b/libexec/lfs_cleanerd/library.c index b72aad8..1a83076 100644 --- a/libexec/lfs_cleanerd/library.c +++ b/libexec/lfs_cleanerd/library.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: library.c,v 1.7 1997/02/22 14:21:45 peter Exp $ */ #ifndef lint @@ -544,7 +544,7 @@ mmap_segment (fsp, segment, segbuf, use_mmap) MAP_SHARED, fid, seg_byte); if (*segbuf == MAP_FAILED) { err(0, "mmap_segment: mmap failed"); - return (NULL); + return (0); } } else { #ifdef VERBOSE @@ -555,7 +555,7 @@ mmap_segment (fsp, segment, segbuf, use_mmap) *segbuf = malloc(ssize); if (!*segbuf) { err(0, "mmap_segment: malloc failed"); - return(NULL); + return(0); } /* read the segment data into the buffer */ diff --git a/libexec/revnetgroup/revnetgroup.c b/libexec/revnetgroup/revnetgroup.c index 7655480..f098167 100644 --- a/libexec/revnetgroup/revnetgroup.c +++ b/libexec/revnetgroup/revnetgroup.c @@ -35,7 +35,7 @@ * Center for Telecommunications Research * Columbia University, New York City * - * $Id: revnetgroup.c,v 1.6 1997/02/22 14:22:03 peter Exp $ + * $Id: revnetgroup.c,v 1.7 1997/03/28 15:48:15 imp Exp $ */ #include <stdio.h> @@ -46,7 +46,7 @@ #include "hash.h" #ifndef lint -static const char rcsid[] = "$Id: revnetgroup.c,v 1.6 1997/02/22 14:22:03 peter Exp $"; +static const char rcsid[] = "$Id: revnetgroup.c,v 1.7 1997/03/28 15:48:15 imp Exp $"; #endif /* Default location of netgroup file. */ @@ -150,7 +150,7 @@ main(argc, argv) gcur = gtable[i]; while(gcur) { __setnetgrent(gcur->key); - while(__getnetgrent(&host, &user, &domain) != NULL) { + while(__getnetgrent(&host, &user, &domain) != 0) { if (hosts ? host && strcmp(host,"-") : user && strcmp(user, "-")) mstore(mtable, hosts ? host : user, gcur->key, domain); } diff --git a/libexec/rtld-aout/rtld.c b/libexec/rtld-aout/rtld.c index 452e6ff..e3debe5 100644 --- a/libexec/rtld-aout/rtld.c +++ b/libexec/rtld-aout/rtld.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: rtld.c,v 1.47 1997/08/02 04:56:44 jdp Exp $ + * $Id: rtld.c,v 1.48 1997/08/19 23:33:45 nate Exp $ */ #include <sys/param.h> @@ -2117,7 +2117,7 @@ struct env_scan_tab { L("LD_BIND_NOW=", 0, &ld_bind_now) L("LD_SUPPRESS_WARNINGS=", 0, &ld_suppress_warnings) L("LD_WARN_NON_PURE_CODE=", 0, &ld_warn_non_pure_code) - { NULL, 0, NULL } + { NULL, 0, 0, NULL } }; #undef L |