diff --git a/include/sudo_util.h b/include/sudo_util.h index 971aad22a9..5fe580b396 100644 --- a/include/sudo_util.h +++ b/include/sudo_util.h @@ -262,7 +262,7 @@ sudo_dso_public int sudo_mmap_protect_v1(void *ptr); #define sudo_mmap_protect(_a) sudo_mmap_protect_v1(_a) /* multiarch.c */ -sudo_dso_public char *sudo_stat_multiarch_v1(const char * restrict path, struct stat * restrict sb); +sudo_dso_public char *sudo_stat_multiarch_v1(const char *path, struct stat *sb); #define sudo_stat_multiarch(_a, _b) sudo_stat_multiarch_v1((_a), (_b)) /* parseln.c */ diff --git a/lib/eventlog/logwrap.c b/lib/eventlog/logwrap.c index 1ade0fb3ac..612379f288 100644 --- a/lib/eventlog/logwrap.c +++ b/lib/eventlog/logwrap.c @@ -28,7 +28,7 @@ #include size_t -eventlog_writeln(FILE * restrict fp, char * restrict line, size_t linelen, size_t maxlen) +eventlog_writeln(FILE *fp, char *line, size_t linelen, size_t maxlen) { const char *indent = ""; char *beg = line; diff --git a/lib/util/multiarch.c b/lib/util/multiarch.c index 186347aedc..ef847589bf 100644 --- a/lib/util/multiarch.c +++ b/lib/util/multiarch.c @@ -39,7 +39,7 @@ * Returns a dynamically allocated string on success and NULL on failure. */ char * -sudo_stat_multiarch_v1(const char * restrict path, struct stat * restrict sb) +sudo_stat_multiarch_v1(const char *path, struct stat *sb) { # if defined(__ILP32__) const char *libdirs[] = { "/libx32/", "/lib/", "/libexec/", NULL }; @@ -91,7 +91,7 @@ sudo_stat_multiarch_v1(const char * restrict path, struct stat * restrict sb) } #else char * -sudo_stat_multiarch_v1(const char * restrict path, struct stat * restrict sb) +sudo_stat_multiarch_v1(const char *path, struct stat *sb) { return NULL; } diff --git a/lib/util/ttyname_dev.c b/lib/util/ttyname_dev.c index 23066da345..1ef8eafd01 100644 --- a/lib/util/ttyname_dev.c +++ b/lib/util/ttyname_dev.c @@ -216,7 +216,7 @@ sudo_ttyname_scan(const char *dir, dev_t rdev, char *name, size_t namelen) } static char * -sudo_dev_check(dev_t rdev, const char * restrict devname, char * restrict buf, size_t buflen) +sudo_dev_check(dev_t rdev, const char *devname, char *buf, size_t buflen) { struct stat sb; debug_decl(sudo_dev_check, SUDO_DEBUG_UTIL); diff --git a/logsrvd/logsrvd_journal.c b/logsrvd/logsrvd_journal.c index a0103450cd..62ad6b7b97 100644 --- a/logsrvd/logsrvd_journal.c +++ b/logsrvd/logsrvd_journal.c @@ -527,8 +527,8 @@ journal_restart(const RestartMessage *msg, const uint8_t *buf, size_t buflen, } static bool -journal_write(const uint8_t * restrict buf, size_t len, - struct connection_closure * restrict closure) +journal_write(const uint8_t *buf, size_t len, + struct connection_closure *closure) { uint32_t msg_len; debug_decl(journal_write, SUDO_DEBUG_UTIL); @@ -597,8 +597,8 @@ journal_accept(const AcceptMessage *msg, const uint8_t *buf, size_t len, * Store a RejectMessage from the client in the journal. */ static bool -journal_reject(const RejectMessage *msg, const uint8_t * restrict buf, - size_t len, struct connection_closure * restrict closure) +journal_reject(const RejectMessage *msg, const uint8_t *buf, + size_t len, struct connection_closure *closure) { debug_decl(journal_reject, SUDO_DEBUG_UTIL); @@ -617,8 +617,8 @@ journal_reject(const RejectMessage *msg, const uint8_t * restrict buf, * Store an ExitMessage from the client in the journal. */ static bool -journal_exit(const ExitMessage *msg, const uint8_t * restrict buf, size_t len, - struct connection_closure * restrict closure) +journal_exit(const ExitMessage *msg, const uint8_t *buf, size_t len, + struct connection_closure *closure) { debug_decl(journal_exit, SUDO_DEBUG_UTIL); @@ -635,8 +635,8 @@ journal_exit(const ExitMessage *msg, const uint8_t * restrict buf, size_t len, * Store an AlertMessage from the client in the journal. */ static bool -journal_alert(const AlertMessage *msg, const uint8_t * restrict buf, size_t len, - struct connection_closure * restrict closure) +journal_alert(const AlertMessage *msg, const uint8_t *buf, size_t len, + struct connection_closure *closure) { debug_decl(journal_alert, SUDO_DEBUG_UTIL); @@ -655,8 +655,8 @@ journal_alert(const AlertMessage *msg, const uint8_t * restrict buf, size_t len, * Store an IoBuffer from the client in the journal. */ static bool -journal_iobuf(int iofd, const IoBuffer *iobuf, const uint8_t * restrict buf, - size_t len, struct connection_closure * restrict closure) +journal_iobuf(int iofd, const IoBuffer *iobuf, const uint8_t *buf, + size_t len, struct connection_closure *closure) { debug_decl(journal_iobuf, SUDO_DEBUG_UTIL); @@ -671,8 +671,8 @@ journal_iobuf(int iofd, const IoBuffer *iobuf, const uint8_t * restrict buf, * Store a CommandSuspend message from the client in the journal. */ static bool -journal_suspend(const CommandSuspend *msg, const uint8_t * restrict buf, - size_t len, struct connection_closure * restrict closure) +journal_suspend(const CommandSuspend *msg, const uint8_t *buf, + size_t len, struct connection_closure *closure) { debug_decl(journal_suspend, SUDO_DEBUG_UTIL); @@ -685,8 +685,8 @@ journal_suspend(const CommandSuspend *msg, const uint8_t * restrict buf, * Store a ChangeWindowSize message from the client in the journal. */ static bool -journal_winsize(const ChangeWindowSize *msg, const uint8_t * restrict buf, - size_t len, struct connection_closure * restrict closure) +journal_winsize(const ChangeWindowSize *msg, const uint8_t *buf, + size_t len, struct connection_closure *closure) { debug_decl(journal_winsize, SUDO_DEBUG_UTIL); diff --git a/plugins/audit_json/audit_json.c b/plugins/audit_json/audit_json.c index 63321a73c0..0adc8b84d8 100644 --- a/plugins/audit_json/audit_json.c +++ b/plugins/audit_json/audit_json.c @@ -383,7 +383,7 @@ add_timestamp(struct json_container *jsonc, struct timespec *ts) } static int -audit_write_json(struct json_container * restrict jsonc) +audit_write_json(struct json_container *jsonc) { struct stat sb; int ret = -1; diff --git a/plugins/sudoers/cvtsudoers.c b/plugins/sudoers/cvtsudoers.c index 689c15137a..3c8d158b29 100644 --- a/plugins/sudoers/cvtsudoers.c +++ b/plugins/sudoers/cvtsudoers.c @@ -1079,7 +1079,7 @@ print_aliases_sudoers(struct sudoers_parse_tree *parse_tree, static FILE *output_fp; /* global for convert_sudoers_output */ static int -convert_sudoers_output(const char * restrict buf) +convert_sudoers_output(const char *buf) { return fputs(buf, output_fp); } diff --git a/plugins/sudoers/cvtsudoers_csv.c b/plugins/sudoers/cvtsudoers_csv.c index bf025280a7..a4455907b1 100644 --- a/plugins/sudoers/cvtsudoers_csv.c +++ b/plugins/sudoers/cvtsudoers_csv.c @@ -107,7 +107,7 @@ defaults_to_alias_type(int defaults_type) * XXX - rewrite this */ static bool -print_csv_string(FILE * restrict fp, const char * restrict str, bool quoted) +print_csv_string(FILE *fp, const char *str, bool quoted) { const char *src = str; char *dst, *newstr; diff --git a/plugins/sudoers/testsudoers.c b/plugins/sudoers/testsudoers.c index 13bbb00aa6..bb9e85cbfd 100644 --- a/plugins/sudoers/testsudoers.c +++ b/plugins/sudoers/testsudoers.c @@ -65,8 +65,8 @@ enum sudoers_formats { static void dump_sudoers(void); static void set_runaspw(struct sudoers_context *ctx, const char *); static void set_runasgr(struct sudoers_context *ctx, const char *); -static int testsudoers_error(const char * restrict buf); -static int testsudoers_output(const char * restrict buf); +static int testsudoers_error(const char *buf); +static int testsudoers_output(const char *buf); sudo_noreturn static void usage(void); static void cb_lookup(const struct sudoers_parse_tree *parse_tree, const struct userspec *us, int user_match, const struct privilege *priv, int host_match, const struct cmndspec *cs, int date_match, int runas_match, int cmnd_match, void *closure); static int testsudoers_query(struct sudoers_context *ctx, const struct sudo_nss *nss, struct passwd *pw); @@ -744,13 +744,13 @@ dump_sudoers(void) } static int -testsudoers_output(const char * restrict buf) +testsudoers_output(const char *buf) { return fputs(buf, stdout); } static int -testsudoers_error(const char *restrict buf) +testsudoers_error(const char *buf) { return fputs(buf, stderr); } diff --git a/src/parse_args.c b/src/parse_args.c index 65510c02af..baee6cbad5 100644 --- a/src/parse_args.c +++ b/src/parse_args.c @@ -756,7 +756,7 @@ usage_excl_ticket(void) } static int -help_out(const char * restrict buf) +help_out(const char *buf) { return fputs(buf, stdout); }