Changeset 16
- Timestamp:
- Jan 13, 2006, 9:42:48 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/zAVLTree.c
r1 r16 123 123 node = zAVLCloseSearchNode(avltree, newnode->key, &ok); 124 124 125 if ( !zAVLKey_cmp(avltree, node->key, newnode->key)) {125 if (ok == ZAVL_OK) { /* exists already */ 126 126 free(newnode); 127 127 return 3; … … 191 191 192 192 avlnode = zAVLCloseSearchNode(avltree, key, &ok); 193 if (avlnode == NULL || zAVLKey_cmp(avltree, avlnode->key, key))193 if (avlnode == NULL || ok == ZAVL_NO) /* does not exist */ 194 194 return -1; 195 195
Note:
See TracChangeset
for help on using the changeset viewer.