From: Kern Sibbald Date: Thu, 22 Aug 2002 17:36:05 +0000 (+0000) Subject: Simplify bls inner loop X-Git-Tag: Release-1.25~26 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=176d62cf23492024362d37740183cc4e6d3f432f;p=bacula%2Fbacula Simplify bls inner loop git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@117 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/bls.c b/bacula/src/stored/bls.c index 94086f6057..53fbcf690c 100644 --- a/bacula/src/stored/bls.c +++ b/bacula/src/stored/bls.c @@ -504,7 +504,7 @@ Warning, this Volume is a continuation of Volume %s\n", } record = 0; - for ( ;; ) { + for (rec->state=0;!(rec->state & REC_BLOCK_EMPTY); ) { if (!read_record_from_block(block, rec)) { if (rec->state & REC_NO_HEADER) { Dmsg2(30, "!read,nohdr-break. stat=%s blk=%d\n", rec_state_to_str(rec), @@ -584,13 +584,7 @@ Warning, this Volume is a continuation of Volume %s\n", break; /* yes, get out */ } rec->remainder = 0; - if (rec->state & REC_BLOCK_EMPTY) { - Dmsg0(100, "Empty, break.\n"); - break; /* don't want record, read next block */ - } else { - Dmsg0(100, "Label, continue.\n"); - continue; /* we don't want record, read next one */ - } + continue; /* we don't want record, read next one */ } /* end if label record */ /* @@ -603,13 +597,7 @@ Warning, this Volume is a continuation of Volume %s\n", rec->FileIndex); } rec->remainder = 0; - if (rec->state & REC_BLOCK_EMPTY) { - Dmsg0(100, "Empty, break.\n"); - break; /* don't want record, read next block */ - } else { - Dmsg0(100, "BSR reject, continue.\n"); - continue; /* we don't want record, read next one */ - } + continue; /* we don't want record, read next one */ } if (rec->state & REC_PARTIAL_RECORD) { Dmsg6(10, "Partial, break. recno=%d state=%s blk=%d SI=%d ST=%d FI=%d\n", record,