treewide: Use AF_UNSPEC consistently
[collectd.git] / src / curl_xml.c
index 21e0925..05d75c6 100644 (file)
@@ -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;