projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix typographical mistake in warning message
[collectd.git]
/
src
/
utils_curl_stats.c
diff --git
a/src/utils_curl_stats.c
b/src/utils_curl_stats.c
index
ff2eb64
..
0509ff4
100644
(file)
--- a/
src/utils_curl_stats.c
+++ b/
src/utils_curl_stats.c
@@
-25,6
+25,7
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "utils_curl_stats.h"
#include "common.h"
#include "utils_curl_stats.h"
@@
-159,16
+160,15
@@
static bool field_enabled (curl_stats_t *s, size_t offset)
curl_stats_t *curl_stats_from_config (oconfig_item_t *ci)
{
curl_stats_t *s;
curl_stats_t *curl_stats_from_config (oconfig_item_t *ci)
{
curl_stats_t *s;
- int i;
if (ci == NULL)
return NULL;
if (ci == NULL)
return NULL;
- s = calloc (
sizeof (*s), 1
);
+ s = calloc (
1, sizeof (*s)
);
if (s == NULL)
return NULL;
if (s == NULL)
return NULL;
- for (i = 0; i < ci->children_num; ++i)
+ for (i
nt i
= 0; i < ci->children_num; ++i)
{
oconfig_item_t *c = ci->children + i;
size_t field;
{
oconfig_item_t *c = ci->children + i;
size_t field;
@@
-210,7
+210,6
@@
int curl_stats_dispatch (curl_stats_t *s, CURL *curl,
const char *hostname, const char *plugin, const char *plugin_instance)
{
value_list_t vl = VALUE_LIST_INIT;
const char *hostname, const char *plugin, const char *plugin_instance)
{
value_list_t vl = VALUE_LIST_INIT;
- size_t field;
if (s == NULL)
return 0;
if (s == NULL)
return 0;
@@
-228,7
+227,7
@@
int curl_stats_dispatch (curl_stats_t *s, CURL *curl,
if (plugin_instance != NULL)
sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));
if (plugin_instance != NULL)
sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));
- for (field = 0; field < STATIC_ARRAY_SIZE (field_specs); ++field)
+ for (
size_t
field = 0; field < STATIC_ARRAY_SIZE (field_specs); ++field)
{
int status;
{
int status;