diff options
Diffstat (limited to 'sbin/ipfw/ipfw2.c')
-rw-r--r-- | sbin/ipfw/ipfw2.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 99513e71e3ff..d4c81d5e4d66 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -1618,6 +1618,9 @@ print_instruction(struct buf_pr *bp, const struct format_opts *fo, case O_TCPWIN: s = "tcpwin"; break; + default: + s = "<unknown>"; + break; } bprintf(bp, " %s %u", s, cmd->arg1); } else @@ -4003,7 +4006,7 @@ chkarg: struct addrinfo *res; char *s, *end; int family; - u_short port_number; + u_short port_number = 0; NEED1("missing forward address[:port]"); @@ -5600,7 +5603,7 @@ ifinfo_cmp(const void *a, const void *b) static void ipfw_list_tifaces(void) { - ipfw_obj_lheader *olh; + ipfw_obj_lheader *olh = NULL; ipfw_iface_info *info; uint32_t i; int error; @@ -5608,7 +5611,6 @@ ipfw_list_tifaces(void) if ((error = ipfw_get_tracked_ifaces(&olh)) != 0) err(EX_OSERR, "Unable to request ipfw tracked interface list"); - qsort(olh + 1, olh->count, olh->objsize, ifinfo_cmp); info = (ipfw_iface_info *)(olh + 1); @@ -5625,7 +5627,3 @@ ipfw_list_tifaces(void) free(olh); } - - - - |