fix warning + problem with tdestroy() detection
This commit is contained in:
parent
7d1b702239
commit
16372e46d2
1 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
* Author: sears
|
* Author: sears
|
||||||
*/
|
*/
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
#include <config.h>
|
||||||
#include <search.h>
|
#include <search.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stasis/tsearchcompat.h>
|
#include <stasis/tsearchcompat.h>
|
||||||
|
@ -54,7 +55,10 @@ const void * compat_rbsearch(const void * key, rbtree * tp) {
|
||||||
void** ret = (void**)tsearch(key, &(t->root), t->cmp);
|
void** ret = (void**)tsearch(key, &(t->root), t->cmp);
|
||||||
return ret ? *ret : 0;
|
return ret ? *ret : 0;
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_TDESTROY
|
||||||
static void noop_free(void* node) {}
|
static void noop_free(void* node) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
void compat_rbdestroy(rbtree * tp) {
|
void compat_rbdestroy(rbtree * tp) {
|
||||||
compat_rbtree* t = (compat_rbtree*)tp;
|
compat_rbtree* t = (compat_rbtree*)tp;
|
||||||
if(t->root) {
|
if(t->root) {
|
||||||
|
|
Loading…
Reference in a new issue