summaryrefslogtreecommitdiff
path: root/lib/libcurses
diff options
context:
space:
mode:
authoruwe <uwe@NetBSD.org>2018-11-20 22:02:31 +0000
committeruwe <uwe@NetBSD.org>2018-11-20 22:02:31 +0000
commit7f91bcc29c815ca29537155cd73bcd085d4a3d2a (patch)
treec2d446cdb91f64a214ce56e7d01bece38f186fe6 /lib/libcurses
parent631e1cf6c7bdbc383d786330a9a8ab305d904592 (diff)
Compare pointers to NULL, not to zero.
Diffstat (limited to 'lib/libcurses')
-rw-r--r--lib/libcurses/cchar.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libcurses/cchar.c b/lib/libcurses/cchar.c
index 3b456eaa8d4..391fd1da46c 100644
--- a/lib/libcurses/cchar.c
+++ b/lib/libcurses/cchar.c
@@ -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 @@ getcchar(const cchar_t *wcval, wchar_t *wch, attr_t *attrs,
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)