Initialize variables in splay_tree.c - splay_top_down()

This commit is contained in:
thorkill 2015-06-30 19:35:13 +02:00
parent 044fc684d0
commit 9e0c77e21f

View file

@ -25,11 +25,14 @@
/* Splay operation */
static splay_node_t *splay_top_down(splay_tree_t *tree, const void *data, int *result) {
splay_node_t left = {NULL}, right = {NULL};
splay_node_t left, right;
splay_node_t *leftbottom = &left, *rightbottom = &right, *child, *grandchild;
splay_node_t *root = tree->root;
int c;
memset(&left, 0x0, sizeof(splay_node_t));
memset(&right, 0x0, sizeof(splay_node_t));
if(!root) {
if(result)
*result = 0;