X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fcurl_xml.c;h=05d75c670b60d4419e0657bd26d9567bc80af528;hb=3fae5596643f1e361eb18c3d65448f8bc02fdd80;hp=21e09252a376022eb9743ffdc39d2f4d86e37e4d;hpb=a5a33953ba9c8ca6a17531df5fa17181d59467c5;p=collectd.git diff --git a/src/curl_xml.c b/src/curl_xml.c index 21e09252..05d75c67 100644 --- a/src/curl_xml.c +++ b/src/curl_xml.c @@ -116,7 +116,7 @@ static size_t cx_curl_callback (void *buf, /* {{{ */ return (0); } - if (len == 0) + if (len == 0) return (len); if ((db->buffer_fill + len) >= db->buffer_size) @@ -641,7 +641,7 @@ static int cx_curl_perform (cx_t *db, CURL *curl) /* {{{ */ return (-1); } if (db->stats != NULL) - curl_stats_dispatch (db->stats, db->curl, cx_host (db), "curl_xml", db->instance, NULL); + curl_stats_dispatch (db->stats, db->curl, cx_host (db), "curl_xml", db->instance); curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url); curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &rc); @@ -1024,7 +1024,7 @@ static int cx_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) @@ -1033,7 +1033,6 @@ static int cx_config_add_url (oconfig_item_t *ci) /* {{{ */ DEBUG ("curl_xml plugin: Registering new read callback: %s", db->instance); - memset (&ud, 0, sizeof (ud)); ud.data = (void *) db; ud.free_func = cx_free;