summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2007-01-25 16:40:44 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2007-01-25 16:40:44 +0000
commit2e8224764e748dfe9686232eba0c1236daa442f9 (patch)
tree6e0a3d192fd1e96dad85cf3d230c055f6c27e287 /usr.sbin
parent100223db3c4f124c158b08f7ee4ed2366273bf57 (diff)
No need to check if word is NULL before calling parse_addr/prefix.
The functions do that check already.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ospfctl/parser.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/ospfctl/parser.c b/usr.sbin/ospfctl/parser.c
index dd243a331e7..a260110fe73 100644
--- a/usr.sbin/ospfctl/parser.c
+++ b/usr.sbin/ospfctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.12 2007/01/25 16:27:00 claudio Exp $ */
+/* $OpenBSD: parser.c,v 1.13 2007/01/25 16:40:43 claudio Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -197,7 +197,7 @@ match_token(const char *word, const struct token table[])
}
break;
case ADDRESS:
- if (word != NULL && parse_addr(word, &res.addr)) {
+ if (parse_addr(word, &res.addr)) {
match++;
t = &table[i];
if (t->value)
@@ -205,8 +205,7 @@ match_token(const char *word, const struct token table[])
}
break;
case PREFIX:
- if (word != NULL &&
- parse_prefix(word, &res.addr, &res.prefixlen)) {
+ if (parse_prefix(word, &res.addr, &res.prefixlen)) {
match++;
t = &table[i];
if (t->value)