Age | Commit message (Collapse) | Author | Files | Lines |
|
POSIX specifies the behaviour for null rootp input, but it
was not implemented correctly.
|
|
changed the insertion method to simplify the recursion logic and
reduce code size a bit.
|
|
malloc failure was not properly propagated in the insertion method
which led to null pointer dereference.
|
|
the tsearch data structure is an avl tree, but it did not implement
the deletion operation correctly so the tree could become unbalanced.
reported by Ed Schouten.
|
|
patch by nsz. the actual object the caller has storing the tree root
has type void *, so accessing it as struct node * is not valid.
instead, simply access the value, move it to a temporary of the
appropriate type and work from there, then move the result back.
|
|
|
|
|