From 0bbdfb3552cb58637edb4df8dd47920d0c6cebb7 Mon Sep 17 00:00:00 2001 From: marko <Unknown> Date: Thu, 3 Sep 2009 09:46:38 +0000 Subject: [PATCH] branches/zip: recv_scan_log_recs(): Replace while with do...while, because the termination condition will always hold on the first iteration. --- log/log0recv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/log/log0recv.c b/log/log0recv.c index aea29c7851..3b40925f07 100644 --- a/log/log0recv.c +++ b/log/log0recv.c @@ -2415,8 +2415,7 @@ recv_scan_log_recs( scanned_lsn = start_lsn; more_data = FALSE; - while (log_block < buf + len && !finished) { - + do { no = log_block_get_hdr_no(log_block); /* fprintf(stderr, "Log block header no %lu\n", no); @@ -2546,10 +2545,11 @@ recv_scan_log_recs( /* Log data for this group ends here */ finished = TRUE; + break; } else { log_block += OS_FILE_LOG_BLOCK_SIZE; } - } + } while (log_block < buf + len && !finished); *group_scanned_lsn = scanned_lsn; -- 2.30.9