commit 365bccde0e11442a9006138605c1f61c9e3fd624
parent dc7f23a3bbdfa0953f60809d4fc9588c1f1efe4a
Author: Michael Forney <mforney@mforney.org>
Date: Sat, 20 Apr 2019 09:51:18 -0700
Adjust some definitions to match declaration in usage of `restrict`
Diffstat:
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/libc/stdio/fgets.c b/src/libc/stdio/fgets.c
@@ -2,7 +2,7 @@
#undef fgets
char *
-fgets(char *s, int n, FILE *fp)
+fgets(char * restrict s, int n, FILE * restrict fp)
{
int ch = 0;
char *t = s;
diff --git a/src/libc/stdio/vfprintf.c b/src/libc/stdio/vfprintf.c
@@ -187,7 +187,7 @@ strout(char *s, size_t len, int width, int fill, FILE * restrict fp)
}
int
-vfprintf(FILE * restrict fp, const char *fmt, va_list va)
+vfprintf(FILE * restrict fp, const char * restrict fmt, va_list va)
{
int ch, n, flags, width, left, fill, cnt = 0;
size_t inc, len;
diff --git a/src/libc/stdio/vprintf.c b/src/libc/stdio/vprintf.c
@@ -3,7 +3,7 @@
#undef vprintf
int
-vprintf(const char *fmt, va_list ap)
+vprintf(const char * restrict fmt, va_list ap)
{
va_list ap2;
diff --git a/src/libc/stdlib/strtol.c b/src/libc/stdlib/strtol.c
@@ -9,7 +9,7 @@
#undef strtol
long
-strtol(const char *s, char **end, int base)
+strtol(const char * restrict s, char ** restrict end, int base)
{
int d, sign = -1;
long n;
diff --git a/src/libc/stdlib/strtoll.c b/src/libc/stdlib/strtoll.c
@@ -9,7 +9,7 @@
#undef strtoll
long long
-strtoll(const char *s, char **end, int base)
+strtoll(const char * restrict s, char ** restrict end, int base)
{
int d, sign = -1;
long long n;
diff --git a/src/libc/stdlib/strtoul.c b/src/libc/stdlib/strtoul.c
@@ -9,7 +9,7 @@
#undef strtoul
unsigned long
-strtoul(const char *s, char **end, int base)
+strtoul(const char * restrict s, char ** restrict end, int base)
{
int d, sign = 1;
unsigned long n;
diff --git a/src/libc/stdlib/strtoull.c b/src/libc/stdlib/strtoull.c
@@ -9,7 +9,7 @@
#undef strtoull
unsigned long long
-strtoull(const char *s, char **end, int base)
+strtoull(const char * restrict s, char ** restrict end, int base)
{
int d, sign = 1;
unsigned long long n;