From aa22d3bf4fe94ab72bcce63b77cb80605ce27f72 Mon Sep 17 00:00:00 2001 From: Sebastien Marie Date: Sun, 3 Mar 2019 16:41:42 +0000 Subject: 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@ --- lib/libc/stdio/vdprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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); -- cgit v1.2.3