summaryrefslogtreecommitdiff
path: root/socketutils.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2017-06-02 23:26:15 +0000
committerDmitry V. Levin <ldv@altlinux.org>2017-06-05 11:52:11 +0000
commit84555f5ff7312bc34ae927fd9e27a250dd95376d (patch)
treee9e20597b005c02dac91c4d1f7acbd23c5c890f5 /socketutils.c
parent103744d27172a2a723919d2c8f59f4db2714e5a5 (diff)
downloadstrace-84555f5ff7312bc34ae927fd9e27a250dd95376d.tar.gz
socketutils.c: move inet_print closer to its first use
* socketutils.c (inet_print): Move right before tcp_v4_print.
Diffstat (limited to 'socketutils.c')
-rw-r--r--socketutils.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/socketutils.c b/socketutils.c
index 133e21602..b8cd905ae 100644
--- a/socketutils.c
+++ b/socketutils.c
@@ -240,15 +240,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)
{
struct {
@@ -410,6 +401,15 @@ unix_print(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
tcp_v4_print(const int fd, const unsigned long inode)
{
return inet_print(fd, AF_INET, IPPROTO_TCP, inode, "TCP");