summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-01-18 15:13:20 +0000
committerglebius <glebius@FreeBSD.org>2005-01-18 15:13:20 +0000
commit038ca13cb7f5445f7485c8c5bef12d58c0a7b92a (patch)
treec89bfe7edf9a821280dd5e671967fdc6313d71d7 /sbin/ipfw
parentb3a53fc0e61db0db29d06418cb57c6714f273863 (diff)
downloadFreeBSD-src-038ca13cb7f5445f7485c8c5bef12d58c0a7b92a.zip
FreeBSD-src-038ca13cb7f5445f7485c8c5bef12d58c0a7b92a.tar.gz
Don't print extra " via ", if we have already printed one. While here,
slightly style brackets. PR: misc/75297 MFC after: 1 week
Diffstat (limited to 'sbin/ipfw')
-rw-r--r--sbin/ipfw/ipfw2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index aadd244..12f1432 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -1383,7 +1383,8 @@ show_ipfw(struct ip_fw *rule, int pcwidth, int bcwidth)
break;
case O_XMIT:
case O_RECV:
- case O_VIA: {
+ case O_VIA:
+ {
char const *s;
ipfw_insn_if *cmdif = (ipfw_insn_if *)cmd;
@@ -1396,10 +1397,11 @@ show_ipfw(struct ip_fw *rule, int pcwidth, int bcwidth)
if (cmdif->name[0] == '\0')
printf(" %s %s", s,
inet_ntoa(cmdif->p.ip));
- printf(" %s %s", s, cmdif->name);
- }
- break;
+ else
+ printf(" %s %s", s, cmdif->name);
+ break;
+ }
case O_IPID:
if (F_LEN(cmd) == 1)
printf(" ipid %u", cmd->arg1 );
OpenPOWER on IntegriCloud