david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[list] Add sanity checks after list-adding functions

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2014-12-09 13:12:01 +00:00
parent 67879f66eb
commit 28149d30f5
1 changed files with 4 additions and 0 deletions

View File

@ -69,6 +69,8 @@ struct list_head {
#define list_add( new, head ) do { \
list_check ( (head) ); \
extern_list_add ( (new), (head) ); \
list_check ( (head) ); \
list_check ( (new) ); \
} while ( 0 )
static inline void inline_list_add ( struct list_head *new,
struct list_head *head ) {
@ -91,6 +93,8 @@ extern void extern_list_add ( struct list_head *new,
#define list_add_tail( new, head ) do { \
list_check ( (head) ); \
extern_list_add_tail ( (new), (head) ); \
list_check ( (head) ); \
list_check ( (new) ); \
} while ( 0 )
static inline void inline_list_add_tail ( struct list_head *new,
struct list_head *head ) {