163,7 → 163,7 |
newnode->par = cur; |
|
gpa = cur; |
while (gpa != &t->head && gpa->key == cur->key) |
while ((gpa != &t->head) && (gpa->key == cur->key)) |
gpa = gpa->prev; |
newnode->next = gpa->next; |
newnode->prev = gpa; |
403,7 → 403,7 |
} |
|
|
if (&t->head != node->prev && node->prev->key == node->key) { |
if ((&t->head != node->prev) && (node->prev->key == node->key)) { |
/* |
* Deleted node has at least one node node with the same key which is closest previous |
* neighbor in the list, copy node atributes into previous node and end. |
747,6 → 747,11 |
expnode->par->lft = NULL; |
expnode->par->lft_height = 0; |
} |
} else if (expnode->next == &t->head) { |
/* |
* Special case of deleting last node with key equal 0. |
*/ |
t->root = NULL; |
} |
|
/* |