From: Florian Forster Date: Tue, 16 May 2017 07:04:44 +0000 (+0200) Subject: curl_json plugin: Use struct initializer. X-Git-Tag: collectd-5.8.0~183 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2576e1470e75a06105be5515cec96fb701c3bb05;p=collectd.git curl_json plugin: Use struct initializer. --- diff --git a/src/curl_json.c b/src/curl_json.c index 464c6aef..97d31694 100644 --- 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);