diff options
author | nw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-05 06:28:21 +0000 |
---|---|---|
committer | nw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-05 06:28:21 +0000 |
commit | 4f46a27ae285f8253425963f4050ba6970fdb9af (patch) | |
tree | 76fb2d36409d8fc6013d6c6e0efe11f4ea52287f /ace/Containers.h | |
parent | c6bc888bdd568316c1cd38529999fbc31754a6e0 (diff) | |
download | ATCD-4f46a27ae285f8253425963f4050ba6970fdb9af.tar.gz |
Added more checks to ACE_Double_Linked_List::remove_element to prevent
double removal of elements.
Diffstat (limited to 'ace/Containers.h')
-rw-r--r-- | ace/Containers.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ace/Containers.h b/ace/Containers.h index 5a042a65488..af4b37d5c76 100644 --- a/ace/Containers.h +++ b/ace/Containers.h @@ -650,8 +650,10 @@ protected: int remove_element (T *item); // Remove an <item> from the list. Return 0 if succeed, -1 otherwise. - // Notice that this function only checks if item is <head_>. Users - // must ensure the item is in the list. + // Notice that this function checks if item is <head_> and either its + // <next_> or <prev_> is NULL. The function resets item's <next_> and + // <prev_> to 0 to prevent clobbering the double-linked list if a user + // tries to remove the same node again. T *head_; // Head of the circular double-linked list. |