From b3f4b4f51e05b019ee9e5fddb9232975cf15ce93 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 23 Jul 2007 11:23:26 +0200 Subject: [PATCH] Remove gotos from read_iolog_get() Signed-off-by: Jens Axboe --- log.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/log.c b/log.c index b5c6f690..92bcebfc 100644 --- a/log.c +++ b/log.c @@ -57,8 +57,7 @@ int read_iolog_get(struct thread_data *td, struct io_u *io_u) { struct io_piece *ipo; -restart: - if (!list_empty(&td->io_log_list)) { + while (!list_empty(&td->io_log_list)) { ipo = list_entry(td->io_log_list.next, struct io_piece, list); list_del(&ipo->list); @@ -71,11 +70,11 @@ restart: if (ipo->file_action == FIO_LOG_OPEN_FILE) { assert(!td_io_open_file(td, f)); free(ipo); - goto restart; + continue; } else if (ipo->file_action == FIO_LOG_CLOSE_FILE) { td_io_close_file(td, f); free(ipo); - goto restart; + continue; } } -- 2.25.1