X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fwrite_log.c;h=3c599784bb835b20ad45a3772ef36acc3d41d8ae;hb=141816828389e3ad98f66db29b4a702479dcb05d;hp=ebf0e12445cc9e9e3900a8416c3cedcf6db1a9eb;hpb=7531a36086295c02ccb2d78c41d355a424426607;p=collectd.git diff --git a/src/write_log.c b/src/write_log.c index ebf0e124..3c599784 100644 --- a/src/write_log.c +++ b/src/write_log.c @@ -26,22 +26,20 @@ **/ #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 #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)) @@ -51,7 +49,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. */