blob: dca53ee2e713a9565c58afd2a0b7d1376ad2038b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
/* ISC license. */
#include <errno.h>
#include <skalibs/avlnode.h>
int avlnode_search (avlnode const *s, uint32_t max, uint32_t r, void const *k, uint32_t *data, dtokfunc_t_ref dtok, cmpfunc_t_ref f, void *p)
{
uint32_t i = avlnode_searchnode(s, max, r, k, dtok, f, p) ;
if (i >= max) return (errno = ESRCH, 0) ;
*data = s[i].data ;
return 1 ;
}
|