X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Futils_latency.c;h=c6a1ff6669185746d9ea1da8e0e56553946f10d9;hb=08a2128ac248150b50f9c54c9c71f573e54df3c3;hp=b0ef3595f74d6750bc10c9c387bb69cd595bea6b;hpb=d80e639b0ac36e3aa87382c6da93ddc8c4b34170;p=collectd.git diff --git a/src/utils_latency.c b/src/utils_latency.c index b0ef3595..c6a1ff66 100644 --- a/src/utils_latency.c +++ b/src/utils_latency.c @@ -102,7 +102,7 @@ void change_bin_width (latency_counter_t *lc, size_t val) /* {{{ */ DEBUG("utils_latency: change_bin_width: fixed all bins"); } - DEBUG("utils_latency: change_bin_width: val-[%ld], oldBinWidth-[%d], " + DEBUG("utils_latency: change_bin_width: val-[%zu], oldBinWidth-[%d], " "newBinWidth-[%d], required_bin_width-[%f], " "required_bin_width_logbase2-[%f]", val, old_bin_width, new_bin_width, required_bin_width, @@ -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;