projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
collectd-tg: Fix unintentional cast from double to time_t.
[collectd.git]
/
src
/
write_sensu.c
diff --git
a/src/write_sensu.c
b/src/write_sensu.c
index
f7803e8
..
791acb3
100644
(file)
--- a/
src/write_sensu.c
+++ b/
src/write_sensu.c
@@
-329,7
+329,7
@@
static char *sensu_value_to_json(struct sensu_host const *host, /* {{{ */
{
char name_buffer[5 * DATA_MAX_NAME_LEN];
char service_buffer[6 * DATA_MAX_NAME_LEN];
{
char name_buffer[5 * DATA_MAX_NAME_LEN];
char service_buffer[6 * DATA_MAX_NAME_LEN];
-
in
t i;
+
size_
t i;
char *ret_str;
char *temp_str;
char *value_str;
char *ret_str;
char *temp_str;
char *value_str;
@@
-641,7
+641,7
@@
static char *sensu_notification_to_json(struct sensu_host *host, /* {{{ */
char *ret_str;
char *temp_str;
int status;
char *ret_str;
char *temp_str;
int status;
-
in
t i;
+
size_
t i;
int res;
// add the severity/status
switch (n->severity) {
int res;
// add the severity/status
switch (n->severity) {
@@
-883,7
+883,7
@@
static int sensu_write(const data_set_t *ds, /* {{{ */
int statuses[vl->values_len];
struct sensu_host *host = ud->data;
gauge_t *rates = NULL;
int statuses[vl->values_len];
struct sensu_host *host = ud->data;
gauge_t *rates = NULL;
-
in
t i;
+
size_
t i;
char *msg;
pthread_mutex_lock(&host->lock);
char *msg;
pthread_mutex_lock(&host->lock);
@@
-897,7
+897,7
@@
static int sensu_write(const data_set_t *ds, /* {{{ */
return -1;
}
}
return -1;
}
}
- for (i = 0; i <
(size_t)
vl->values_len; i++) {
+ for (i = 0; i < vl->values_len; i++) {
msg = sensu_value_to_json(host, ds, vl, (int) i, rates, statuses[i]);
if (msg == NULL) {
sfree(rates);
msg = sensu_value_to_json(host, ds, vl, (int) i, rates, statuses[i]);
if (msg == NULL) {
sfree(rates);