From: Davide Libenzi Date: Thu, 22 Mar 2007 06:43:50 +0000 (+0100) Subject: Avoid "ts" going out of scope. X-Git-Tag: fio-1.15~50 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=4d06a3384c0bf34d217fa942d85dc70dfc282da9 Avoid "ts" going out of scope. Signed-off-by: Jens Axboe --- 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) {