always init interface list for stats

This commit is contained in:
Doug MacEachern 2005-12-12 18:01:28 +00:00
parent 9414b07011
commit 8bc0f0d245
1 changed files with 2 additions and 4 deletions

View File

@ -1729,10 +1729,8 @@ int sigar_net_interface_stat_get(sigar_t *sigar, const char *name,
ifmsg_iter_t iter; ifmsg_iter_t iter;
struct if_msghdr *ifm; struct if_msghdr *ifm;
if (sigar->ifconf_len == 0) { if ((status = sigar_ifmsg_init(sigar)) != SIGAR_OK) {
if ((status = sigar_ifmsg_init(sigar)) != SIGAR_OK) { return status;
return status;
}
} }
iter.type = IFMSG_ITER_GET; iter.type = IFMSG_ITER_GET;