]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxt_multiport: remove an unused variable
authorGeorge Burgess IV <gbiv@google.com>
Wed, 23 Nov 2016 00:05:51 +0000 (16:05 -0800)
committerFlorian Westphal <fw@strlen.de>
Wed, 23 Nov 2016 00:25:44 +0000 (01:25 +0100)
Clang's static analyzer flagged the shift this patch removes as
shifting a garbage value. Looks like `m` isn't used at all anyway, so
we can simply remove it.

Signed-off-by: George Burgess IV <gbiv@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
extensions/libxt_multiport.c

index 5c5cbe0fa95f681360739575706473cb6784cd68..07ad4cfd4e519154e1a9a1867194576709d823d0 100644 (file)
@@ -108,7 +108,6 @@ parse_multi_ports_v1(const char *portstring,
 {
        char *buffer, *cp, *next, *range;
        unsigned int i;
-       uint16_t m;
 
        buffer = strdup(portstring);
        if (!buffer) xtables_error(OTHER_PROBLEM, "strdup failed");
@@ -133,7 +132,6 @@ parse_multi_ports_v1(const char *portstring,
                        if (multiinfo->ports[i-1] >= multiinfo->ports[i])
                                xtables_error(PARAMETER_PROBLEM,
                                           "invalid portrange specified");
-                       m <<= 1;
                }
        }
        multiinfo->count = i;