]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ipaddress: drop unnecessary check in ipaddr_list_flush_or_save()
authorPhil Sutter <phil@nwl.cc>
Tue, 24 Nov 2015 14:31:03 +0000 (15:31 +0100)
committerStephen Hemminger <shemming@brocade.com>
Sun, 29 Nov 2015 19:47:29 +0000 (11:47 -0800)
Right after ipaddr_reset_filter(), filter.family is always AF_UNSPEC.

Signed-off-by: Phil Sutter <phil@nwl.cc>
ip/ipaddress.c

index 9811eb4c70dfb6b6dd4d00d0b5cde0d9bce00a19..bc8359eb9fad6c2f68e77c9cfb45e6a424e8a973 100644 (file)
@@ -1451,10 +1451,7 @@ static int ipaddr_list_flush_or_save(int argc, char **argv, int action)
 
        ipaddr_reset_filter(oneline, 0);
        filter.showqueue = 1;
-
-       if (filter.family == AF_UNSPEC)
-               filter.family = preferred_family;
-
+       filter.family = preferred_family;
        filter.group = -1;
 
        if (action == IPADD_FLUSH) {