X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frouteros.c;h=b29ff2bdbeb5f1703ca7533dc71331a3ee5f7da7;hb=e61246f70a8e81b034db36f2dd20ea0086198808;hp=d61ffe984d36cfa2eaa3b74efce9872abdc9d648;hpb=ab6ab6ad6428ba0a0987a20a7d1cfa47d6cc6f8b;p=collectd.git diff --git a/src/routeros.c b/src/routeros.c index d61ffe98..b29ff2bd 100644 --- a/src/routeros.c +++ b/src/routeros.c @@ -326,7 +326,7 @@ static int cr_config_router (oconfig_item_t *ci) /* {{{ */ router_data = malloc (sizeof (*router_data)); if (router_data == NULL) return (-1); - memset (router_data, 0, sizeof (router_data)); + memset (router_data, 0, sizeof (*router_data)); router_data->connection = NULL; router_data->node = NULL; router_data->service = NULL; @@ -341,7 +341,7 @@ static int cr_config_router (oconfig_item_t *ci) /* {{{ */ if (strcasecmp ("Host", child->key) == 0) status = cf_util_get_string (child, &router_data->node); else if (strcasecmp ("Port", child->key) == 0) - status = cf_util_get_string (child, &router_data->service); + status = cf_util_get_service (child, &router_data->service); else if (strcasecmp ("User", child->key) == 0) status = cf_util_get_string (child, &router_data->username); else if (strcasecmp ("Password", child->key) == 0)