From: Jens Axboe Date: Tue, 7 Apr 2009 10:51:45 +0000 (+0200) Subject: aio: fixed a signedness issue that could cause abort on strace X-Git-Tag: fio-1.25~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=de9937d1df38ef8ab837ef0fbf2831820d0775f4;p=fio.git aio: fixed a signedness issue that could cause abort on strace Signed-off-by: Jens Axboe --- diff --git a/engines/libaio.c b/engines/libaio.c index 4f1e0ed4..e452f1ca 100644 --- a/engines/libaio.c +++ b/engines/libaio.c @@ -64,11 +64,11 @@ static int fio_libaio_getevents(struct thread_data *td, unsigned int min, unsigned int max, struct timespec *t) { struct libaio_data *ld = td->io_ops->data; - long r; + int r; do { r = io_getevents(ld->aio_ctx, min, max, ld->aio_events, t); - if (r >= min) + if (r >= (int) min) break; else if (r == -EAGAIN) { usleep(100);