projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
uuid plugin: some coding style cleanups
[collectd.git]
/
src
/
write_mongodb.c
diff --git
a/src/write_mongodb.c
b/src/write_mongodb.c
index
24151ce
..
8d9ed9d
100644
(file)
--- a/
src/write_mongodb.c
+++ b/
src/write_mongodb.c
@@
-29,13
+29,12
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "plugin.h"
#include "common.h"
#include "configfile.h"
#include "utils_cache.h"
#include "plugin.h"
#include "common.h"
#include "configfile.h"
#include "utils_cache.h"
-#include <pthread.h>
-
#if HAVE_STDINT_H
# define MONGO_HAVE_STDINT 1
#else
#if HAVE_STDINT_H
# define MONGO_HAVE_STDINT 1
#else
@@
-274,10
+273,9
@@
static int wm_config_node (oconfig_item_t *ci) /* {{{ */
int status;
int i;
int status;
int i;
- node =
malloc (
sizeof (*node));
+ node =
calloc (1,
sizeof (*node));
if (node == NULL)
return (ENOMEM);
if (node == NULL)
return (ENOMEM);
- memset (node, 0, sizeof (*node));
mongo_init (node->conn);
node->host = NULL;
node->store_rates = 1;
mongo_init (node->conn);
node->host = NULL;
node->store_rates = 1;