projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
collectd-tg: remove dead code
[collectd.git]
/
src
/
utils_latency.c
diff --git
a/src/utils_latency.c
b/src/utils_latency.c
index
7a607e4
..
41af00c
100644
(file)
--- a/
src/utils_latency.c
+++ b/
src/utils_latency.c
@@
-24,14
+24,14
@@
* Florian Forster <ff at octo.it>
**/
* Florian Forster <ff at octo.it>
**/
-#include <math.h>
-#include <limits.h>
-
#include "collectd.h"
#include "plugin.h"
#include "utils_latency.h"
#include "common.h"
#include "collectd.h"
#include "plugin.h"
#include "utils_latency.h"
#include "common.h"
+#include <math.h>
+#include <limits.h>
+
#ifndef LLONG_MAX
# define LLONG_MAX 9223372036854775807LL
#endif
#ifndef LLONG_MAX
# define LLONG_MAX 9223372036854775807LL
#endif
@@
-121,10
+121,9
@@
latency_counter_t *latency_counter_create (void) /* {{{ */
{
latency_counter_t *lc;
{
latency_counter_t *lc;
- lc =
malloc (
sizeof (*lc));
+ lc =
calloc (1,
sizeof (*lc));
if (lc == NULL)
return (NULL);
if (lc == NULL)
return (NULL);
- memset (lc, 0, sizeof (*lc));
latency_counter_reset (lc);
lc->bin_width = HISTOGRAM_DEFAULT_BIN_WIDTH;
latency_counter_reset (lc);
lc->bin_width = HISTOGRAM_DEFAULT_BIN_WIDTH;