]> git.proxmox.com Git - mirror_iproute2.git/commit - ip/ipaddress.c
ipaddress: Simplify print_linkinfo_brief() and it's usage
authorSerhey Popovych <serhe.popovych@gmail.com>
Thu, 15 Feb 2018 21:23:20 +0000 (23:23 +0200)
committerDavid Ahern <dsahern@gmail.com>
Fri, 16 Feb 2018 16:14:16 +0000 (08:14 -0800)
commit1bccd1e43b949cc3696f5060fe0928439e6f7bef
tree3cc85c5c7ff9a8a1a7faeee7e3d6f212ec3cae37
parent9516823051cee49d1eddd87aa3ecb7770f0f1c7b
ipaddress: Simplify print_linkinfo_brief() and it's usage

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 <serhe.popovych@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
ip/ipaddress.c