Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib Don't use NULL to compare against an int.



details:   https://anonhg.NetBSD.org/src/rev/a21080a5d0af
branches:  trunk
changeset: 553722:a21080a5d0af
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Tue Oct 21 00:16:55 2003 +0000

description:
Don't use NULL to compare against an int.

diffstat:

 lib/libcompat/4.3/ruserpass.c |  6 +++---
 lib/libcurses/attributes.c    |  8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (62 lines):

diff -r 2895fdae1311 -r a21080a5d0af lib/libcompat/4.3/ruserpass.c
--- a/lib/libcompat/4.3/ruserpass.c     Tue Oct 21 00:15:45 2003 +0000
+++ b/lib/libcompat/4.3/ruserpass.c     Tue Oct 21 00:16:55 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ruserpass.c,v 1.9 2003/08/07 16:44:16 agc Exp $        */
+/*     $NetBSD: ruserpass.c,v 1.10 2003/10/21 00:16:55 fvdl Exp $      */
 
 /*
  * Copyright (c) 1985, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)ruserpass.c        8.4 (Berkeley) 4/27/95";
 #else
-__RCSID("$NetBSD: ruserpass.c,v 1.9 2003/08/07 16:44:16 agc Exp $");
+__RCSID("$NetBSD: ruserpass.c,v 1.10 2003/10/21 00:16:55 fvdl Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -125,7 +125,7 @@
        if ((mydomain = strchr(myname, '.')) == NULL)
                mydomain = "";
 next:
-       while ((t = token()) != NULL) switch(t) {
+       while ((t = token()) != 0) switch(t) {
 
        case DEFAULT:
                usedefault = 1;
diff -r 2895fdae1311 -r a21080a5d0af lib/libcurses/attributes.c
--- a/lib/libcurses/attributes.c        Tue Oct 21 00:15:45 2003 +0000
+++ b/lib/libcurses/attributes.c        Tue Oct 21 00:16:55 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: attributes.c,v 1.12 2003/03/30 07:38:42 jdc Exp $      */
+/*     $NetBSD: attributes.c,v 1.13 2003/10/21 00:20:28 fvdl Exp $     */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: attributes.c,v 1.12 2003/03/30 07:38:42 jdc Exp $");
+__RCSID("$NetBSD: attributes.c,v 1.13 2003/10/21 00:20:28 fvdl Exp $");
 #endif                         /* not lint */
 
 #include "curses.h"
@@ -225,7 +225,7 @@
        if (attr & __UNDERSCORE)
                wunderend(win);
        if ((attr_t) attr & __COLOR) {
-               if (__tc_Co != NULL)
+               if (__tc_Co != 0)
                        win->wattr &= ~__COLOR;
        }
        return OK;
@@ -336,6 +336,6 @@
        /* If another color pair is set, turn that off first. */
        win->wattr &= ~__COLOR;
        /* If can do color video, set the color pair bits. */
-       if (__tc_Co != NULL && attr & __COLOR)
+       if (__tc_Co != 0 && attr & __COLOR)
                win->wattr |= attr & __COLOR;
 }



Home | Main Index | Thread Index | Old Index