diff options
| author | @syxhe <https://t.me/syxhe> | 2025-04-21 21:51:54 -0500 |
|---|---|---|
| committer | @syxhe <https://t.me/syxhe> | 2025-04-21 21:51:54 -0500 |
| commit | c704a8a382c231e066a7fbf0402a33455c40b8f5 (patch) | |
| tree | 0c4000906060013de91ea7fc1888cedcbc34159e /src/ll-internal.c | |
| parent | 521e9a2fc8e0ef1dffe4e590d0d4f65292f0d1df (diff) | |
Rework dlinkedlist functions to use VALLOC macro instead of only xalloc
Diffstat (limited to 'src/ll-internal.c')
| -rw-r--r-- | src/ll-internal.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 @@ | |||
| 1 | #include "ll-internal.h" | 1 | #include "ll-internal.h" |
| 2 | #include "shared.h" | 2 | #include "shared.h" |
| 3 | 3 | ||
| 4 | #include <stdlib.h> | ||
| 5 | |||
| 4 | dllnode * dllnode_init(void *data, dll_freecb fcb) { | 6 | dllnode * dllnode_init(void *data, dll_freecb fcb) { |
| 5 | dllnode *n = xcalloc(1, sizeof(*n)); | 7 | dllnode *n = VALLOC(1, sizeof(*n)); |
| 8 | if(!n) | ||
| 9 | return NULL; | ||
| 10 | |||
| 6 | n->data = data; | 11 | n->data = data; |
| 7 | n->freecb = fcb; | 12 | n->freecb = fcb; |
| 8 | n->prev = NULL; | 13 | n->prev = NULL; |
