Re: [PATCH iproute2-next v2 2/6] ipaddress: Simplify print_linkinfo_brief() and it's usage
From: David Ahern <hidden>
Date: 2018-02-01 03:43:38
From: David Ahern <hidden>
Date: 2018-02-01 03:43:38
On 1/30/18 11:09 AM, Serhey Popovych wrote:
Improve print_linkinfo_brief() and it's callers:
1) Get rid of custom @struct filter pointer @pfilter: it is NULL in
all callers anyway and global @filter is used.Looks like I somehow dropped a vrf change that was going to use that. Send a standalone patch to revert 63891c70137f (straight revert does not work so some fixup is needed) and then a follow on for the second part of this change.
2) Simplify calling code in ipaddr_list_flush_or_save() by
introducing intermediate variable of @struct nlmsghdr, drop
duplicated code: print_linkinfo_brief() never returns values other
than <= 0 so we can move print_selected_addrinfo() outside of each
block.
Signed-off-by: Serhey Popovych <redacted>
---
ip/ip_common.h | 3 +--
ip/ipaddress.c | 60 ++++++++++++++++++++++++--------------------------------
ip/iplink.c | 2 +-
3 files changed, 28 insertions(+), 37 deletions(-)