X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fwrite_log.c;h=25ff55e2c509638481b96fd8c7035d23c3d73658;hb=3fae5596643f1e361eb18c3d65448f8bc02fdd80;hp=db09849fefc75aa2691a8c663be40f885b63a0fb;hpb=ab11d1b4db61f750f51be6e41dbe8320d3c65404;p=collectd.git diff --git a/src/write_log.c b/src/write_log.c index db09849f..25ff55e2 100644 --- a/src/write_log.c +++ b/src/write_log.c @@ -38,7 +38,7 @@ 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)) @@ -48,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. */