make rangeset_report_ranges() report all ranges

find_range() returns NULL when s is below the lowest range, so we have
to use first_range() here (which is as good performance wise), or else
no range gets reported at all in that case.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
master commit: b1c780cd31
master date: 2015-07-15 16:11:42 +0200
This commit is contained in:
Jan Beulich committed 2015-07-21 11:12:35 +02:00
1 parent cf423e947a
commit aa885a0c03
1 file changed
+1 -1
+1 -1
View File
@@ -289,7 +289,7 @@ int rangeset_report_ranges(
read_lock(&r->lock);
for ( x = find_range(r, s); x && (x->s <= e) && !rc; x = next_range(r, x) )
for ( x = first_range(r); x && (x->s <= e) && !rc; x = next_range(r, x) )
if ( x->e >= s )
rc = cb(max(x->s, s), min(x->e, e), ctxt);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.