summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2025-04-17 15:36:28 -0500
committer@syxhe <https://t.me/syxhe>2025-04-17 15:36:28 -0500
commited4a91bcc1d68c26cd533c4432f93c799b1771c2 (patch)
tree4df6d665ecc83706c9837d4a832b18fac505f229 /src/main.c
parent9d3c8770ec63fe3e02f82bdc244e63d701492322 (diff)
Slight improvement to scandirlist function to properly free memory on error
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index d5e90c9..3779206 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,13 +22,6 @@ int printnames(void *data) {
22 return 0; 22 return 0;
23} 23}
24int main() { 24int main() {
25 // error(1, ENOTSUP, "No main file lol"); 25 error(1, ENOTSUP, "No main file lol");
26
27 // Test code to showcase the scanner function
28
29 dlinkedlist *ll = scandirlist(".", lol, alphasort);
30 dlinkedlist_foreach(ll, printnames);
31 dlinkedlist_free(ll);
32
33 return 0; 26 return 0;
34} \ No newline at end of file 27} \ No newline at end of file