diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-09-27 23:11:08 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-09-27 23:11:08 +0200 |
| commit | ebf718f8be84c3785ed8744e214388ea556ebccb (patch) | |
| tree | 0e2ba74580e55c7e30317145d0ae82f3a2ec0ad7 | |
| parent | bd2a746c169121c5c07e3afade9d8c5e6d76fdc6 (diff) | |
| download | slcl-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
| -rw-r--r-- | zip.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |
