diff --git a/lib/libc/minimal/include/stdio.h b/lib/libc/minimal/include/stdio.h index a1c9d44ba64..b3cf98f7276 100644 --- a/lib/libc/minimal/include/stdio.h +++ b/lib/libc/minimal/include/stdio.h @@ -32,19 +32,19 @@ typedef int FILE; #define stderr ((FILE *) 3) int __printf_like(1, 2) printf(const char *_MLIBC_RESTRICT fmt, ...); -int __printf_like(3, 4) snprintf(char *_MLIBC_RESTRICT s, size_t len, +int __printf_like(3, 4) snprintf(char *_MLIBC_RESTRICT str, size_t len, const char *_MLIBC_RESTRICT fmt, ...); -int __printf_like(2, 3) sprintf(char *_MLIBC_RESTRICT s, +int __printf_like(2, 3) sprintf(char *_MLIBC_RESTRICT str, const char *_MLIBC_RESTRICT fmt, ...); int __printf_like(2, 3) fprintf(FILE * _MLIBC_RESTRICT stream, const char *_MLIBC_RESTRICT format, ...); int __printf_like(1, 0) vprintf(const char *_MLIBC_RESTRICT fmt, va_list list); -int __printf_like(3, 0) vsnprintf(char *_MLIBC_RESTRICT s, size_t len, +int __printf_like(3, 0) vsnprintf(char *_MLIBC_RESTRICT str, size_t len, const char *_MLIBC_RESTRICT fmt, va_list list); -int __printf_like(2, 0) vsprintf(char *_MLIBC_RESTRICT s, +int __printf_like(2, 0) vsprintf(char *_MLIBC_RESTRICT str, const char *_MLIBC_RESTRICT fmt, va_list list); int __printf_like(2, 0) vfprintf(FILE * _MLIBC_RESTRICT stream, const char *_MLIBC_RESTRICT format, diff --git a/lib/libc/minimal/source/stdout/sprintf.c b/lib/libc/minimal/source/stdout/sprintf.c index 1ab772d504f..75f0994b436 100644 --- a/lib/libc/minimal/source/stdout/sprintf.c +++ b/lib/libc/minimal/source/stdout/sprintf.c @@ -25,7 +25,7 @@ static int sprintf_out(int c, struct emitter *p) return 0; /* indicate keep going so we get the total count */ } -int snprintf(char *_MLIBC_RESTRICT s, size_t len, +int snprintf(char *_MLIBC_RESTRICT str, size_t len, const char *_MLIBC_RESTRICT format, ...) { va_list vargs; @@ -35,10 +35,10 @@ int snprintf(char *_MLIBC_RESTRICT s, size_t len, char dummy; if (len == 0) { - s = &dummy; /* write final NUL to dummy, can't change *s */ + str = &dummy; /* write final NUL to dummy, can't change *s */ } - p.ptr = s; + p.ptr = str; p.len = (int) len; va_start(vargs, format); @@ -49,14 +49,14 @@ int snprintf(char *_MLIBC_RESTRICT s, size_t len, return r; } -int sprintf(char *_MLIBC_RESTRICT s, const char *_MLIBC_RESTRICT format, ...) +int sprintf(char *_MLIBC_RESTRICT str, const char *_MLIBC_RESTRICT format, ...) { va_list vargs; struct emitter p; int r; - p.ptr = s; + p.ptr = str; p.len = (int) 0x7fffffff; /* allow up to "maxint" characters */ va_start(vargs, format); @@ -67,7 +67,7 @@ int sprintf(char *_MLIBC_RESTRICT s, const char *_MLIBC_RESTRICT format, ...) return r; } -int vsnprintf(char *_MLIBC_RESTRICT s, size_t len, +int vsnprintf(char *_MLIBC_RESTRICT str, size_t len, const char *_MLIBC_RESTRICT format, va_list vargs) { struct emitter p; @@ -75,10 +75,10 @@ int vsnprintf(char *_MLIBC_RESTRICT s, size_t len, char dummy; if (len == 0) { - s = &dummy; /* write final NUL to dummy, can't change * *s */ + str = &dummy; /* write final NUL to dummy, can't change * *s */ } - p.ptr = s; + p.ptr = str; p.len = (int) len; r = cbvprintf(sprintf_out, (void *) (&p), format, vargs); @@ -87,13 +87,13 @@ int vsnprintf(char *_MLIBC_RESTRICT s, size_t len, return r; } -int vsprintf(char *_MLIBC_RESTRICT s, const char *_MLIBC_RESTRICT format, +int vsprintf(char *_MLIBC_RESTRICT str, const char *_MLIBC_RESTRICT format, va_list vargs) { struct emitter p; int r; - p.ptr = s; + p.ptr = str; p.len = (int) 0x7fffffff; /* allow up to "maxint" characters */ r = cbvprintf(sprintf_out, (void *) (&p), format, vargs);