Re: [PATCH 1/2] msvcrt: Added qsort_s implementation. (try 4)
"Vincas Miliƫnas" <vincas.miliunas(a)gmail.com> writes:
+/********************************************************************* + * Helper function for MSVCRT_qsort_s. + * + * Based on http://github.com/git/git/blob/master/compat/qsort.c + * + */
We already have a qsort in ntdll, I'd suggest to copy that (and/or merge possible improvements into it). We don't need two implementations from two different sources.
+/********************************************************************* + * qsort_s (MSVCRT.@) + * + * Based on http://github.com/git/git/blob/master/compat/qsort.c + * + */ +void CDECL MSVCRT_qsort_s(void *b, size_t n, size_t s, + _QSORT_S_COMPARE_FN cmp, void *context) +{ + const size_t size = n * s;
You probably want to check for overflow. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard