Removed list_size struct member from user space list implementation

Removed the list_size struct member as it was only used in a single
assertion, as mentioned in PR #15478.

Signed-off-by: MigeljanImeri <imerimigel@gmail.com>
This commit is contained in:
MigeljanImeri 2024-01-18 15:49:57 -07:00
parent d99e0d8661
commit 4ed348a275
2 changed files with 2 additions and 3 deletions

View File

@ -39,7 +39,6 @@ struct list_node {
};
struct list {
size_t list_size;
size_t list_offset;
struct list_node list_head;
};

View File

@ -65,7 +65,8 @@ list_create(list_t *list, size_t size, size_t offset)
ASSERT(size > 0);
ASSERT(size >= offset + sizeof (list_node_t));
list->list_size = size;
(void) size;
list->list_offset = offset;
list->list_head.next = list->list_head.prev = &list->list_head;
}
@ -194,7 +195,6 @@ list_move_tail(list_t *dst, list_t *src)
list_node_t *dstnode = &dst->list_head;
list_node_t *srcnode = &src->list_head;
ASSERT(dst->list_size == src->list_size);
ASSERT(dst->list_offset == src->list_offset);
if (list_empty(src))