projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.5'
[collectd.git]
/
src
/
utils_fbhash.c
diff --git
a/src/utils_fbhash.c
b/src/utils_fbhash.c
index
cbd1506
..
d1a580c
100644
(file)
--- a/
src/utils_fbhash.c
+++ b/
src/utils_fbhash.c
@@
-27,8
+27,6
@@
#include "collectd.h"
#include "plugin.h"
#include "collectd.h"
#include "plugin.h"
-#include <pthread.h>
-
#include "utils_fbhash.h"
#include "utils_avltree.h"
#include "utils_fbhash.h"
#include "utils_avltree.h"
@@
-93,7
+91,7
@@
static int fbh_read_file (fbhash_t *h) /* {{{ */
return (-1);
}
return (-1);
}
- tree = c_avl_create ((
void *
) strcmp);
+ tree = c_avl_create ((
int (*) (const void *, const void *)
) strcmp);
if (tree == NULL)
{
fclose (fh);
if (tree == NULL)
{
fclose (fh);
@@
-209,10
+207,9
@@
fbhash_t *fbh_create (const char *file) /* {{{ */
if (file == NULL)
return (NULL);
if (file == NULL)
return (NULL);
- h =
malloc (
sizeof (*h));
+ h =
calloc (1,
sizeof (*h));
if (h == NULL)
return (NULL);
if (h == NULL)
return (NULL);
- memset (h, 0, sizeof (*h));
h->filename = strdup (file);
if (h->filename == NULL)
h->filename = strdup (file);
if (h->filename == NULL)