summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ospf6ctl/ospf6ctl.c5
-rw-r--r--usr.sbin/ospf6ctl/parser.c10
-rw-r--r--usr.sbin/ospfctl/ospfctl.c5
-rw-r--r--usr.sbin/ospfctl/parser.c10
4 files changed, 16 insertions, 14 deletions
diff --git a/usr.sbin/ospf6ctl/ospf6ctl.c b/usr.sbin/ospf6ctl/ospf6ctl.c
index 0a75808611d..84d963ddc61 100644
--- a/usr.sbin/ospf6ctl/ospf6ctl.c
+++ b/usr.sbin/ospf6ctl/ospf6ctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospf6ctl.c,v 1.3 2007/10/12 09:29:45 norby Exp $ */
+/* $OpenBSD: ospf6ctl.c,v 1.4 2007/10/14 01:28:06 deraadt Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -131,6 +131,7 @@ main(int argc, char *argv[])
printf("%-11s %-29s %-6s %-10s %-10s %-8s\n",
"Interface", "Address", "State", "HelloTimer", "Linkstate",
"Uptime");
+ /*FALLTHROUGH*/
case SHOW_IFACE_DTAIL:
if (*res->ifname) {
ifidx = if_nametoindex(res->ifname);
@@ -143,6 +144,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;
@@ -174,6 +176,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/ospf6ctl/parser.c b/usr.sbin/ospf6ctl/parser.c
index 0c75ef03739..27453c8ebd8 100644
--- a/usr.sbin/ospf6ctl/parser.c
+++ b/usr.sbin/ospf6ctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.1 2007/10/12 08:22:53 norby Exp $ */
+/* $OpenBSD: parser.c,v 1.2 2007/10/14 01:28:06 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 */
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 */