summaryrefslogtreecommitdiff
path: root/src/libdatastruct/avltree_insert.c
blob: d06da2bfbabcc226a4e303f65a2f7179bd05b293 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* ISC license. */

#include <stdint.h>
#include <skalibs/avltree.h>

int avltree_insert (avltree *t, uint32_t d)
{
  uint32_t i ;
  if (!avltree_newnode(t, d, &i)) return 0 ;
  avltree_insertnode(t, i) ;
  return 1 ;
}