]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libebt_ip6: Drop unused variables
authorPhil Sutter <phil@nwl.cc>
Fri, 13 Nov 2020 20:13:50 +0000 (21:13 +0100)
committerPhil Sutter <phil@nwl.cc>
Mon, 7 Jun 2021 12:50:27 +0000 (14:50 +0200)
They are being assigned to but never read.

Fixes: 5c8ce9c6aede0 ("ebtables-compat: add 'ip6' match extension")
Signed-off-by: Phil Sutter <phil@nwl.cc>
extensions/libebt_ip6.c

index b8a5a5d8c3a923213146c15fee3da1f65e8e0d36..301bed9aadefd8f8254d022b885d3c4fefbf81a6 100644 (file)
@@ -250,9 +250,8 @@ static void brip6_init(struct xt_entry_match *match)
 static struct in6_addr *numeric_to_addr(const char *num)
 {
        static struct in6_addr ap;
-       int err;
 
-       if ((err=inet_pton(AF_INET6, num, &ap)) == 1)
+       if (inet_pton(AF_INET6, num, &ap) == 1)
                return &ap;
        return (struct in6_addr *)NULL;
 }
@@ -292,7 +291,6 @@ static void ebt_parse_ip6_address(char *address, struct in6_addr *addr, struct i
        char buf[256];
        char *p;
        int i;
-       int err;
 
        strncpy(buf, address, sizeof(buf) - 1);
        /* first the mask */
@@ -309,7 +307,7 @@ static void ebt_parse_ip6_address(char *address, struct in6_addr *addr, struct i
        if (!memcmp(msk, &in6addr_any, sizeof(in6addr_any)))
                strcpy(buf, "::");
 
-       if ((err=inet_pton(AF_INET6, buf, addr)) < 1) {
+       if (inet_pton(AF_INET6, buf, addr) < 1) {
                xtables_error(PARAMETER_PROBLEM, "Invalid IPv6 Address '%s' specified", buf);
                return;
        }