summaryrefslogtreecommitdiff
path: root/libexec/ftpd/ftpcmd.y
diff options
context:
space:
mode:
authorMike Pechkin <mpech@cvs.openbsd.org>2002-01-23 16:38:13 +0000
committerMike Pechkin <mpech@cvs.openbsd.org>2002-01-23 16:38:13 +0000
commitde34b1c2351429554c6374d0ef1780a9f95991f0 (patch)
tree5434eec90f9674c2643a64538bd6bce8b39f4051 /libexec/ftpd/ftpcmd.y
parentb08cdefea08f476b6a10aa8bd3b7d0066548a847 (diff)
lookup() returns pointer. Convert 0 -> NULL.
millert@ ok
Diffstat (limited to 'libexec/ftpd/ftpcmd.y')
-rw-r--r--libexec/ftpd/ftpcmd.y12
1 files changed, 6 insertions, 6 deletions
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index d51e3314b6f..4de095bc0a5 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpcmd.y,v 1.32 2002/01/23 10:28:50 mpech Exp $ */
+/* $OpenBSD: ftpcmd.y,v 1.33 2002/01/23 16:38:12 mpech Exp $ */
/* $NetBSD: ftpcmd.y,v 1.7 1996/04/08 19:03:11 jtc Exp $ */
/*
@@ -47,7 +47,7 @@
#if 0
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
#else
-static char rcsid[] = "$OpenBSD: ftpcmd.y,v 1.32 2002/01/23 10:28:50 mpech Exp $";
+static char rcsid[] = "$OpenBSD: ftpcmd.y,v 1.33 2002/01/23 16:38:12 mpech Exp $";
#endif
#endif /* not lint */
@@ -1077,7 +1077,7 @@ lookup(p, cmd)
for (; p->name != NULL; p++)
if (strcmp(cmd, p->name) == 0)
return (p);
- return (0);
+ return (NULL);
}
#include <arpa/telnet.h>
@@ -1219,7 +1219,7 @@ yylex()
upper(cbuf);
p = lookup(cmdtab, cbuf);
cbuf[cpos] = c;
- if (p != 0) {
+ if (p != NULL) {
if (p->implemented == 0) {
nack(p->name);
return (LEXERR);
@@ -1243,7 +1243,7 @@ yylex()
upper(cp);
p = lookup(sitetab, cp);
cbuf[cpos] = c;
- if (p != 0) {
+ if (p != NULL) {
if (p->implemented == 0) {
state = CMD;
nack(p->name);
@@ -1470,7 +1470,7 @@ help(ctab, s)
}
upper(s);
c = lookup(ctab, s);
- if (c == (struct tab *)0) {
+ if (c == NULL) {
reply(502, "Unknown command %s.", s);
return;
}