diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-01-30 03:55:09 +0100 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2009-01-30 03:55:09 +0100 |
commit | e44ea7faa17c10c68f14f5338a7cc6e3291a0ce7 (patch) | |
tree | 4240b28def0ad4f7f2e2cdcae935636d26ac8ea7 /iptables.c | |
parent | a41545ca7cde43e0ba53260ba74bd9bf74025a68 (diff) |
libxtables: prefix/order - ipaddr/ipmask to ascii output
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'iptables.c')
-rw-r--r-- | iptables.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -803,10 +803,10 @@ print_firewall(const struct ipt_entry *fw, printf(FMT("%-19s ","%s "), "anywhere"); else { if (format & FMT_NUMERIC) - sprintf(buf, "%s", ipaddr_to_numeric(&fw->ip.src)); + strcpy(buf, xtables_ipaddr_to_numeric(&fw->ip.src)); else - sprintf(buf, "%s", ipaddr_to_anyname(&fw->ip.src)); - strcat(buf, ipmask_to_numeric(&fw->ip.smsk)); + strcpy(buf, xtables_ipaddr_to_anyname(&fw->ip.src)); + strcat(buf, xtables_ipmask_to_numeric(&fw->ip.smsk)); printf(FMT("%-19s ","%s "), buf); } @@ -815,10 +815,10 @@ print_firewall(const struct ipt_entry *fw, printf(FMT("%-19s ","-> %s"), "anywhere"); else { if (format & FMT_NUMERIC) - sprintf(buf, "%s", ipaddr_to_numeric(&fw->ip.dst)); + strcpy(buf, xtables_ipaddr_to_numeric(&fw->ip.dst)); else - sprintf(buf, "%s", ipaddr_to_anyname(&fw->ip.dst)); - strcat(buf, ipmask_to_numeric(&fw->ip.dmsk)); + strcpy(buf, xtables_ipaddr_to_anyname(&fw->ip.dst)); + strcat(buf, xtables_ipmask_to_numeric(&fw->ip.dmsk)); printf(FMT("%-19s ","-> %s"), buf); } |