X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcurl_json.c;h=97d31694e0f75c1dee1c5a25ccb4f7125278cb47;hb=2576e1470e75a06105be5515cec96fb701c3bb05;hp=464c6aefd3e9e0e6544954b4509477f86d78edf6;hpb=de1b8d7a0a25aab2e0a321493ea55769f251f6e6;p=collectd.git 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);