summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/vdprintf.c
diff options
context:
space:
mode:
authorsemarie <semarie@openbsd.org>2019-03-03 16:41:41 +0000
committersemarie <semarie@openbsd.org>2019-03-03 16:41:41 +0000
commitc9c20a9e07851792a30637ef9c1ea81b5170600b (patch)
treef231399c8508fb7b530f0df8a32cbe4aa9990086 /lib/libc/stdio/vdprintf.c
parentFound some historical code. Don't cast the pointer for bzero to a different type, (diff)
downloadwireguard-openbsd-c9c20a9e07851792a30637ef9c1ea81b5170600b.tar.xz
wireguard-openbsd-c9c20a9e07851792a30637ef9c1ea81b5170600b.zip
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/vdprintf.c')
-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);