about summary refs log tree commit diff
path: root/rt
diff options
context:
space:
mode:
Diffstat (limited to 'rt')
-rw-r--r--rt/aio_misc.c6
-rw-r--r--rt/lio_listio.c14
2 files changed, 10 insertions, 10 deletions
diff --git a/rt/aio_misc.c b/rt/aio_misc.c
index b26558ac39..46f77b272b 100644
--- a/rt/aio_misc.c
+++ b/rt/aio_misc.c
@@ -1,5 +1,5 @@
 /* Handle general operations.
-   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -115,7 +115,7 @@ get_elem (void)
 	  pool = new_tab;
 	}
 
-      /* Allocat the new row.  */
+      /* Allocate the new row.  */
       cnt = pool_size == 0 ? optim.aio_num : ENTRIES_PER_ROW;
       new_row = (struct requestlist *) calloc (cnt,
 					       sizeof (struct requestlist));
@@ -414,7 +414,7 @@ __aio_enqueue_request (aiocb_union *aiocbp, int operation)
 	    ++nthreads;
 	  else
 	    {
-	      /* Reset the running flat.  The new request is not running.  */
+	      /* Reset the running flag.  The new request is not running.  */
 	      running = newp->running = yes;
 
 	      if (nthreads == 0)
diff --git a/rt/lio_listio.c b/rt/lio_listio.c
index 37ddb84ef5..aa267a8e31 100644
--- a/rt/lio_listio.c
+++ b/rt/lio_listio.c
@@ -1,5 +1,5 @@
 /* Enqueue and list of read or write requests.
-   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -70,8 +70,8 @@ lio_listio (mode, list, nent, sig)
     if (list[cnt] != NULL && list[cnt]->aio_lio_opcode != LIO_NOP)
       {
 	list[cnt]->aio_sigevent.sigev_notify = SIGEV_NONE;
-	requests[cnt] =  __aio_enqueue_request ((aiocb_union *) list[cnt],
-						list[cnt]->aio_lio_opcode);
+	requests[cnt] = __aio_enqueue_request ((aiocb_union *) list[cnt],
+					       list[cnt]->aio_lio_opcode);
 
 	if (requests[cnt] != NULL)
 	  /* Successfully enqueued.  */
@@ -81,6 +81,8 @@ lio_listio (mode, list, nent, sig)
 	     of the aiocb will tell more.  */
 	  result = -1;
       }
+    else
+      requests[cnt] = NULL;
 
   if (total == 0)
     {
@@ -106,8 +108,7 @@ lio_listio (mode, list, nent, sig)
 
       total = 0;
       for (cnt = 0; cnt < nent; ++cnt)
-	if (list[cnt] != NULL && list[cnt]->aio_lio_opcode != LIO_NOP
-	    && requests[cnt] != NULL)
+	if (requests[cnt] != NULL && list[cnt]->aio_lio_opcode != LIO_NOP)
 	  {
 	    waitlist[cnt].cond = &cond;
 	    waitlist[cnt].next = requests[cnt]->waiting;
@@ -153,8 +154,7 @@ lio_listio (mode, list, nent, sig)
 	  total = 0;
 
 	  for (cnt = 0; cnt < nent; ++cnt)
-	    if (list[cnt] != NULL && list[cnt]->aio_lio_opcode != LIO_NOP
-		&& requests[cnt] != NULL)
+	    if (requests[cnt] != NULL && list[cnt]->aio_lio_opcode != LIO_NOP)
 	      {
 		waitlist->list[cnt].cond = NULL;
 		waitlist->list[cnt].next = requests[cnt]->waiting;