summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 442050c)
raw | patch | inline | side by side (parent: 442050c)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 15:12:14 +0000 (17:12 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 1 Apr 2016 15:12:14 +0000 (17:12 +0200) |
src/modbus.c | patch | blob | history |
diff --git a/src/modbus.c b/src/modbus.c
index d538fb3f717774bbc36b6c2eb7b7e1ff0919bc85..2605ec239182bf17315aa1563f38284d680fb13e 100644 (file)
--- a/src/modbus.c
+++ b/src/modbus.c
int status;
int i;
- host = malloc (sizeof (*host));
+ host = calloc (1, sizeof (*host));
if (host == NULL)
return (ENOMEM);
- memset (host, 0, sizeof (*host));
host->slaves = NULL;
status = cf_util_get_string_buffer (ci, host->host, sizeof (host->host));