Blame SOURCES/0006-extensions-libebt_ip6-Drop-unused-variables.patch

3a00e5
From fb53fa061d1f67bd18845fdb8f6e13e5929cf15a Mon Sep 17 00:00:00 2001
3a00e5
From: Phil Sutter <phil@nwl.cc>
3a00e5
Date: Fri, 13 Nov 2020 21:13:50 +0100
3a00e5
Subject: [PATCH] extensions: libebt_ip6: Drop unused variables
3a00e5
3a00e5
They are being assigned to but never read.
3a00e5
3a00e5
Fixes: 5c8ce9c6aede0 ("ebtables-compat: add 'ip6' match extension")
3a00e5
Signed-off-by: Phil Sutter <phil@nwl.cc>
3a00e5
(cherry picked from commit 8bb5bcae57c83066c224efa5fd29ed4822a766fc)
3a00e5
---
3a00e5
 extensions/libebt_ip6.c | 6 ++----
3a00e5
 1 file changed, 2 insertions(+), 4 deletions(-)
3a00e5
3a00e5
diff --git a/extensions/libebt_ip6.c b/extensions/libebt_ip6.c
3a00e5
index b8a5a5d8c3a92..301bed9aadefd 100644
3a00e5
--- a/extensions/libebt_ip6.c
3a00e5
+++ b/extensions/libebt_ip6.c
3a00e5
@@ -250,9 +250,8 @@ static void brip6_init(struct xt_entry_match *match)
3a00e5
 static struct in6_addr *numeric_to_addr(const char *num)
3a00e5
 {
3a00e5
 	static struct in6_addr ap;
3a00e5
-	int err;
3a00e5
 
3a00e5
-	if ((err=inet_pton(AF_INET6, num, &ap)) == 1)
3a00e5
+	if (inet_pton(AF_INET6, num, &ap) == 1)
3a00e5
 		return ≈
3a00e5
 	return (struct in6_addr *)NULL;
3a00e5
 }
3a00e5
@@ -292,7 +291,6 @@ static void ebt_parse_ip6_address(char *address, struct in6_addr *addr, struct i
3a00e5
 	char buf[256];
3a00e5
 	char *p;
3a00e5
 	int i;
3a00e5
-	int err;
3a00e5
 
3a00e5
 	strncpy(buf, address, sizeof(buf) - 1);
3a00e5
 	/* first the mask */
3a00e5
@@ -309,7 +307,7 @@ static void ebt_parse_ip6_address(char *address, struct in6_addr *addr, struct i
3a00e5
 	if (!memcmp(msk, &in6addr_any, sizeof(in6addr_any)))
3a00e5
 		strcpy(buf, "::");
3a00e5
 
3a00e5
-	if ((err=inet_pton(AF_INET6, buf, addr)) < 1) {
3a00e5
+	if (inet_pton(AF_INET6, buf, addr) < 1) {
3a00e5
 		xtables_error(PARAMETER_PROBLEM, "Invalid IPv6 Address '%s' specified", buf);
3a00e5
 		return;
3a00e5
 	}
3a00e5
-- 
3a00e5
2.31.1
3a00e5