processes: re-add <sys/user.h> inclusion
[collectd.git] / src / routeros.c
index d61ffe9..b29ff2b 100644 (file)
@@ -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)