commit | 4d06a3384c0bf34d217fa942d85dc70dfc282da9 | [log] [tgz] |
---|---|---|
author | Davide Libenzi <davidel@xmailserver.org> | Thu Mar 22 07:43:50 2007 +0100 |
committer | Jens Axboe <jens.axboe@oracle.com> | Thu Mar 22 07:43:50 2007 +0100 |
tree | c26d1dc24f6ab5d636b6096ea516dcf724a895d3 | |
parent | 46eaa15798658d1585a0827996b2c3b336b9bdf2 [diff] [blame] |
Avoid "ts" going out of scope. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/io_u.c b/io_u.c index fd25dfe..2b18e9f 100644 --- a/io_u.c +++ b/io_u.c
@@ -711,12 +711,10 @@ 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) {