Sync'd with the HEAD branch again. unlabeled-3.5.24
authorcls%seawood.org
Tue, 21 Sep 1999 19:43:28 +0000
branchunlabeled-3.5.24
changeset 820 657777e12e74
parent 789 8d2fac0b3fdf
push idunknown
push userunknown
push dateunknown
Sync'd with the HEAD branch again.
pr/src/io/prmwait.c
--- a/pr/src/io/prmwait.c
+++ b/pr/src/io/prmwait.c
@@ -1055,65 +1055,63 @@ PR_IMPLEMENT(PRStatus) PR_CancelWaitFile
     }
 
     PR_Lock(group->ml);
 
     if (_prmw_running != group->state)
     {
         PR_SetError(PR_INVALID_STATE_ERROR, 0);
         rv = PR_FAILURE;
-        goto stopping;
+        goto unlock;
     }
 
 #ifdef WINNT
     if (InterlockedCompareExchange((PVOID *)&desc->outcome,
         (PVOID)PR_MW_INTERRUPT, (PVOID)PR_MW_PENDING) == (PVOID)PR_MW_PENDING)
     {
         PRFileDesc *bottom = PR_GetIdentitiesLayer(desc->fd, PR_NSPR_IO_LAYER);
         PR_ASSERT(NULL != bottom);
         if (NULL == bottom)
         {
             PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
-            goto invalid_arg;
+            goto unlock;
         }
         bottom->secret->state = _PR_FILEDESC_CLOSED;
 #if 0
         fprintf(stderr, "cancel wait recv: closing socket\n");
 #endif
         if (closesocket(bottom->secret->md.osfd) == SOCKET_ERROR)
         {
             fprintf(stderr, "closesocket failed: %d\n", WSAGetLastError());
             exit(1);
         }
     }
 #else
     if (NULL != (recv_wait = _MW_LookupInternal(group, desc->fd)))
     {
         /* it was in the wait table */
         _MW_DoneInternal(group, recv_wait, PR_MW_INTERRUPT);
-        goto found;
+        goto unlock;
     }
     if (!PR_CLIST_IS_EMPTY(&group->io_ready))
     {
         /* is it already complete? */
         PRCList *head = PR_LIST_HEAD(&group->io_ready);
         do
         {
             PRRecvWait *done = (PRRecvWait*)head;
-            if (done == desc) goto found;
+            if (done == desc) goto unlock;
             head = PR_NEXT_LINK(head);
         } while (head != &group->io_ready);
     }
     PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
     rv = PR_FAILURE;
 
-found:
 #endif
-stopping:
-invalid_arg:
+unlock:
     PR_Unlock(group->ml);
     return rv;
 }  /* PR_CancelWaitFileDesc */
 
 PR_IMPLEMENT(PRRecvWait*) PR_CancelWaitGroup(PRWaitGroup *group)
 {
     PRRecvWait **desc;
     PRRecvWait *recv_wait = NULL;