diff options
author | Florian Weimer <fweimer@redhat.com> | 2018-08-14 13:36:10 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2018-08-14 17:54:49 +0200 |
commit | fdb16de38705ccff0dbf38af9956eb4165710106 (patch) | |
tree | c02ed2ab338c6caabe2aa69f2c52ab6dac545d3d /stdio-common | |
parent | 599cf3976679e1b345307d9c02057f02aa95528f (diff) | |
download | glibc-fdb16de38705ccff0dbf38af9956eb4165710106.tar.gz glibc-fdb16de38705ccff0dbf38af9956eb4165710106.tar.xz 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.c | 16 |
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; } |