treewide: add blank line below collectd.h
[collectd.git] / src / pf.c
index 112e28f..e8e0b18 100644 (file)
--- a/src/pf.c
+++ b/src/pf.c
  */
 
 #include "collectd.h"
+
 #include "plugin.h"
 #include "common.h"
 
 #if HAVE_SYS_IOCTL_H
 # include <sys/ioctl.h>
 #endif
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
 #if HAVE_NET_IF_H
 # include <net/if.h>
 #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)
        {