Skip to content

Commit

Permalink
100% coverage again
Browse files Browse the repository at this point in the history
  • Loading branch information
aggarw13 committed Aug 14, 2021
1 parent 26b26bd commit 2f1427a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/sigv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -2030,7 +2030,7 @@ static void generateCredentialScope( const SigV4Parameters_t * pSigV4Params,

returnStatus = setQueryStringFieldsAndValues( pQuery, queryLen, &numberOfParameters, pCanonicalContext );

if( returnStatus == SigV4Success )
if( ( returnStatus == SigV4Success ) && ( numberOfParameters > 0U ) )
{
/* Sort the parameter names by character code point in ascending order.
* Parameters with duplicate names should be sorted by value. */
Expand Down
10 changes: 6 additions & 4 deletions source/sigv4_quicksort.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@ void quickSort( void * pArray,
size_t itemSize,
ComparisonFunc_t comparator )
{
if( ( numItems != 0U ) && ( pArray != NULL ) )
{
quickSortHelper( pArray, 0U, numItems - 1U, itemSize, comparator );
}
assert( pArray != NULL );
assert( numItems > 0U );
assert( itemSize > 0U );
assert( comparator != NULL );

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

0 comments on commit 2f1427a

Please sign in to comment.