From: Rudi Heitbaum Date: Sun, 8 Feb 2026 14:49:49 +0000 (+1100) Subject: util: Use const variable type in mkdir_parents X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6188542cd63c12018e1f74bdf686457982509cb3;p=thirdparty%2Fkmod.git util: Use const variable type in mkdir_parents For ISO C23, the function strchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the in put argument is a pointer to a const-qualified type. Signed-off-by: Rudi Heitbaum Reviewed-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/pull/422 Signed-off-by: Lucas De Marchi --- diff --git a/shared/util.c b/shared/util.c index b4ce172a..4e2736dd 100644 --- a/shared/util.c +++ b/shared/util.c @@ -467,7 +467,7 @@ int mkdir_p(const char *path, int len, mode_t mode) int mkdir_parents(const char *path, mode_t mode) { - char *end = strrchr(path, '/'); + const char *end = strrchr(path, '/'); /* no parent directories */ if (end == NULL)