*/
/* Wrapper for _PDCLIB_memswp protects against multiple argument evaluation. */
-static inline void memswp( char * i, char * j, unsigned int size )
+static inline void memswp( char * i, char * j, size_t size )
{
_PDCLIB_memswp( i, j, size );
}
{
char * i;
char * j;
- size_t thresh = T * size;
- char * base_ = (char *)base;
- char * limit = base_ + nmemb * size;
+ _PDCLIB_size_t thresh = T * size;
+ char * base_ = (char *)base;
+ char * limit = base_ + nmemb * size;
PREPARE_STACK;
for ( ;; )
{
- if ( limit - base_ > thresh ) /* QSort for more than T elements. */
+ if ( (size_t)( limit - base_ ) > thresh ) /* QSort for more than T elements. */
{
/* We work from second to last - first will be pivot element. */
i = base_ + size;