mirror of
https://github.com/FAUSheppy/colorredstderr-mirror
synced 2025-12-12 01:48:33 +01:00
Add missing const and document where it can't be used.
This commit is contained in:
@@ -507,14 +507,14 @@ int execve(char const *filename, char * const argv[], char * const env[]) {
|
||||
/* Count arguments. */ \
|
||||
size_t count = 1; /* arg */ \
|
||||
va_start(ap, arg); \
|
||||
while (va_arg(ap, char const *)) { \
|
||||
while (va_arg(ap, char *)) { \
|
||||
count++; \
|
||||
} \
|
||||
va_end(ap); \
|
||||
\
|
||||
/* Copy varargs. */ \
|
||||
char *args[count + 1 /* terminating NULL */]; \
|
||||
args[0] = (char *)arg; \
|
||||
args[0] = (char *)arg; /* there's no other way around the cast */ \
|
||||
\
|
||||
size_t i = 1; \
|
||||
va_start(ap, arg); \
|
||||
|
||||
Reference in New Issue
Block a user