]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
make sure we print the "+" at the end of ppp+ stype interface names
authorHarald Welte <laforge@gnumonks.org>
Thu, 8 Nov 2001 22:28:23 +0000 (22:28 +0000)
committerHarald Welte <laforge@gnumonks.org>
Thu, 8 Nov 2001 22:28:23 +0000 (22:28 +0000)
iptables-save.c

index bf75d5e00bc233b8bcd23c86d3848bd15680323d..c25e636ccb733debe2a9d182ab11c502c60524c0 100644 (file)
@@ -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;
                }