summaryrefslogtreecommitdiff
path: root/usr.sbin/ypldap
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2011-04-06 11:36:27 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2011-04-06 11:36:27 +0000
commite2ddf551fe54f5fd63dbb0131d6835d07f172753 (patch)
treeee263115c37260360e628dc4fc5e029d18e30311 /usr.sbin/ypldap
parentecdee9dbaa69f9aa6f959777e5e515c31bb6a0f8 (diff)
Avoid using NULL in non-pointer contexts: use 0 for integer values and '\0'
for chars.
Diffstat (limited to 'usr.sbin/ypldap')
-rw-r--r--usr.sbin/ypldap/aldap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ypldap/aldap.c b/usr.sbin/ypldap/aldap.c
index 266b038f29d..75b2d9d831b 100644
--- a/usr.sbin/ypldap/aldap.c
+++ b/usr.sbin/ypldap/aldap.c
@@ -1,5 +1,5 @@
-/* $Id: aldap.c,v 1.26 2010/07/21 17:32:12 martinh Exp $ */
-/* $OpenBSD: aldap.c,v 1.26 2010/07/21 17:32:12 martinh Exp $ */
+/* $Id: aldap.c,v 1.27 2011/04/06 11:36:26 miod Exp $ */
+/* $OpenBSD: aldap.c,v 1.27 2011/04/06 11:36:26 miod Exp $ */
/*
* Copyright (c) 2008 Alexander Schrijver <aschrijver@openbsd.org>
@@ -1063,7 +1063,7 @@ utoa(char *u)
char *str;
/* calculate the length to allocate */
- for (len = 0, i = 0; u[i] != NULL; ) {
+ for (len = 0, i = 0; u[i] != '\0'; ) {
if ((u[i] & 0xF0) == 0xF0)
i += 4;
else if ((u[i] & 0xE0) == 0xE0)
@@ -1079,7 +1079,7 @@ utoa(char *u)
return NULL;
/* copy the ASCII characters to the newly allocated string */
- for (i = 0, j = 0; u[i] != NULL; j++) {
+ for (i = 0, j = 0; u[i] != '\0'; j++) {
if ((u[i] & 0xF0) == 0xF0) {
str[j] = '?';
i += 4;