X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftcpconns.c;h=07170d788821314399fd3b0b4a2efcd49003252d;hb=a396da422740caf336a6d594515e8d80de6f440a;hp=9fdd16e9c1b30b7d336c18e0b3620c8a587340e4;hpb=aecd05a0a0ec4d745506a67a937de6d1d6b33db5;p=collectd.git diff --git a/src/tcpconns.c b/src/tcpconns.c index 9fdd16e9..07170d78 100644 --- a/src/tcpconns.c +++ b/src/tcpconns.c @@ -76,7 +76,6 @@ #endif #if KERNEL_LINUX -#include #include #if HAVE_LINUX_INET_DIAG_H #include @@ -264,7 +263,7 @@ static int config_keys_num = STATIC_ARRAY_SIZE(config_keys); static int port_collect_listening = 0; static int port_collect_total = 0; -static port_entry_t *port_list_head = NULL; +static port_entry_t *port_list_head; static uint32_t count_total[TCP_STATE_MAX + 1]; #if KERNEL_LINUX @@ -459,7 +458,7 @@ static int conn_read_netlink(void) { if (fd < 0) { ERROR("tcpconns plugin: conn_read_netlink: socket(AF_NETLINK, SOCK_RAW, " "NETLINK_INET_DIAG) failed: %s", - sstrerror(errno, buf, sizeof(buf))); + STRERRNO); return -1; } @@ -490,7 +489,7 @@ static int conn_read_netlink(void) { if (sendmsg(fd, &msg, 0) < 0) { ERROR("tcpconns plugin: conn_read_netlink: sendmsg(2) failed: %s", - sstrerror(errno, buf, sizeof(buf))); + STRERRNO); close(fd); return -1; } @@ -514,7 +513,7 @@ static int conn_read_netlink(void) { continue; ERROR("tcpconns plugin: conn_read_netlink: recvmsg(2) failed: %s", - sstrerror(errno, buf, sizeof(buf))); + STRERRNO); close(fd); return -1; } else if (status == 0) {