From c704a8a382c231e066a7fbf0402a33455c40b8f5 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Mon, 21 Apr 2025 21:51:54 -0500 Subject: Rework dlinkedlist functions to use VALLOC macro instead of only xalloc --- src/ll-internal.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ll-internal.c') diff --git a/src/ll-internal.c b/src/ll-internal.c index 1a4fe3c..e56302e 100644 --- a/src/ll-internal.c +++ b/src/ll-internal.c @@ -1,8 +1,13 @@ #include "ll-internal.h" #include "shared.h" +#include + dllnode * dllnode_init(void *data, dll_freecb fcb) { - dllnode *n = xcalloc(1, sizeof(*n)); + dllnode *n = VALLOC(1, sizeof(*n)); + if(!n) + return NULL; + n->data = data; n->freecb = fcb; n->prev = NULL; -- cgit v1.2.3