use restrict everywhere it's required by c99 and/or posix 2008
[musl] / src / multibyte / wcstombs.c
index b9c1b18..b6ae473 100644 (file)
@@ -11,7 +11,8 @@
 
 #include "internal.h"
 
-size_t wcstombs(char *s, const wchar_t *ws, size_t n)
+size_t wcstombs(char *restrict s, const wchar_t *restrict ws, size_t n)
 {
-       return wcsrtombs(s, &ws, n, 0);
+       const wchar_t * x = ws;
+       return wcsrtombs(s, &x, n, 0);
 }