Commit 606bc93a authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

bfd: move the optimization in a proper place

Currently this optimization skips unscanned data
and doesn't work. Lets skip scanned data only.

Reported-by: Jenkins
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent cfce460b
......@@ -141,16 +141,17 @@ again:
return b->pos;
}
/* no full line in the buffer -- refill one */
if (brefill(f))
return BREADERR;
/*
* small optimization -- we've scanned b->bleft
* symols already, no need to re-scan them after
* the buffer refill.
*/
ss = b->bleft;
/* no full line in the buffer -- refill one */
if (brefill(f))
return BREADERR;
refilled = true;
goto again;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment