X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fpf.c;h=e8e0b185e21b474b216e134623805ca421bba06c;hb=4103105fb43cd72294f165b2541540b3a8a99532;hp=112e28f3554dee66efb5dd5dcd3fb15843ad4e85;hpb=0657d95eaa686d64efe6bbccda346ebd6467bd0b;p=collectd.git diff --git a/src/pf.c b/src/pf.c index 112e28f3..e8e0b185 100644 --- a/src/pf.c +++ b/src/pf.c @@ -20,15 +20,13 @@ */ #include "collectd.h" + #include "plugin.h" #include "common.h" #if HAVE_SYS_IOCTL_H # include #endif -#if HAVE_SYS_SOCKET_H -# include -#endif #if HAVE_NET_IF_H # include #endif @@ -97,7 +95,6 @@ static int pf_read (void) return (-1); } - memset (&state, 0, sizeof (state)); status = ioctl (fd, DIOCGETSTATUS, &state); if (status != 0) { @@ -109,7 +106,6 @@ static int pf_read (void) } close (fd); - fd = -1; if (!state.running) {