]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
iptaccount: fix being a no-op program
authorJan Engelhardt <jengelh@inai.de>
Tue, 19 Mar 2013 21:16:28 +0000 (22:16 +0100)
committerJan Engelhardt <jengelh@inai.de>
Sun, 31 Mar 2013 19:11:24 +0000 (21:11 +0200)
A PPC system has been observed where "char" is unsigned; with that,
the getopt loop will never terminate because optchar != -1 could not
happen.

doc/changelog.txt
extensions/ACCOUNT/iptaccount.c

index e7dcce9123750feb46291070513441226785d307..9ee5cea98db4e3518f660207e3da3c4612e99aba 100644 (file)
@@ -7,6 +7,7 @@ v2.2 (2013-03-07)
 =================
 Enhancements:
 - Support for Linux 3.9
+- iptaccount: fix entire program being erroneously optimized away on PPC
 
 
 v2.1 (2012-11-27)
index 04eefcbb64b50d3ce7daa54bfd10b3a1682c1e45..eb05215beebbced79d95e25011c16fea8c8dae52 100644 (file)
@@ -64,7 +64,7 @@ int main(int argc, char *argv[])
        struct ipt_ACCOUNT_context ctx;
        struct ipt_acc_handle_ip *entry;
        int i;
-       char optchar;
+       int optchar;
        bool doHandleUsage = false, doHandleFree = false, doTableNames = false;
        bool doFlush = false, doContinue = false, doCSV = false;