projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1832 from rubenk/check-for-c99-compiler
[collectd.git]
/
src
/
curl_xml.c
diff --git
a/src/curl_xml.c
b/src/curl_xml.c
index
21e0925
..
253356c
100644
(file)
--- a/
src/curl_xml.c
+++ b/
src/curl_xml.c
@@
-20,6
+20,7
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "configfile.h"
#include "common.h"
#include "plugin.h"
#include "configfile.h"
@@
-116,7
+117,7
@@
static size_t cx_curl_callback (void *buf, /* {{{ */
return (0);
}
return (0);
}
-
if (len == 0)
+ if (len == 0)
return (len);
if ((db->buffer_fill + len) >= db->buffer_size)
return (len);
if ((db->buffer_fill + len) >= db->buffer_size)
@@
-641,7
+642,7
@@
static int cx_curl_perform (cx_t *db, CURL *curl) /* {{{ */
return (-1);
}
if (db->stats != NULL)
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);
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url);
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &rc);
@@
-1024,7
+1025,7
@@
static int cx_config_add_url (oconfig_item_t *ci) /* {{{ */
/* If all went well, register this database for reading */
if (status == 0)
{
/* 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)
char *cb_name;
if (db->instance == NULL)
@@
-1033,7
+1034,6
@@
static int cx_config_add_url (oconfig_item_t *ci) /* {{{ */
DEBUG ("curl_xml plugin: Registering new read callback: %s",
db->instance);
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;
ud.data = (void *) db;
ud.free_func = cx_free;