projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de1b8d7
)
curl_json plugin: Use struct initializer.
author
Florian Forster
<octo@collectd.org>
Tue, 16 May 2017 07:04:44 +0000
(09:04 +0200)
committer
Florian Forster
<octo@collectd.org>
Tue, 16 May 2017 07:07:09 +0000
(09:07 +0200)
src/curl_json.c
patch
|
blob
|
history
diff --git
a/src/curl_json.c
b/src/curl_json.c
index
464c6ae
..
97d3169
100644
(file)
--- a/
src/curl_json.c
+++ b/
src/curl_json.c
@@
-795,8
+795,9
@@
static void cj_submit(cj_t *db, cj_key_t *key, value_t *value) /* {{{ */
static int cj_sock_perform(cj_t *db) /* {{{ */
{
char errbuf[1024];
- struct sockaddr_un sa_unix = {0};
- sa_unix.sun_family = AF_UNIX;
+ struct sockaddr_un sa_unix = {
+ .sun_family = AF_UNIX,
+ };
sstrncpy(sa_unix.sun_path, db->sock, sizeof(sa_unix.sun_path));
int fd = socket(AF_UNIX, SOCK_STREAM, 0);