From e6688b5c0ae1c7a502cb3e54d94705fa0820eb6f Mon Sep 17 00:00:00 2001 From: laforge Date: Thu, 8 Nov 2001 22:28:23 +0000 Subject: make sure we print the "+" at the end of ppp+ stype interface names --- iptables-save.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iptables-save.c b/iptables-save.c index bf75d5e..c25e636 100644 --- a/iptables-save.c +++ b/iptables-save.c @@ -48,7 +48,9 @@ print_iface(char letter, const char *iface, const unsigned char *mask, if (iface[i] != '\0') printf("%c", iface[i]); } else { - if (iface[i] != '\0') + /* we can access iface[i-1] here, because + * a few lines above we make sure that mask[0] != 0 */ + if (iface[i-1] != '\0') printf("+"); break; } -- cgit v1.2.3