library for inclusion into tinc (http://tinc.nl.linux.org) by
Guus Sliepen <guus@sliepen.warande.net>.
- $Id: avl_tree.c,v 1.1.2.3 2001/01/07 17:08:49 guus Exp $
+ $Id: avl_tree.c,v 1.1.2.4 2001/01/08 21:32:00 guus Exp $
*/
#include <stdio.h>
node = avl_search_closest_node(tree, data, &result);
- if(result > 0)
+ if(result < 0)
node = node->prev;
return node;
node = avl_search_closest_node(tree, data, &result);
- if(result < 0)
+ if(result > 0)
node = node->next;
return node;