diff options
| 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 |
| commit | 833cb417608eb138d3a9b99dc995c5c1aeffd1cd (patch) | |
| tree | 9698c034adb7e5124e91ac79b8eb4d68b047a0f9 /src/ll.c | |
| parent | 97713275dc87ea1d0afa4fd6bc49f695ad40efc0 (diff) | |
Create encryption functions that actually work
Diffstat (limited to 'src/ll.c')
| -rw-r--r-- | src/ll.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -22,7 +22,7 @@ typedef struct dlinked { | |||
| 22 | } dlinkedlist; | 22 | } dlinkedlist; |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | dllnode* dllnode_init(void *data, dll_freecb fcb) { | 25 | dllnode * 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 | ||
| 49 | dlinkedlist* dlinkedlist_init(void) { | 49 | dlinkedlist * 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 | ||
| 138 | dllnode* dlinkedlist_getnode(const dlinkedlist * const ll, int index) { | 138 | dllnode * 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) |
