X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdlib%2Fqsort.c;h=6bb636f5631d5c50a51f9052c9b947f61507fb49;hb=f93d55176e4db9edfb1840054169003bcca4d1fb;hp=d12776993988278b304d625a8f0b604f0b4c988d;hpb=b08f4b52b1cd1f7a9553c0f357a7c90859fa3e73;p=pdclib diff --git a/functions/stdlib/qsort.c b/functions/stdlib/qsort.c index d127769..6bb636f 100644 --- a/functions/stdlib/qsort.c +++ b/functions/stdlib/qsort.c @@ -19,7 +19,7 @@ */ /* 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 ); } @@ -41,9 +41,9 @@ void qsort( void * base, size_t nmemb, size_t size, int (*compar)( const void *, { char * i; char * j; - size_t thresh = T * size; - char * base_ = (char *)base; - char * limit = base_ + nmemb * size; + _PDCLIB_ptrdiff_t thresh = T * size; + char * base_ = (char *)base; + char * limit = base_ + nmemb * size; PREPARE_STACK; for ( ;; )