]> xenbits.xensource.com Git - people/pauldu/mini-os.git/commit
Mini-OS: netfront: fix off-by-one error introduced in 7c8f3483
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 1 Apr 2016 18:17:01 +0000 (20:17 +0200)
committerWei Liu <wei.liu2@citrix.com>
Fri, 15 Apr 2016 10:05:24 +0000 (11:05 +0100)
commit5c70e2a1b3beae7222580c01e2cbac1685a03903
tree97cf4f9c04ccd11d3dc903eb8698b7124035bf24
parent89268f00b0b0215057cb74edd94e866536a02489
Mini-OS: netfront: fix off-by-one error introduced in 7c8f3483

7c8f3483 introduced a break within a loop in netfront.c such that
cons and nr_consumed were no longer always being incremented. The
offset at cons will be processed multiple times with the break in
place.

This commit reverts to using the "some" variable in the loop condition,
but avoids ifdefs for the non-libc case. It also renames it to dobreak
to make its usage clearer.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Sarah Newman <srn@prgmr.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
netfront.c