]> git.ipfire.org Git - thirdparty/iproute2.git/commit
lnstat: review lnstat_update()
authorPhil Sutter <phil@nwl.cc>
Sat, 28 Nov 2015 00:00:01 +0000 (01:00 +0100)
committerStephen Hemminger <shemming@brocade.com>
Sun, 29 Nov 2015 19:48:24 +0000 (11:48 -0800)
commitdb3ef44c5433aa50bae6f88736ad350fb14fc2cf
tree8dc128b971d6ed4a99657a39491173ed6cc30067
parentfc31817d1f2ee8098b875a8b122f136a7564e339
lnstat: review lnstat_update()

Instead of calling rewind() and fgets() before every call to
scan_lines(), move them into scan_lines() itself.

This should also fix compat mode, as before the second call to
scan_lines() the first line was skipped unconditionally.

Signed-off-by: Phil Sutter <phil@nwl.cc>
misc/lnstat_util.c