projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #2772 from rubenk/static-initializers
[collectd.git]
/
src
/
unixsock.c
diff --git
a/src/unixsock.c
b/src/unixsock.c
index
bceafe6
..
522271c
100644
(file)
--- 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);
"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;
/* 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 int sock_perms = S_IRWXU | S_IRWXG;
-static
_Bool delete_socket = 0
;
+static
bool delete_socket
;
static pthread_t listen_thread = (pthread_t)0;
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))
sock_perms = (int)strtol(val, NULL, 8);
} else if (strcasecmp(key, "DeleteSocket") == 0) {
if (IS_TRUE(val))
- delete_socket =
1
;
+ delete_socket =
true
;
else
else
- delete_socket =
0
;
+ delete_socket =
false
;
} else {
return -1;
}
} 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) {
} /* int us_config */
static int us_init(void) {
- static int have_init
= 0
;
+ static int have_init;
int status;
int status;