mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 22:35:10 +00:00
Give every printf-like function restrict qualifiers
The format value has to be a string literal, every time. Otherwise, you are not using these functions correctly. To reinforce this fact, I putrestrict over every non-contrib example of this I could find.
This commit is contained in:
@@ -103,7 +103,7 @@ audit_failure_int(char *const argv[], const char *message)
|
||||
}
|
||||
|
||||
int
|
||||
vaudit_failure(char *const argv[], char const *const fmt, va_list ap)
|
||||
vaudit_failure(char *const argv[], char const * restrict const fmt, va_list ap)
|
||||
{
|
||||
int oldlocale, ret;
|
||||
char *message;
|
||||
@@ -129,7 +129,7 @@ vaudit_failure(char *const argv[], char const *const fmt, va_list ap)
|
||||
}
|
||||
|
||||
int
|
||||
audit_failure(char *const argv[], char const *const fmt, ...)
|
||||
audit_failure(char *const argv[], char const * restrict const fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
Reference in New Issue
Block a user