X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fmemcached.c;h=0baf6c221835a5663b6ab032cb37f7ec7f886dd6;hb=abaa1c8a24e8eff5632dd6052b1da5f6535caf19;hp=95a9edad5e5135890864bd71802b9ac487351ae7;hpb=61a4ed99b1a5b6d371bb745933d0efc5dff9505c;p=collectd.git diff --git a/src/memcached.c b/src/memcached.c index 95a9edad..0baf6c22 100644 --- a/src/memcached.c +++ b/src/memcached.c @@ -32,8 +32,8 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #include #include @@ -69,7 +69,7 @@ struct memcached_s { }; typedef struct memcached_s memcached_t; -static bool memcached_have_instances = 0; +static bool memcached_have_instances; static void memcached_free(void *arg) { memcached_t *st = arg; @@ -475,7 +475,7 @@ static int memcached_read(user_data_t *user_data) { if (strsplit(line, fields, 3) != 3) continue; - int name_len = strlen(fields[1]); + size_t name_len = strlen(fields[1]); if (name_len == 0) continue; @@ -702,7 +702,7 @@ static int config_add_instance(oconfig_item_t *ci) { int status = 0; /* Disable automatic generation of default instance in the init callback. */ - memcached_have_instances = 1; + memcached_have_instances = true; memcached_t *st = calloc(1, sizeof(*st)); if (st == NULL) { @@ -797,7 +797,7 @@ static int memcached_init(void) { int status = memcached_add_read_callback(st); if (status == 0) - memcached_have_instances = 1; + memcached_have_instances = true; return status; } /* int memcached_init */