X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpowerdns.c;h=958a3410075788378ac0015d17974a6bebd255d7;hb=f35f67df9ccfb80c001ed0befcce8bb90ebb2a07;hp=f72bd40ffcd52c8099362fa4397053d1fdb7239d;hpb=b5a33aab585aabef83c79bf3261092ca901edf9c;p=collectd.git diff --git a/src/powerdns.c b/src/powerdns.c index f72bd40f..958a3410 100644 --- a/src/powerdns.c +++ b/src/powerdns.c @@ -25,6 +25,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" #include "configfile.h" @@ -375,7 +376,7 @@ static int powerdns_get_data_dgram (list_item_t *item, /* {{{ */ char *buffer = NULL; size_t buffer_size = 0; - struct sockaddr_un sa_unix; + struct sockaddr_un sa_unix = { 0 }; struct timeval stv_timeout; cdtime_t cdt_timeout; @@ -387,7 +388,6 @@ static int powerdns_get_data_dgram (list_item_t *item, /* {{{ */ return (-1); } - memset (&sa_unix, 0, sizeof (sa_unix)); sa_unix.sun_family = AF_UNIX; sstrncpy (sa_unix.sun_path, (local_sockpath != NULL) ? local_sockpath : PDNS_LOCAL_SOCKPATH,