summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2011-04-06 11:36:23 +0000
committermiod <miod@openbsd.org>2011-04-06 11:36:23 +0000
commit691235adb977a6a7730c100aa9b733644d50c443 (patch)
tree55fba51a8d239644006a1329a3fb5146e9974cc9 /lib
parentLocal variables storing integer values and printed with %d should be (diff)
downloadwireguard-openbsd-691235adb977a6a7730c100aa9b733644d50c443.tar.xz
wireguard-openbsd-691235adb977a6a7730c100aa9b733644d50c443.zip
Avoid using NULL in non-pointer contexts: use 0 for integer values and '\0'
for chars.
Diffstat (limited to 'lib')
-rw-r--r--lib/libkeynote/keynote-ver.l4
-rw-r--r--lib/libkeynote/keynote.l4
-rw-r--r--lib/libusbhid/usage.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/libkeynote/keynote-ver.l b/lib/libkeynote/keynote-ver.l
index d352cc37441..4813f0ecbaf 100644
--- a/lib/libkeynote/keynote-ver.l
+++ b/lib/libkeynote/keynote-ver.l
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: keynote-ver.l,v 1.14 2004/06/29 11:35:56 msf Exp $ */
+/* $OpenBSD: keynote-ver.l,v 1.15 2011/04/06 11:36:23 miod Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
*
@@ -252,7 +252,7 @@ read_environment(char *filename)
if (0)
{
yyunput(0, NULL);
- yy_flex_realloc(0, NULL);
+ yy_flex_realloc(0, 0);
}
}
diff --git a/lib/libkeynote/keynote.l b/lib/libkeynote/keynote.l
index 46e3291421f..d42aa2db270 100644
--- a/lib/libkeynote/keynote.l
+++ b/lib/libkeynote/keynote.l
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: keynote.l,v 1.18 2009/12/11 17:25:43 deraadt Exp $ */
+/* $OpenBSD: keynote.l,v 1.19 2011/04/06 11:36:23 miod Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
*
@@ -749,7 +749,7 @@ keynote_get_envlist(char *buf, char *bufend, int whichfield)
if (0)
{
yyunput(0, NULL);
- yy_flex_realloc(0, NULL);
+ yy_flex_realloc(0, 0);
}
return en;
diff --git a/lib/libusbhid/usage.c b/lib/libusbhid/usage.c
index 228dbb74c47..12f157d6eab 100644
--- a/lib/libusbhid/usage.c
+++ b/lib/libusbhid/usage.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usage.c,v 1.13 2007/09/03 14:26:54 deraadt Exp $ */
+/* $OpenBSD: usage.c,v 1.14 2011/04/06 11:36:25 miod Exp $ */
/* $NetBSD: usage.c,v 1.1 2001/12/28 17:45:27 augustss Exp $ */
/*
@@ -252,7 +252,7 @@ hid_parse_usage_page(const char *name)
int k;
if (!pages)
- return NULL;
+ return 0;
for (k = 0; k < npages; k++)
if (strcmp(pages[k].name, name) == 0)