X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fwrite_log.c;h=7260615e34d73d54a233437fba921f08d9827174;hb=f77a55966249c8c185b5e3b11000dccacfd91beb;hp=e37aae9fd594fcce3ecd6d5abac7a6fb33adf32c;hpb=092e0c8763ef268918fb8117be9579d375ac8cfc;p=collectd.git diff --git a/src/write_log.c b/src/write_log.c index e37aae9f..7260615e 100644 --- a/src/write_log.c +++ b/src/write_log.c @@ -26,23 +26,19 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" -#include "configfile.h" #include "utils_format_graphite.h" -/* Folks without pthread will need to disable this plugin. */ -#include - -#include #include #define WL_BUF_SIZE 8192 static int wl_write_messages (const data_set_t *ds, const value_list_t *vl) { - char buffer[WL_BUF_SIZE]; + char buffer[WL_BUF_SIZE] = { 0 }; int status; if (0 != strcmp (ds->type, vl->type)) @@ -52,7 +48,6 @@ static int wl_write_messages (const data_set_t *ds, const value_list_t *vl) return -1; } - memset (buffer, 0, sizeof (buffer)); status = format_graphite (buffer, sizeof (buffer), ds, vl, NULL, NULL, '_', 0); if (status != 0) /* error message has been printed already. */