* The C "struct list" and the C++ DoublyLinkedList implementations had mixed

next/prev link order - that messed up the DoublyLinkedListCLink adapter.
* Since it's more likely that someone messes with the C version, the C++ version
  now uses the same order than that one.
* This fixes a bug when TCP's BufferQueue tried to iterate over a list, messing
  up its integrity.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22676 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-10-23 10:37:41 +00:00
parent 875c4627fd
commit c76695a275
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2005-2006, Ingo Weinhold, bonefish@users.sf.net. All rights reserved.
* Copyright 2005-2007, Ingo Weinhold, bonefish@users.sf.net. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef KERNEL_UTIL_DOUBLY_LINKED_LIST_H
@ -23,11 +23,11 @@
template<typename Element>
class DoublyLinkedListLink {
public:
DoublyLinkedListLink() : previous(NULL), next(NULL) {}
DoublyLinkedListLink() : next(NULL), previous(NULL) {}
~DoublyLinkedListLink() {}
Element *previous;
Element *next;
Element *previous;
};
// DoublyLinkedListLinkImpl

View File

@ -1,5 +1,5 @@
/*
* Copyright 2003-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Copyright 2003-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef KERNEL_LIST_H
@ -27,8 +27,8 @@ typedef struct list_link list_link;
*/
struct list_link {
list_link *next;
list_link *prev;
list_link *next;
list_link *prev;
};
struct list {