apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: apr-util/hooks apr_hooks.c
Date Sun, 11 Apr 2004 18:31:35 GMT
ben         2004/04/11 11:31:35

  Modified:    hooks    Tag: APU_0_9_BRANCH apr_hooks.c
  Log:
  Find the end of the dependency chain!
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.47.2.3  +15 -14    apr-util/hooks/apr_hooks.c
  
  Index: apr_hooks.c
  ===================================================================
  RCS file: /home/cvs/apr-util/hooks/apr_hooks.c,v
  retrieving revision 1.47.2.2
  retrieving revision 1.47.2.3
  diff -u -r1.47.2.2 -r1.47.2.3
  --- apr_hooks.c	11 Apr 2004 18:10:49 -0000	1.47.2.2
  +++ apr_hooks.c	11 Apr 2004 18:31:35 -0000	1.47.2.3
  @@ -145,21 +145,22 @@
   	for(n=0 ; ; ++n) {
   	    if(n == nItems)
   		assert(0);      /* we have a loop... */
  -	    if(!pData[n].pNext)
  -		break;
  -	}
  -	if(pData[n].nPredecessors) {
  -	    for(k=0 ; ; ++k) {
  -		assert(k < nItems);
  -		if(pData[n].ppPredecessors[k])
  +	    if(!pData[n].pNext) {
  +		if(pData[n].nPredecessors) {
  +		    for(k=0 ; ; ++k) {
  +			assert(k < nItems);
  +			if(pData[n].ppPredecessors[k])
  +			    break;
  +		    }
  +		    for(i=0 ; ; ++i) {
  +			assert(i < nItems);
  +			if(&pData[i] == pData[n].ppPredecessors[k]) {
  +			    n=i-1;
  +			    break;
  +			}
  +		    }
  +		} else
   		    break;
  -	    }
  -	    for(i=0 ; ; ++i) {
  -		assert(i < nItems);
  -		if(&pData[i] == pData[n].ppPredecessors[k]) {
  -		    n=i;
  -		    break;
  -		}
   	    }
   	}
   	if(pTail)
  
  
  

Mime
View raw message