The IFLA_STATS branch declares __u32 *stats, shadowing the static stats[] name table at file scope. Rename it to ival, matching the field it is copied into. Signed-off-by: Stephen Hemminger <step…@networkplumber.org> --- misc/ifstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/ifstat.c b/misc/ifstat.c index ec59a9eb..319fc332 100644 --- a/misc/ifstat.c +++ b/misc/ifstat.c @@ -206,11 +206,11 @@ static int get_nlmsg(struct nlmsghdr *m, void *arg) if (tb[IFLA_STATS64]) { memcpy(&n->ival, RTA_DATA(tb[IFLA_STATS64]), sizeof(n->ival)); } else if (tb[IFLA_STATS]) { - __u32 *stats = RTA_DATA(tb[IFLA_STATS]); + __u32 *ival = RTA_DATA(tb[IFLA_STATS]); /* expand 32 bit values to 64 bit */ for (i = 0; i < MAXS; i++) - n->ival[i] = stats[i]; + n->ival[i] = ival[i]; } else { /* missing stats? */ free(n);
-- 2.53.0