mirror of
https://github.com/ipxe/ipxe
synced 2025-12-24 15:23:42 +03:00
[list] Add sanity checks after list-adding functions
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -69,6 +69,8 @@ struct list_head {
|
|||||||
#define list_add( new, head ) do { \
|
#define list_add( new, head ) do { \
|
||||||
list_check ( (head) ); \
|
list_check ( (head) ); \
|
||||||
extern_list_add ( (new), (head) ); \
|
extern_list_add ( (new), (head) ); \
|
||||||
|
list_check ( (head) ); \
|
||||||
|
list_check ( (new) ); \
|
||||||
} while ( 0 )
|
} while ( 0 )
|
||||||
static inline void inline_list_add ( struct list_head *new,
|
static inline void inline_list_add ( struct list_head *new,
|
||||||
struct list_head *head ) {
|
struct list_head *head ) {
|
||||||
@@ -91,6 +93,8 @@ extern void extern_list_add ( struct list_head *new,
|
|||||||
#define list_add_tail( new, head ) do { \
|
#define list_add_tail( new, head ) do { \
|
||||||
list_check ( (head) ); \
|
list_check ( (head) ); \
|
||||||
extern_list_add_tail ( (new), (head) ); \
|
extern_list_add_tail ( (new), (head) ); \
|
||||||
|
list_check ( (head) ); \
|
||||||
|
list_check ( (new) ); \
|
||||||
} while ( 0 )
|
} while ( 0 )
|
||||||
static inline void inline_list_add_tail ( struct list_head *new,
|
static inline void inline_list_add_tail ( struct list_head *new,
|
||||||
struct list_head *head ) {
|
struct list_head *head ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user