lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <ebcffc302b5886a71a3e7aaec4561be2d65de30f.1685095619.git.aclaudi@redhat.com>
Date: Fri, 26 May 2023 19:27:20 +0200
From: Andrea Claudi <aclaudi@...hat.com>
To: netdev@...r.kernel.org
Cc: stephen@...workplumber.org,
	dsahern@...il.com,
	roopa@...dia.com,
	razor@...ckwall.org
Subject: [PATCH iproute2-next] bridge: vni: remove useless checks on vni

After the (d == NULL || vni == NULL) check, vni cannot be NULL anymore.

This remove two useless conditional checks on vni value:
- the first check cannot be true, so remove the whole conditional block
- the second check is always true, so remove the check

Signed-off-by: Andrea Claudi <aclaudi@...hat.com>
---
 bridge/vni.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/bridge/vni.c b/bridge/vni.c
index 940f251c..77328a4f 100644
--- a/bridge/vni.c
+++ b/bridge/vni.c
@@ -138,14 +138,8 @@ static int vni_modify(int cmd, int argc, char **argv)
 		return -1;
 	}
 
-	if (!vni && group_present) {
-		fprintf(stderr, "Group can only be specified with a vni\n");
-		return -1;
-	}
-
-	if (vni)
-		parse_vni_filter(vni, &req.n, sizeof(req),
-				 (group_present ? &daddr : NULL));
+	parse_vni_filter(vni, &req.n, sizeof(req),
+			 (group_present ? &daddr : NULL));
 
 	req.tmsg.ifindex = ll_name_to_index(d);
 	if (req.tmsg.ifindex == 0) {
-- 
2.40.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ