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 <ivancich@redhat.com>
Signed-off-by: Michael J. Kidd <linuxkidd@gmail.com>
(cherry picked from commit
0cfbc57d2c43ea88845561f14e295d0d48e44b32)
f1_count++
if(f2_eof==0) {
if(test_lines()==2) {
- while ($1>b[1]) {
+ while ($1>b[1] && !f2_eof) {
advance_f2()
}
+ if (f2_eof) {
+ line_out()
+ }
test_lines()
}
} else {