From c76695a275bafdb456058bd99b1c68e8fe6441b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 23 Oct 2007 10:37:41 +0000 Subject: [PATCH] * 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 --- headers/private/kernel/util/DoublyLinkedList.h | 6 +++--- headers/private/kernel/util/list.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/headers/private/kernel/util/DoublyLinkedList.h b/headers/private/kernel/util/DoublyLinkedList.h index 4d68d986c0..22fda14fea 100644 --- a/headers/private/kernel/util/DoublyLinkedList.h +++ b/headers/private/kernel/util/DoublyLinkedList.h @@ -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 class DoublyLinkedListLink { public: - DoublyLinkedListLink() : previous(NULL), next(NULL) {} + DoublyLinkedListLink() : next(NULL), previous(NULL) {} ~DoublyLinkedListLink() {} - Element *previous; Element *next; + Element *previous; }; // DoublyLinkedListLinkImpl diff --git a/headers/private/kernel/util/list.h b/headers/private/kernel/util/list.h index 79fce6b3b1..94102e0291 100644 --- a/headers/private/kernel/util/list.h +++ b/headers/private/kernel/util/list.h @@ -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 {