libBLOC
Barry Adding object metadata functions c5a8d16 (2 years, 11 months ago)
diff --git a/list/list_remove.c b/list/list_remove.c
index 767fb09..8aeac63 100644
--- a/list/list_remove.c
+++ b/list/list_remove.c
@@ -20,7 +20,6 @@
#include <BLOC/object.h>
#include <BLOC/list.h>
#include "../assert.h"
-#include "../object.h"
#include "list.h"
/* Remove an object from a list */
@@ -29,11 +28,10 @@ list_remove(List *list, void *obj)
{
ASSERT(list);
ASSERT(obj);
- struct ObjectHeader *header = object_header(obj);
- ASSERT(header->magic == OBJECT_MAGIC);
+ ASSERT(obj_verify(obj));
if (!list->header.start)
return;
- if (list->type && list->type != header->type)
+ if (list->type && list->type != obj_type(obj))
return;
obj_lock(list);