Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Compare pointers to NULL, not to zero.



details:   https://anonhg.NetBSD.org/src/rev/43c9190adddf
branches:  trunk
changeset: 994763:43c9190adddf
user:      uwe <uwe%NetBSD.org@localhost>
date:      Tue Nov 20 22:02:31 2018 +0000

description:
Compare pointers to NULL, not to zero.

diffstat:

 lib/libcurses/cchar.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 8b2de0e00fbc -r 43c9190adddf lib/libcurses/cchar.c
--- a/lib/libcurses/cchar.c     Tue Nov 20 21:42:52 2018 +0000
+++ b/lib/libcurses/cchar.c     Tue Nov 20 22:02:31 2018 +0000
@@ -1,4 +1,4 @@
-/*   $NetBSD: cchar.c,v 1.9 2018/11/20 21:42:52 uwe Exp $ */
+/*   $NetBSD: cchar.c,v 1.10 2018/11/20 22:02:31 uwe Exp $ */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation Inc.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: cchar.c,v 1.9 2018/11/20 21:42:52 uwe Exp $");
+__RCSID("$NetBSD: cchar.c,v 1.10 2018/11/20 22:02:31 uwe Exp $");
 #endif                                           /* not lint */
 
 #include <string.h>
@@ -66,8 +66,10 @@
 
        if (wch == NULL)
                return (int)len;
-       if (attrs == 0 || color_pair == 0)
+
+       if (attrs == NULL || color_pair == NULL)
                return ERR;
+
        if (len > 0) {
                *attrs = wcval->attributes;
                if (__using_color)



Home | Main Index | Thread Index | Old Index