diff --git a/src/unixsock.c b/src/unixsock.c
index 1840e34c45a157825fd8a9b8052a1b56500480ca..808ba98bae65c48f20ec970c1c930214bdb51410 100644 (file)
--- a/src/unixsock.c
+++ b/src/unixsock.c
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
-#include "configfile.h"
#include "utils_cmd_flush.h"
#include "utils_cmd_getval.h"
#include "utils_cmd_putval.h"
#include "utils_cmd_putnotif.h"
-/* Folks without pthread will need to disable this plugin. */
-#include <pthread.h>
-
#include <sys/stat.h>
#include <sys/un.h>
*/
static int us_open_socket (void)
{
- struct sockaddr_un sa;
+ struct sockaddr_un sa = { 0 };
int status;
sock_fd = socket (PF_UNIX, SOCK_STREAM, 0);
return (-1);
}
- memset (&sa, '\0', sizeof (sa));
sa.sun_family = AF_UNIX;
sstrncpy (sa.sun_path, (sock_file != NULL) ? sock_file : US_DEFAULT_PATH,
sizeof (sa.sun_path));