Fixed warnings and errors so ReactOS can be compiled with GCC 3.2.
[reactos.git] / reactos / lib / crtdll / search / lsearch.c
1 #include <crtdll/search.h>
2 #include <crtdll/stdlib.h>
3 #include <crtdll/string.h>
4
5 void *_lsearch(const void *key, void *base, size_t *nelp, size_t width,
6 int (*compar)(const void *, const void *))
7 {
8 void *ret_find = _lfind(key,base,nelp,width,compar);
9 if ( ret_find != NULL )
10 return ret_find;
11
12 memcpy( base + (*nelp*width), key, width );
13 (*nelp)++;
14 return base ;
15 }
16