mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2026-01-06 03:30:35 +00:00
Fix sum of first field (entries).
(Logical change 1.172)
This commit is contained in:
parent
e796b9587a
commit
f5f1a6c583
@ -52,8 +52,13 @@ static int scan_lines(struct lnstat_file *lf, int i)
|
||||
fgets(buf, sizeof(buf)-1, lf->fp);
|
||||
gettimeofday(&lf->last_read, NULL);
|
||||
|
||||
for (j = 0; j < lf->num_fields; j++)
|
||||
lf->fields[j].values[i] += strtoul(ptr, &ptr, 16);
|
||||
for (j = 0; j < lf->num_fields; j++) {
|
||||
unsigned long f = strtoul(ptr, &ptr, 16);
|
||||
if (j == 0)
|
||||
lf->fields[j].values[i] += f;
|
||||
else
|
||||
lf->fields[j].values[i] += f;
|
||||
}
|
||||
}
|
||||
return num_lines;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user