summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3fb6fe5)
raw | patch | inline | side by side (parent: 3fb6fe5)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 9 Dec 2016 16:20:43 +0000 (17:20 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 9 Dec 2016 16:20:43 +0000 (17:20 +0100) |
CID 38125
src/email.c | patch | blob | history |
diff --git a/src/email.c b/src/email.c
index b406d48305e415e0bc45732357c5ba347036f760..34e999845c0511d430dd2fabb40193c80661188e 100644 (file)
--- a/src/email.c
+++ b/src/email.c
} /* static void *collect (void *) */
static void *open_connection(void __attribute__((unused)) * arg) {
- struct sockaddr_un addr;
-
const char *path = (NULL == sock_file) ? SOCK_PATH : sock_file;
const char *group = (NULL == sock_group) ? COLLECTD_GRP_NAME : sock_group;
pthread_exit((void *)1);
}
- addr.sun_family = AF_UNIX;
+ struct sockaddr_un addr = {
+ .sun_family = AF_UNIX
+ };
sstrncpy(addr.sun_path, path, (size_t)(UNIX_PATH_MAX - 1));
errno = 0;