kernel/util: Add static assert that the two list links are the same size.
They are used interchangeably in some places, so we should assert this.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
|
||||
#include <util/list.h>
|
||||
#include <util/DoublyLinkedList.h>
|
||||
#include <BytePointer.h>
|
||||
|
||||
|
||||
@@ -13,6 +14,9 @@
|
||||
#define GET_LINK(list, item) ({ BytePointer<list_link> pointer((uint8*)item \
|
||||
+ list->offset); &pointer; })
|
||||
|
||||
STATIC_ASSERT(sizeof(DoublyLinkedListLink<void*>) == sizeof(list_link));
|
||||
|
||||
|
||||
/** Initializes the list with a specified offset to the link
|
||||
* structure in the items that will be part of the list.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user