From: David Ahern <dsah...@gmail.com>

iplink_get has 1 caller and the flags arg is 0, so just remove it.

Signed-off-by: David Ahern <dsah...@gmail.com>
---
 ip/ip_common.h | 2 +-
 ip/ipaddress.c | 2 +-
 ip/iplink.c    | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ip/ip_common.h b/ip/ip_common.h
index 200be5e23dd1..458a9cb7ff2c 100644
--- a/ip/ip_common.h
+++ b/ip/ip_common.h
@@ -91,7 +91,7 @@ void vrf_reset(void);
 int netns_identify_pid(const char *pidstr, char *name, int len);
 int do_seg6(int argc, char **argv);
 
-int iplink_get(unsigned int flags, char *name, __u32 filt_mask);
+int iplink_get(char *name, __u32 filt_mask);
 int iplink_ifla_xstats(int argc, char **argv);
 
 int ip_linkaddr_list(int family, req_filter_fn_t filter_fn,
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index c0c1fbbe4c74..9481f241cb36 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -1940,7 +1940,7 @@ static int ipaddr_list_flush_or_save(int argc, char 
**argv, int action)
         * the link device
         */
        if (filter_dev && filter.group == -1 && do_link == 1) {
-               if (iplink_get(0, filter_dev, RTEXT_FILTER_VF) < 0) {
+               if (iplink_get(filter_dev, RTEXT_FILTER_VF) < 0) {
                        perror("Cannot send link get request");
                        delete_json_obj();
                        exit(1);
diff --git a/ip/iplink.c b/ip/iplink.c
index 50ccb49a0263..9f39e3826c19 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -1087,11 +1087,11 @@ static int iplink_modify(int cmd, unsigned int flags, 
int argc, char **argv)
        return 0;
 }
 
-int iplink_get(unsigned int flags, char *name, __u32 filt_mask)
+int iplink_get(char *name, __u32 filt_mask)
 {
        struct iplink_req req = {
                .n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)),
-               .n.nlmsg_flags = NLM_F_REQUEST | flags,
+               .n.nlmsg_flags = NLM_F_REQUEST,
                .n.nlmsg_type = RTM_GETLINK,
                .i.ifi_family = preferred_family,
        };
-- 
2.11.0

Reply via email to