From: Jens Axboe Date: Mon, 23 Jul 2007 09:23:26 +0000 (+0200) Subject: Remove gotos from read_iolog_get() X-Git-Tag: fio-1.17~63 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=b3f4b4f51e05b019ee9e5fddb9232975cf15ce93;ds=sidebyside Remove gotos from read_iolog_get() Signed-off-by: Jens Axboe --- 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; } }