Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/sudo_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion lib/eventlog/logwrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <sudo_eventlog.h>

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;
Expand Down
4 changes: 2 additions & 2 deletions lib/util/multiarch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/util/ttyname_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
28 changes: 14 additions & 14 deletions logsrvd/logsrvd_journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand All @@ -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);

Expand All @@ -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);

Expand All @@ -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);

Expand All @@ -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);

Expand All @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion plugins/audit_json/audit_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion plugins/sudoers/cvtsudoers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/sudoers/cvtsudoers_csv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions plugins/sudoers/testsudoers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/parse_args.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Loading