diff --git a/plugins/sudoers/prompt.c b/plugins/sudoers/prompt.c index 0bf9f7928..50e93896e 100644 --- a/plugins/sudoers/prompt.c +++ b/plugins/sudoers/prompt.c @@ -40,8 +40,8 @@ * the dynamically allocated result. */ char * -expand_prompt(const struct sudoers_context *ctx, const char *old_prompt, - const char *auth_user) +expand_prompt(const struct sudoers_context *ctx, + const char *restrict old_prompt, const char *restrict auth_user) { size_t len, n; int subst; diff --git a/plugins/sudoers/strlcpy_unesc.c b/plugins/sudoers/strlcpy_unesc.c index 56a7a4eb7..3df6e8b6c 100644 --- a/plugins/sudoers/strlcpy_unesc.c +++ b/plugins/sudoers/strlcpy_unesc.c @@ -33,7 +33,7 @@ * Like strlcpy() but collapses non-space chars escaped with a backslash. */ size_t -strlcpy_unescape(char *dst, const char *src, size_t size) +strlcpy_unescape(char *restrict dst, const char *restrict src, size_t size) { size_t len = 0; char ch; diff --git a/plugins/sudoers/sudoers.h b/plugins/sudoers/sudoers.h index 46f1cc4fe..ec34b22e1 100644 --- a/plugins/sudoers/sudoers.h +++ b/plugins/sudoers/sudoers.h @@ -333,7 +333,7 @@ int check_user_runchroot(const char *runchroot); int check_user_runcwd(const char *runcwd); /* prompt.c */ -char *expand_prompt(const struct sudoers_context *ctx, const char *old_prompt, const char *auth_user); +char *expand_prompt(const struct sudoers_context *ctx, const char *restrict old_prompt, const char *restrict auth_user); /* sudo_auth.c */ bool sudo_auth_needs_end_session(void); @@ -494,7 +494,7 @@ void canon_path_free(char *resolved); void canon_path_free_cache(void); /* strlcpy_unesc.c */ -size_t strlcpy_unescape(char *dst, const char *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));