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@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
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) {