Skip to content

Commit

Permalink
Revert "Test with asserts commented out"
Browse files Browse the repository at this point in the history
This reverts commit de8dbf1.
  • Loading branch information
aggarw13 committed Aug 14, 2021
1 parent de8dbf1 commit 0c48f4c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions source/sigv4_quicksort.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ static void swap( void * pFirstItem,
uint8_t * pSecondByte = pSecondItem;
size_t dataSize = itemSize;

/* assert( pFirstItem != NULL ); */
/* assert( pSecondItem != NULL ); */
assert( pFirstItem != NULL );
assert( pSecondItem != NULL );

/* Swap one byte at a time. */
while( dataSize-- > 0U )
Expand Down Expand Up @@ -205,8 +205,8 @@ static size_t partition( void * pArray,
void * pivot;
size_t i = low - 1U, j = low;

/* assert( pArray != NULL ); */
/* assert( comparator != NULL ); */
assert( pArray != NULL );
assert( comparator != NULL );

/* Choose pivot as the highest indexed item in the current partition. */
pivot = pArray + ( high * itemSize );
Expand Down Expand Up @@ -237,10 +237,10 @@ void quickSort( void * pArray,
size_t itemSize,
ComparisonFunc_t comparator )
{
/* assert( pArray != NULL ); */
/* assert( numItems > 0U ); */
/* assert( itemSize > 0U ); */
/* assert( comparator != NULL ); */
assert( pArray != NULL );
assert( numItems > 0U );
assert( itemSize > 0U );
assert( comparator != NULL );

quickSortHelper( pArray, 0U, numItems - 1U, itemSize, comparator );
}

0 comments on commit 0c48f4c

Please sign in to comment.