Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Return nothing from two calls nobody checks
Diffstat (limited to '')
-rw-r--r--source/cache.c5
1 file changed, 2 insertions, 3 deletions
diff --git a/source/cache.c b/source/cache.c
index efe8185..be1a3c9 100644
--- a/source/cache.c
+++ b/source/cache.c
@@ -519,7 +519,7 @@ int cache_process(int size, const char *path, const char *key, int ttl, size_t m
return result;
}
-int cache_ls(const char *path)
+void cache_ls(const char *path)
{
DIR *dir;
struct dirent *ent;
@@ -536,7 +536,7 @@ int cache_ls(const char *path)
if (!dir) {
err = errno;
fprintf(stderr, "[cgit] Unable to open %s: %s (%d)\n", path, strerror(err), err);
- return err;
+ return;
}
strbuf_addstr(&slot_path, path);
strbuf_ensure_end(&slot_path, '/');
@@ -569,5 +569,4 @@ int cache_ls(const char *path)
}
closedir(dir);
strbuf_release(&slot_path);
- return 0;
}