File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1595,10 +1595,10 @@ static void qpair2query(CURLU *uh, struct option *o)
15951595/* sort case insensitively */
15961596static int cmpfunc (const void * p1 , const void * p2 )
15971597{
1598- int i ;
1598+ size_t i ;
15991599 size_t len1 = ((const struct string * )p1 )-> len ;
16001600 size_t len2 = ((const struct string * )p2 )-> len ;
1601- int len = ( int )( len1 < len2 ? len1 : len2 ) ;
1601+ size_t len = len1 < len2 ? len1 : len2 ;
16021602
16031603 for (i = 0 ; i < len ; i ++ ) {
16041604 char c1 = ((const struct string * )p1 )-> str [i ] | ('a' - 'A' );
@@ -1607,9 +1607,7 @@ static int cmpfunc(const void *p1, const void *p2)
16071607 return c1 - c2 ;
16081608 }
16091609
1610- if (len1 != len2 )
1611- return len1 < len2 ? -1 : 1 ;
1612- return 0 ;
1610+ return (len1 > len2 ) - (len1 < len2 );
16131611}
16141612
16151613static bool sortquery (struct option * o )
You can’t perform that action at this time.
0 commit comments