Skip to content

Commit 0cfbc57

Browse files
committed
rgw: fix bug with rgw-gap-list
rgw-gap-list would fail if it it reached the end of the second file before the first, thereby causing an infinite loop. Signed-off-by: J. Eric Ivancich <[email protected]> Signed-off-by: Michael J. Kidd <[email protected]>
1 parent bdd6ce2 commit 0cfbc57

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/rgw/rgw-gap-list

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,12 @@ BEGIN {
400400
f1_count++
401401
if(f2_eof==0) {
402402
if(test_lines()==2) {
403-
while ($1>b[1]) {
403+
while ($1>b[1] && !f2_eof) {
404404
advance_f2()
405405
}
406+
if (f2_eof) {
407+
line_out()
408+
}
406409
test_lines()
407410
}
408411
} else {

0 commit comments

Comments
 (0)