]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ipaddress: Make print_linkinfo_brief() static
authorSerhey Popovych <serhe.popovych@gmail.com>
Thu, 15 Feb 2018 21:23:24 +0000 (23:23 +0200)
committerDavid Ahern <dsahern@gmail.com>
Fri, 16 Feb 2018 16:14:25 +0000 (08:14 -0800)
commitc956e9a934280e1a1e0c913515f69a76dd804cd3
tree31f71ae0468bd421b312a56fe0f275c6f3c605da
parentf5b50a18ae8cf47531b3a1801f963693b59c79e3
ipaddress: Make print_linkinfo_brief() static

It shares lot of code with print_linkinfo(): drop duplicated part,
change parameters list, make it static and call from print_linkinfo()
after common path.

While there move SPRINT_BUF() to the function scope from blocks to
avoid duplication and use "%s" to print "\n" to help compiler optimize
exit for both print_linkinfo_brief() and normal paths.

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
ip/ip_common.h
ip/ipaddress.c
ip/iplink.c