X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fethstat.c;h=08381a821087e275fb03922a32bc54c35ca7c3cd;hb=77311aed583ac4566d76f1ce3a1dc9deae2e59dc;hp=ae1b68931d898830cca2a67e9aa2cc8034371803;hpb=fda68e239798cea197a225ed5325f5bb3c2e70de;p=collectd.git diff --git a/src/ethstat.c b/src/ethstat.c index ae1b6893..08381a82 100644 --- a/src/ethstat.c +++ b/src/ethstat.c @@ -66,6 +66,7 @@ static int ethstat_add_interface (const oconfig_item_t *ci) /* {{{ */ if (tmp == NULL) return (-1); interfaces = tmp; + interfaces[interfaces_num] = NULL; status = cf_util_get_string (ci, interfaces + interfaces_num); if (status != 0) @@ -104,7 +105,7 @@ static int ethstat_add_map (const oconfig_item_t *ci) /* {{{ */ memset (map, 0, sizeof (*map)); sstrncpy (map->type, ci->values[1].value.string, sizeof (map->type)); - if (ci->values_num == 2) + if (ci->values_num == 3) sstrncpy (map->type_instance, ci->values[2].value.string, sizeof (map->type_instance));