]>
git.ipfire.org Git - thirdparty/squid.git/blob - test-suite/test_tools.cc
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 // XXX: This file is made of large pieces of src/tools.cc
10 // with only a few minor modifications. TODO: redesign or delete.
16 dlinkAdd(void *data
, dlink_node
* m
, dlink_list
* list
)
27 if (list
->tail
== nullptr)
32 dlinkAddAfter(void *data
, dlink_node
* m
, dlink_node
* n
, dlink_list
* list
)
41 assert(list
->tail
== n
);
49 dlinkAddTail(void *data
, dlink_node
* m
, dlink_list
* list
)
60 if (list
->head
== nullptr)
65 dlinkDelete(dlink_node
* m
, dlink_list
* list
)
68 m
->next
->prev
= m
->prev
;
71 m
->prev
->next
= m
->next
;
79 m
->next
= m
->prev
= nullptr;