about summary refs log tree commit diff
path: root/src/stdio/vdprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/vdprintf.c')
-rw-r--r--src/stdio/vdprintf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stdio/vdprintf.c b/src/stdio/vdprintf.c
index 68562e05..faf9536a 100644
--- a/src/stdio/vdprintf.c
+++ b/src/stdio/vdprintf.c
@@ -11,9 +11,9 @@ int vdprintf(int fd, const char *fmt, va_list ap)
 	unsigned char buf[BUFSIZ];
 	FILE f = {
 		.fd = fd, .lbf = EOF, .write = wrap_write,
-		.buf = buf+UNGET, .buf_size = sizeof buf - UNGET
+		.buf = buf+UNGET, .buf_size = sizeof buf - UNGET,
+		.lock = -1
 	};
 	r = vfprintf(&f, fmt, ap);
-	__oflow(&f);
-	return r;
+	return fflush(&f) ? EOF : r;
 }