From 77672d83c4efdf41c62455a01204ab48dc91fc90 Mon Sep 17 00:00:00 2001 From: Rose Date: Sat, 17 Aug 2024 20:42:28 -0400 Subject: [PATCH] Put restrict qualifers in strvec_join function pointer --- plugins/sudoers/strvec_join.c | 2 +- plugins/sudoers/sudoers.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/sudoers/strvec_join.c b/plugins/sudoers/strvec_join.c index bee2e44fe..962e2c289 100644 --- a/plugins/sudoers/strvec_join.c +++ b/plugins/sudoers/strvec_join.c @@ -40,7 +40,7 @@ * char. If non-NULL, the copy function must have strlcpy-like semantics. */ char * -strvec_join(char *const argv[], char sep, size_t (*cpy)(char *, const char *, size_t)) +strvec_join(char *const argv[], char sep, size_t (*cpy)(char * restrict, const char * restrict, size_t)) { char *dst, *result = NULL; char *const *av; diff --git a/plugins/sudoers/sudoers.h b/plugins/sudoers/sudoers.h index 93c77667c..106a1e8c2 100644 --- a/plugins/sudoers/sudoers.h +++ b/plugins/sudoers/sudoers.h @@ -496,10 +496,10 @@ void canon_path_free(char *resolved); void canon_path_free_cache(void); /* strlcpy_unesc.c */ -size_t strlcpy_unescape(char *restrict dst, const char *restrict src, size_t size); +size_t strlcpy_unescape(char * restrict dst, const char * restrict src, size_t size); /* strvec_join.c */ -char *strvec_join(char *const argv[], char sep, size_t (*cpy)(char *, const char *, size_t)); +char *strvec_join(char *const argv[], char sep, size_t (*cpy)(char * restrict, const char * restrict, size_t)); /* unesc_str.c */ void unescape_string(char *str);