X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcurl_json_test.c;h=e8f8f6bb3a6c3a3cb8fd436890d3ee5d419b5819;hb=2d176c650d9d6e4cd45d2add7977016c82dd8b55;hp=4b9846607f794e3a95c12d171fc3fccea7b69686;hpb=307bf74a8cef765fcd5d788f6aad5b2e9bdf670b;p=collectd.git diff --git a/src/curl_json_test.c b/src/curl_json_test.c index 4b984660..e8f8f6bb 100644 --- a/src/curl_json_test.c +++ b/src/curl_json_test.c @@ -52,9 +52,10 @@ static cj_t *test_setup(char *json, char *key_path) { assert(cj_append_key(db, key) == 0); - db->state[0].entry = &(cj_tree_entry_t){ - .type = TREE, .tree = db->tree, - }; + cj_tree_entry_t root = {0}; + root.type = TREE; + root.tree = db->tree; + db->state[0].entry = &root; cj_curl_callback(json, strlen(json), 1, db); #if HAVE_YAJL_V2