projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ntpd: Check STA_NANO in the server status
[collectd.git]
/
src
/
write_tsdb.c
diff --git
a/src/write_tsdb.c
b/src/write_tsdb.c
index
c562596
..
2bd2707
100644
(file)
--- a/
src/write_tsdb.c
+++ b/
src/write_tsdb.c
@@
-48,7
+48,6
@@
#include "utils_cache.h"
#include "utils_cache.h"
-#include <pthread.h>
#include <netdb.h>
#ifndef WT_DEFAULT_NODE
#include <netdb.h>
#ifndef WT_DEFAULT_NODE
@@
-142,7
+141,7
@@
static int wt_flush_nolock(cdtime_t timeout, struct wt_callback *cb)
return 0;
}
return 0;
}
- if (cb->send_buf_fill
<
= 0)
+ if (cb->send_buf_fill
=
= 0)
{
cb->send_buf_init_time = cdtime();
return 0;
{
cb->send_buf_init_time = cdtime();
return 0;
@@
-579,13
+578,12
@@
static int wt_config_tsd(oconfig_item_t *ci)
char callback_name[DATA_MAX_NAME_LEN];
int i;
char callback_name[DATA_MAX_NAME_LEN];
int i;
- cb =
malloc(
sizeof(*cb));
+ cb =
calloc(1,
sizeof(*cb));
if (cb == NULL)
{
if (cb == NULL)
{
- ERROR("write_tsdb plugin:
m
alloc failed.");
+ ERROR("write_tsdb plugin:
c
alloc failed.");
return -1;
}
return -1;
}
- memset(cb, 0, sizeof(*cb));
cb->sock_fd = -1;
cb->node = NULL;
cb->service = NULL;
cb->sock_fd = -1;
cb->node = NULL;
cb->service = NULL;