X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fcurl_json.c;h=2dac7479308df41485226c947d03739d2c394d4f;hb=52969b45cee18330d72b9fafe1f37349d62414b6;hp=1cf6381ab403ebac37a4deb8310685b12b543a0f;hpb=a5a33953ba9c8ca6a17531df5fa17181d59467c5;p=collectd.git diff --git a/src/curl_json.c b/src/curl_json.c index 1cf6381a..2dac7479 100644 --- a/src/curl_json.c +++ b/src/curl_json.c @@ -760,7 +760,7 @@ static int cj_config_add_url (oconfig_item_t *ci) /* {{{ */ /* If all went well, register this database for reading */ if (status == 0) { - user_data_t ud; + user_data_t ud = { 0 }; char *cb_name; if (db->instance == NULL) @@ -769,7 +769,6 @@ static int cj_config_add_url (oconfig_item_t *ci) /* {{{ */ DEBUG ("curl_json plugin: Registering new read callback: %s", db->instance); - memset (&ud, 0, sizeof (ud)); ud.data = (void *) db; ud.free_func = cj_free; @@ -922,7 +921,7 @@ static int cj_curl_perform(cj_t *db) /* {{{ */ return (-1); } if (db->stats != NULL) - curl_stats_dispatch (db->stats, db->curl, cj_host (db), "curl_json", db->instance, NULL); + curl_stats_dispatch (db->stats, db->curl, cj_host (db), "curl_json", db->instance); curl_easy_getinfo(db->curl, CURLINFO_EFFECTIVE_URL, &url); curl_easy_getinfo(db->curl, CURLINFO_RESPONSE_CODE, &rc); @@ -968,9 +967,9 @@ static int cj_perform (cj_t *db) /* {{{ */ } #if HAVE_YAJL_V2 - status = yajl_complete_parse(db->yajl); + status = yajl_complete_parse(db->yajl); #else - status = yajl_parse_complete(db->yajl); + status = yajl_parse_complete(db->yajl); #endif if (status != yajl_status_ok) {