Code

no need to initialize result ptr of getaddrinfo
[collectd.git] / src / pf.c
index a2bd5499916d735a3ec8143e93c8d79caa3485cf..c9aeb5ff22f3be3b48c295e16f242f530a112858 100644 (file)
--- a/src/pf.c
+++ b/src/pf.c
@@ -94,7 +94,6 @@ static int pf_read (void)
                return (-1);
        }
 
-       memset (&state, 0, sizeof (state));
        status = ioctl (fd, DIOCGETSTATUS, &state);
        if (status != 0)
        {
@@ -106,7 +105,6 @@ static int pf_read (void)
        }
 
        close (fd);
-       fd = -1;
 
        if (!state.running)
        {