From 4d06a3384c0bf34d217fa942d85dc70dfc282da9 Mon Sep 17 00:00:00 2001 From: Davide Libenzi Date: Thu, 22 Mar 2007 07:43:50 +0100 Subject: [PATCH] Avoid "ts" going out of scope. Signed-off-by: Jens Axboe --- io_u.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/io_u.c b/io_u.c index fd25dfe7..2b18e9f8 100644 --- a/io_u.c +++ b/io_u.c @@ -711,12 +711,10 @@ long io_u_queued_complete(struct thread_data *td, int min_events) struct io_completion_data icd; struct timespec *tvp = NULL; int ret; + struct timespec ts = { .tv_sec = 0, .tv_nsec = 0, }; - if (!min_events) { - struct timespec ts = { .tv_sec = 0, .tv_nsec = 0, }; - + if (!min_events) tvp = &ts; - } ret = td_io_getevents(td, min_events, td->cur_depth, tvp); if (ret < 0) { -- 2.25.1