summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorSebastien Marie <semarie@cvs.openbsd.org>2019-03-03 16:41:42 +0000
committerSebastien Marie <semarie@cvs.openbsd.org>2019-03-03 16:41:42 +0000
commitaa22d3bf4fe94ab72bcce63b77cb80605ce27f72 (patch)
tree6a2ab84151621f8d8c0720fea388c7873166a25a /lib/libc/stdio
parent89508f51cfa8a892c4883d372ba8b2c7a869d37f (diff)
in vdprintf(), no need to use the file locking mecanism when using
fflush() as the variable is stack based (no possible concurrent access). call directly __sflush() ok visa@ deraadt@
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/vdprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/vdprintf.c b/lib/libc/stdio/vdprintf.c
index e76fcd4987b..ad4ab0a760e 100644
--- a/lib/libc/stdio/vdprintf.c
+++ b/lib/libc/stdio/vdprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdprintf.c,v 1.2 2015/08/31 02:53:57 guenther Exp $ */
+/* $OpenBSD: vdprintf.c,v 1.3 2019/03/03 16:41:41 semarie Exp $ */
/* $FreeBSD: src/lib/libc/stdio/vdprintf.c,v 1.4 2012/11/17 01:49:40 svnexp Exp $ */
/*-
@@ -69,6 +69,6 @@ vdprintf(int fd, const char * __restrict fmt, va_list ap)
if ((ret = __vfprintf(&f, fmt, ap)) < 0)
return ret;
- return fflush(&f) ? EOF : ret;
+ return __sflush(&f) ? EOF : ret;
}
DEF_WEAK(vdprintf);