projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f69e0a
)
netlink plugin: malloc + memset -> calloc
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 1 Apr 2016 15:22:16 +0000
(17:22 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 1 Apr 2016 15:22:16 +0000
(17:22 +0200)
src/netlink.c
patch
|
blob
|
history
diff --git
a/src/netlink.c
b/src/netlink.c
index
c5f66f8
..
c8905d5
100644
(file)
--- a/
src/netlink.c
+++ b/
src/netlink.c
@@
-109,12
+109,10
@@
static int add_ignorelist (const char *dev, const char *type,
{
ir_ignorelist_t *entry;
- entry =
malloc (
sizeof (*entry));
+ entry =
calloc (1,
sizeof (*entry));
if (entry == NULL)
return (-1);
- memset (entry, '\0', sizeof (ir_ignorelist_t));
-
if (strcasecmp (dev, "All") != 0)
{
entry->device = strdup (dev);