summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-08-14 13:36:10 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-08-14 17:54:49 +0200
commitfdb16de38705ccff0dbf38af9956eb4165710106 (patch)
treec02ed2ab338c6caabe2aa69f2c52ab6dac545d3d /stdio-common
parentImprove performance of sinf and cosf (diff)
downloadglibc-fdb16de38705ccff0dbf38af9956eb4165710106.tar.gz
glibc-fdb16de38705ccff0dbf38af9956eb4165710106.tar.bz2
glibc-fdb16de38705ccff0dbf38af9956eb4165710106.zip
error, warn, warnx: Use __fxprintf for wide printing [BZ #23519]
Also introduce the __vfxprintf function.
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/fxprintf.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/stdio-common/fxprintf.c b/stdio-common/fxprintf.c
index c4a1146b20..8d02b71f91 100644
--- a/stdio-common/fxprintf.c
+++ b/stdio-common/fxprintf.c
@@ -62,18 +62,22 @@ locked_vfxprintf (FILE *fp, const char *fmt, va_list ap)
}
int
-__fxprintf (FILE *fp, const char *fmt, ...)
+__vfxprintf (FILE *fp, const char *fmt, va_list ap)
{
if (fp == NULL)
fp = stderr;
-
- va_list ap;
- va_start (ap, fmt);
_IO_flockfile (fp);
-
int res = locked_vfxprintf (fp, fmt, ap);
-
_IO_funlockfile (fp);
+ return res;
+}
+
+int
+__fxprintf (FILE *fp, const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int res = __vfxprintf (fp, fmt, ap);
va_end (ap);
return res;
}