From: Dmitry V. Levin Date: Fri, 2 Jun 2017 23:26:15 +0000 (+0000) Subject: socketutils.c: move inet_print closer to its first use X-Git-Tag: v4.18~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84555f5ff7312bc34ae927fd9e27a250dd95376d;p=strace socketutils.c: move inet_print closer to its first use * socketutils.c (inet_print): Move right before tcp_v4_print. --- diff --git a/socketutils.c b/socketutils.c index 133e2160..b8cd905a 100644 --- a/socketutils.c +++ b/socketutils.c @@ -239,15 +239,6 @@ receive_responses(const int fd, const unsigned long inode, } } -static bool -inet_print(const int fd, const int family, const int protocol, - const unsigned long inode, const char *proto_name) -{ - return inet_send_query(fd, family, protocol) - && receive_responses(fd, inode, proto_name, inet_parse_response) - && print_sockaddr_by_inode_cached(inode); -} - static bool unix_send_query(const int fd, const unsigned long inode) { @@ -409,6 +400,15 @@ unix_print(const int fd, const unsigned long inode) && print_sockaddr_by_inode_cached(inode); } +static bool +inet_print(const int fd, const int family, const int protocol, + const unsigned long inode, const char *proto_name) +{ + return inet_send_query(fd, family, protocol) + && receive_responses(fd, inode, proto_name, inet_parse_response) + && print_sockaddr_by_inode_cached(inode); +} + static bool tcp_v4_print(const int fd, const unsigned long inode) {