summaryrefslogtreecommitdiff
path: root/src/ll.c
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2025-03-30 23:13:35 -0500
committer@syxhe <https://t.me/syxhe>2025-03-30 23:13:35 -0500
commit833cb417608eb138d3a9b99dc995c5c1aeffd1cd (patch)
tree9698c034adb7e5124e91ac79b8eb4d68b047a0f9 /src/ll.c
parent97713275dc87ea1d0afa4fd6bc49f695ad40efc0 (diff)
Create encryption functions that actually work
Diffstat (limited to 'src/ll.c')
-rw-r--r--src/ll.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ll.c b/src/ll.c
index b02c275..5e67244 100644
--- a/src/ll.c
+++ b/src/ll.c
@@ -22,7 +22,7 @@ typedef struct dlinked {
22} dlinkedlist; 22} dlinkedlist;
23 23
24 24
25dllnode* dllnode_init(void *data, dll_freecb fcb) { 25dllnode * dllnode_init(void *data, dll_freecb fcb) {
26 dllnode *n = xcalloc(1, sizeof(*n)); 26 dllnode *n = xcalloc(1, sizeof(*n));
27 n->data = data; 27 n->data = data;
28 n->freecb = fcb; 28 n->freecb = fcb;
@@ -46,7 +46,7 @@ int dllnode_free(dllnode **n) {
46 return 0; 46 return 0;
47} 47}
48 48
49dlinkedlist* dlinkedlist_init(void) { 49dlinkedlist * dlinkedlist_init(void) {
50 dlinkedlist *ll = xcalloc(1, sizeof(*ll)); 50 dlinkedlist *ll = xcalloc(1, sizeof(*ll));
51 ll->end = NULL; 51 ll->end = NULL;
52 ll->start = NULL; 52 ll->start = NULL;
@@ -135,7 +135,7 @@ int dlinkedlist_prepend(dlinkedlist * const ll, void *data, dll_freecb fcb) {
135 return dlinkedlist_xxxend(ll, data, fcb, 'p'); 135 return dlinkedlist_xxxend(ll, data, fcb, 'p');
136} 136}
137 137
138dllnode* dlinkedlist_getnode(const dlinkedlist * const ll, int index) { 138dllnode * dlinkedlist_getnode(const dlinkedlist * const ll, int index) {
139 if(!ll) 139 if(!ll)
140 RETURNWERR(EINVAL, NULL); 140 RETURNWERR(EINVAL, NULL);
141 if(index < 0 || index >= ll->size) 141 if(index < 0 || index >= ll->size)