fix copy/paste error in popen changes that broke signals
[musl] / src / stdio / vfwprintf.c
index 42ce304..a42ba19 100644 (file)
@@ -292,7 +292,7 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
                case 's':
                        bs = arg.p;
                        if (p<0) p = INT_MAX;
-                       for (l=0; l<p && (i=mbtowc(&wc, bs, MB_LEN_MAX))>0; bs+=i, l++);
+                       for (i=l=0; l<p && (i=mbtowc(&wc, bs, MB_LEN_MAX))>0; bs+=i, l++);
                        if (i<0) return -1;
                        p=l;
                        if (w<p) w=p;
@@ -336,7 +336,7 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
        return 1;
 }
 
-int vfwprintf(FILE *f, const wchar_t *fmt, va_list ap)
+int vfwprintf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap)
 {
        va_list ap2;
        int nl_type[NL_ARGMAX] = {0};