From ebf718f8be84c3785ed8744e214388ea556ebccb Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sun, 27 Sep 2026 23:11:08 +0200 Subject: 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 --- zip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3