summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ospfctl
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2007-10-14 01:28:06 +0000
committerderaadt <deraadt@openbsd.org>2007-10-14 01:28:06 +0000
commitc5ba8b41e1a130c1a97d465626ba6001f8b82219 (patch)
tree52eb987bb82b757c1cc486011dc5d82b15c5f5f0 /usr.sbin/ospfctl
parentshould not be in the tree (diff)
downloadwireguard-openbsd-c5ba8b41e1a130c1a97d465626ba6001f8b82219.tar.xz
wireguard-openbsd-c5ba8b41e1a130c1a97d465626ba6001f8b82219.zip
please lint
Diffstat (limited to 'usr.sbin/ospfctl')
-rw-r--r--usr.sbin/ospfctl/ospfctl.c5
-rw-r--r--usr.sbin/ospfctl/parser.c10
2 files changed, 8 insertions, 7 deletions
diff --git a/usr.sbin/ospfctl/ospfctl.c b/usr.sbin/ospfctl/ospfctl.c
index 73e761e3026..c4850b60147 100644
--- a/usr.sbin/ospfctl/ospfctl.c
+++ b/usr.sbin/ospfctl/ospfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfctl.c,v 1.39 2007/10/11 12:03:37 norby Exp $ */
+/* $OpenBSD: ospfctl.c,v 1.40 2007/10/14 01:28:08 deraadt Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -130,6 +130,7 @@ main(int argc, char *argv[])
printf("%-11s %-18s %-6s %-10s %-10s %-8s %3s %3s\n",
"Interface", "Address", "State", "HelloTimer", "Linkstate",
"Uptime", "nc", "ac");
+ /*FALLTHROUGH*/
case SHOW_IFACE_DTAIL:
if (*res->ifname) {
ifidx = if_nametoindex(res->ifname);
@@ -142,6 +143,7 @@ main(int argc, char *argv[])
case SHOW_NBR:
printf("%-15s %-3s %-12s %-8s %-15s %-9s %s\n", "ID", "Pri",
"State", "DeadTime", "Address", "Iface","Uptime");
+ /*FALLTHROUGH*/
case SHOW_NBR_DTAIL:
imsg_compose(ibuf, IMSG_CTL_SHOW_NBR, 0, 0, NULL, 0);
break;
@@ -173,6 +175,7 @@ main(int argc, char *argv[])
case SHOW_RIB:
printf("%-20s %-17s %-12s %-9s %-7s %-8s\n", "Destination",
"Nexthop", "Path Type", "Type", "Cost", "Uptime");
+ /*FALLTHROUGH*/
case SHOW_RIB_DTAIL:
imsg_compose(ibuf, IMSG_CTL_SHOW_RIB, 0, 0, NULL, 0);
break;
diff --git a/usr.sbin/ospfctl/parser.c b/usr.sbin/ospfctl/parser.c
index 7c754ffc563..3ca83589c15 100644
--- a/usr.sbin/ospfctl/parser.c
+++ b/usr.sbin/ospfctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.14 2007/02/01 13:09:42 claudio Exp $ */
+/* $OpenBSD: parser.c,v 1.15 2007/10/14 01:28:08 deraadt Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -265,6 +265,7 @@ show_valid_args(const struct token table[])
break;
case IFNAME:
fprintf(stderr, " <interface>\n");
+ break;
case ENDTOKEN:
break;
}
@@ -309,12 +310,9 @@ parse_prefix(const char *word, struct in_addr *addr, u_int8_t *prefixlen)
addr->s_addr = ina.s_addr & htonl(prefixlen2mask(bits));
*prefixlen = bits;
return (1);
- } else {
- *prefixlen = 32;
- return (parse_addr(word, addr));
}
-
- return (0);
+ *prefixlen = 32;
+ return (parse_addr(word, addr));
}
/* XXX local copy from kroute.c, should go to shared file */