fix lio_listio return value in LIO_WAIT mode
authorSzabolcs Nagy <nsz@port70.net>
Sun, 13 Jan 2013 22:15:39 +0000 (23:15 +0100)
committerSzabolcs Nagy <nsz@port70.net>
Sun, 13 Jan 2013 22:15:39 +0000 (23:15 +0100)
src/aio/lio_listio.c

index 532b17c..64a6ebc 100644 (file)
@@ -109,7 +109,7 @@ int lio_listio(int mode, struct aiocb *restrict const *restrict cbs, int cnt, st
        if (mode == LIO_WAIT) {
                ret = lio_wait(st);
                free(st);
        if (mode == LIO_WAIT) {
                ret = lio_wait(st);
                free(st);
-               return 0;
+               return ret;
        }
 
        if (st) {
        }
 
        if (st) {