From 2576e1470e75a06105be5515cec96fb701c3bb05 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 16 May 2017 09:04:44 +0200 Subject: [PATCH] curl_json plugin: Use struct initializer. --- src/curl_json.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.30.2