projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AUTHORS: I take care of EPEL too
[collectd.git]
/
src
/
amqp.c
diff --git
a/src/amqp.c
b/src/amqp.c
index
9bc3175
..
89f051e
100644
(file)
--- a/
src/amqp.c
+++ b/
src/amqp.c
@@
-27,6
+27,7
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "utils_cmd_putval.h"
#include "common.h"
#include "plugin.h"
#include "utils_cmd_putval.h"
@@
-527,13
+528,11
@@
static int camqp_connect (camqp_config_t *conf) /* {{{ */
static int camqp_shutdown (void) /* {{{ */
{
static int camqp_shutdown (void) /* {{{ */
{
- size_t i;
-
DEBUG ("amqp plugin: Shutting down %zu subscriber threads.",
subscriber_threads_num);
subscriber_threads_running = 0;
DEBUG ("amqp plugin: Shutting down %zu subscriber threads.",
subscriber_threads_num);
subscriber_threads_running = 0;
- for (i = 0; i < subscriber_threads_num; i++)
+ for (
size_t
i = 0; i < subscriber_threads_num; i++)
{
/* FIXME: Sending a signal is not very elegant here. Maybe find out how
* to use a timeout in the thread and check for the variable in regular
{
/* FIXME: Sending a signal is not very elegant here. Maybe find out how
* to use a timeout in the thread and check for the variable in regular
@@
-821,7
+820,6
@@
static int camqp_write (const data_set_t *ds, const value_list_t *vl, /* {{{ */
}
else
{
}
else
{
- size_t i;
ssnprintf (routing_key, sizeof (routing_key), "collectd/%s/%s/%s/%s/%s",
vl->host,
vl->plugin, vl->plugin_instance,
ssnprintf (routing_key, sizeof (routing_key), "collectd/%s/%s/%s/%s/%s",
vl->host,
vl->plugin, vl->plugin_instance,
@@
-829,7
+827,7
@@
static int camqp_write (const data_set_t *ds, const value_list_t *vl, /* {{{ */
/* Switch slashes (the only character forbidden by collectd) and dots
* (the separation character used by AMQP). */
/* Switch slashes (the only character forbidden by collectd) and dots
* (the separation character used by AMQP). */
- for (i = 0; routing_key[i] != 0; i++)
+ for (
size_t
i = 0; routing_key[i] != 0; i++)
{
if (routing_key[i] == '.')
routing_key[i] = '/';
{
if (routing_key[i] == '.')
routing_key[i] = '/';
@@
-919,7
+917,6
@@
static int camqp_config_connection (oconfig_item_t *ci, /* {{{ */
{
camqp_config_t *conf;
int status;
{
camqp_config_t *conf;
int status;
- int i;
conf = calloc (1, sizeof (*conf));
if (conf == NULL)
conf = calloc (1, sizeof (*conf));
if (conf == NULL)
@@
-966,7
+963,7
@@
static int camqp_config_connection (oconfig_item_t *ci, /* {{{ */
return (status);
}
return (status);
}
- for (i = 0; i < ci->children_num; i++)
+ for (i
nt i
= 0; i < ci->children_num; i++)
{
oconfig_item_t *child = ci->children + i;
{
oconfig_item_t *child = ci->children + i;
@@
-1099,9
+1096,7
@@
static int camqp_config_connection (oconfig_item_t *ci, /* {{{ */
static int camqp_config (oconfig_item_t *ci) /* {{{ */
{
static int camqp_config (oconfig_item_t *ci) /* {{{ */
{
- int i;
-
- for (i = 0; i < ci->children_num; i++)
+ for (int i = 0; i < ci->children_num; i++)
{
oconfig_item_t *child = ci->children + i;
{
oconfig_item_t *child = ci->children + i;