ellSort: comments and redundant asserts

This commit is contained in:
Michael Davidsaver
2016-04-27 07:58:39 -04:00
committed by Ralph Lange
parent 77d6609bbd
commit 55895e6d66

View File

@@ -49,16 +49,11 @@ void ellSortStable(ELLLIST *pList, pListCmp cmp)
/* shift previous results to inputs */
ellConcat(&INP, pList);
assert(ellCount(pList)==0);
while(ellCount(&INP))
{
ELLNODE *p, *q;
assert(ellCount(&P)==0);
assert(ellCount(&Q)==0);
/* Pull out the next pair of sub-lists */
ellMoveN(&Q, &INP, insize);
ellMoveN(&P, &INP, insize);
@@ -73,7 +68,7 @@ void ellSortStable(ELLLIST *pList, pListCmp cmp)
}
}
/* concatinate any remaining to result */
/* concatenate any remaining to result */
if(ellFirst(&P))
ellConcat(pList, &P);
else if(ellFirst(&Q))