From: Andrea Claudi Date: Fri, 26 May 2023 17:27:20 +0000 (+0200) Subject: bridge: vni: remove useless checks on vni X-Git-Tag: v6.4.0~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33c3776b3ab652a231b36a5aa319874aebad3c59;p=thirdparty%2Fiproute2.git 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 Signed-off-by: Stephen Hemminger --- diff --git a/bridge/vni.c b/bridge/vni.c index 940f251cc..77328a4fc 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) {