From: Florian Forster Date: Thu, 18 Jun 2015 15:45:52 +0000 (+0200) Subject: src/utils_latency.c: Fix "Assigned value is garbage or undefined" warning. X-Git-Tag: collectd-5.5.1~68^2~38 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=47e1dd8152a4f1ca7572410cba098bd71c5704ce;p=collectd.git src/utils_latency.c: Fix "Assigned value is garbage or undefined" warning. --- diff --git a/src/utils_latency.c b/src/utils_latency.c index dfdef611..893bded3 100644 --- a/src/utils_latency.c +++ b/src/utils_latency.c @@ -117,6 +117,7 @@ latency_counter_t *latency_counter_create () /* {{{ */ lc = malloc (sizeof (*lc)); if (lc == NULL) return (NULL); + memset (lc, 0, sizeof (*lc)); latency_counter_reset (lc); lc->bin_width = HISTOGRAM_DEFAULT_BIN_WIDTH;