Initialize variables in splay_tree.c - splay_top_down()
This commit is contained in:
parent
044fc684d0
commit
9e0c77e21f
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue