]> granicus.if.org Git - strace/commit
print_inet_addr: print nameless and named addresses using the same style
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 12 Nov 2018 13:42:11 +0000 (13:42 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 12 Nov 2018 13:42:11 +0000 (13:42 +0000)
commit62267a93f46da996f375ccf0b93d802e35b94274
tree064265e3789257dc69ffc89ca56c1c0bb426f923
parentf9e5f12b7c2d1d54abaa911a0047d08d7bd5d407
print_inet_addr: print nameless and named addresses using the same style

* sockaddr.c (print_inet_addr): Handle var_name == NULL case in a more
structured way: use inet_addr("%s") form to print AF_INET addresses
in structureless contexts where no structure field name is available.
Likewise, use inet_pton(AF_INET6, "%s") that case.
* tests/nlattr_ifaddrmsg.c (main): Update expected output.
* tests/nlattr_ifla_af_spec.c (main): Likewise.

Complements: v4.19~76 "print_inet_addr: add support of invocations without field name"
sockaddr.c
tests/nlattr_ifaddrmsg.c
tests/nlattr_ifla_af_spec.c