aboutsummaryrefslogtreecommitdiff
path: root/zip.c
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2026-09-27 23:11:08 +0200
committerXavier Del Campo Romero <xavi92@disroot.org>2026-09-27 23:11:08 +0200
commitebf718f8be84c3785ed8744e214388ea556ebccb (patch)
tree0e2ba74580e55c7e30317145d0ae82f3a2ec0ad7 /zip.c
parentbd2a746c169121c5c07e3afade9d8c5e6d76fdc6 (diff)
downloadslcl-ebf718f8be84c3785ed8744e214388ea556ebccb.tar.gz
zip.c: Const-qualify bn
Even if basename(3) does modify the input string [1], the returned pointer is only used as a reference in this context. [1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/basename.html
Diffstat (limited to 'zip.c')
-rw-r--r--zip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/zip.c b/zip.c
index 79cf833..668030c 100644
--- a/zip.c
+++ b/zip.c
@@ -257,7 +257,8 @@ int zip(const char *const dir, struct http_response *const r)
struct cftw *c = NULL;
ZIPstream *stream = NULL;
struct zip *z = NULL;
- char *basedir = NULL, *bndup = NULL, *bn = NULL;
+ char *basedir = NULL, *bndup = NULL;
+ const char *bn;
int fds[2] = {-1, -1}, flags;
struct dynstr d;