|
|
Message-ID: <1371333657.16425.350.camel@eris.loria.fr>
Date: Sun, 16 Jun 2013 00:01:20 +0200
From: Jens Gustedt <Jens.Gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: [PATCH] bugfix: initialize a state variable in lio_wait
got_err was only set to 1 in case of error, but never written
otherwise. This resulted in situations where lio_listio returned -1 for a
request with cnt == 1, but where that sole request had completed.
---
src/aio/lio_listio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/aio/lio_listio.c b/src/aio/lio_listio.c
index 64a6ebc..07145dd 100644
--- a/src/aio/lio_listio.c
+++ b/src/aio/lio_listio.c
@@ -13,7 +13,7 @@ struct lio_state {
static int lio_wait(struct lio_state *st)
{
- int i, err, got_err;
+ int i, err, got_err = 0;
int cnt = st->cnt;
struct aiocb **cbs = st->cbs;
--
1.7.9.5
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.