summaryrefslogtreecommitdiff
path: root/src/stdio/vfprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/vfprintf.c')
-rw-r--r--src/stdio/vfprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c
index b6bb3bcf..57878c03 100644
--- a/src/stdio/vfprintf.c
+++ b/src/stdio/vfprintf.c
@@ -434,7 +434,7 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
/* Update output count, end loop when fmt is exhausted */
if (cnt >= 0) {
if (l > INT_MAX - cnt) {
- if (!ferror(f)) errno = EOVERFLOW;
+ errno = EOVERFLOW;
cnt = -1;
} else cnt += l;
}