X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Funixsock.c;h=522271c6627e52913d454b656dbaf6d983bf229c;hp=bceafe6d930d2d204eba6e475f0309fbb088c771;hb=d486225f89ea52d8ed2b4242eba2ad94c409f837;hpb=a18496a4ac759552fd4dac1d2c661fb50285b1a1 diff --git a/src/unixsock.c b/src/unixsock.c index bceafe6d..522271c6 100644 --- a/src/unixsock.c +++ b/src/unixsock.c @@ -55,14 +55,14 @@ static const char *config_keys[] = {"SocketFile", "SocketGroup", "SocketPerms", "DeleteSocket"}; static int config_keys_num = STATIC_ARRAY_SIZE(config_keys); -static int loop = 0; +static int loop; /* socket configuration */ static int sock_fd = -1; -static char *sock_file = NULL; -static char *sock_group = NULL; +static char *sock_file; +static char *sock_group; static int sock_perms = S_IRWXU | S_IRWXG; -static _Bool delete_socket = 0; +static bool delete_socket; static pthread_t listen_thread = (pthread_t)0; @@ -350,9 +350,9 @@ static int us_config(const char *key, const char *val) { sock_perms = (int)strtol(val, NULL, 8); } else if (strcasecmp(key, "DeleteSocket") == 0) { if (IS_TRUE(val)) - delete_socket = 1; + delete_socket = true; else - delete_socket = 0; + delete_socket = false; } else { return -1; } @@ -361,7 +361,7 @@ static int us_config(const char *key, const char *val) { } /* int us_config */ static int us_init(void) { - static int have_init = 0; + static int have_init; int status;