- Don't rely on the default calling convention being cdecl for function pointers
[reactos.git] / reactos / lib / sdk / crt / search / lsearch.c
index 07ca9b8..fa46e91 100644 (file)
@@ -1,12 +1,12 @@
-#include <search.h>
 #include <stdlib.h>
 #include <string.h>
+#include <search.h>
 
 /*
  * @implemented
  */
-void *_lsearch(const void *key, void *base, size_t *nelp, size_t width,
-         int (*compar)(const void *, const void *))
+void *_lsearch(const void *key, void *base, unsigned int *nelp, unsigned int width,
+         int (__cdecl *compar)(const void *, const void *))
 {
   void *ret_find = _lfind(key,base,nelp,width,compar);
 
@@ -19,3 +19,4 @@ void *_lsearch(const void *key, void *base, size_t *nelp, size_t width,
   return base;
 }
 
+