projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1699 from tokkee/sh/grpc
[collectd.git]
/
src
/
daemon
/
utils_llist.c
diff --git
a/src/daemon/utils_llist.c
b/src/daemon/utils_llist.c
index
4265286
..
1a6188f
100644
(file)
--- a/
src/daemon/utils_llist.c
+++ b/
src/daemon/utils_llist.c
@@
-48,12
+48,10
@@
llist_t *llist_create (void)
{
llist_t *ret;
{
llist_t *ret;
- ret =
(llist_t *) malloc (sizeof (llist_
t));
+ ret =
calloc (1, sizeof (*re
t));
if (ret == NULL)
return (NULL);
if (ret == NULL)
return (NULL);
- memset (ret, '\0', sizeof (llist_t));
-
return (ret);
}
return (ret);
}
@@
-78,7
+76,7
@@
llentry_t *llentry_create (char *key, void *value)
{
llentry_t *e;
{
llentry_t *e;
- e =
(llentry_t *) malloc (sizeof (llentry_t
));
+ e =
malloc (sizeof (*e
));
if (e)
{
e->key = key;
if (e)
{
e->key = key;