Commit 0bbdfb35 authored by marko's avatar marko

branches/zip: recv_scan_log_recs(): Replace while with do...while,

because the termination condition will always hold on the first iteration.
parent 3544592f
...@@ -2415,8 +2415,7 @@ recv_scan_log_recs( ...@@ -2415,8 +2415,7 @@ recv_scan_log_recs(
scanned_lsn = start_lsn; scanned_lsn = start_lsn;
more_data = FALSE; more_data = FALSE;
while (log_block < buf + len && !finished) { do {
no = log_block_get_hdr_no(log_block); no = log_block_get_hdr_no(log_block);
/* /*
fprintf(stderr, "Log block header no %lu\n", no); fprintf(stderr, "Log block header no %lu\n", no);
...@@ -2546,10 +2545,11 @@ recv_scan_log_recs( ...@@ -2546,10 +2545,11 @@ recv_scan_log_recs(
/* Log data for this group ends here */ /* Log data for this group ends here */
finished = TRUE; finished = TRUE;
break;
} else { } else {
log_block += OS_FILE_LOG_BLOCK_SIZE; log_block += OS_FILE_LOG_BLOCK_SIZE;
} }
} } while (log_block < buf + len && !finished);
*group_scanned_lsn = scanned_lsn; *group_scanned_lsn = scanned_lsn;
......
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