X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fsplay_tree.c;h=514392597b7786736e0455deb582c0db3607c4c2;hp=e2b93a056cd226286e7ec75d75bd501b301dadae;hb=ad87362afd13c4f14ce9a4b2cf0586a753b5a422;hpb=d8312f930befa013a74010a3f30f69fdb1a01417 diff --git a/src/splay_tree.c b/src/splay_tree.c index e2b93a05..51439259 100644 --- a/src/splay_tree.c +++ b/src/splay_tree.c @@ -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, 0, sizeof(left)); + memset(&right, 0, sizeof(right)); + if(!root) { if(result) { *result = 0;