projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
868c964
)
in printf, use ferror macro rather than directly inspecting flags bit
author
Rich Felker
<dalias@aerifal.cx>
Mon, 20 Mar 2023 23:16:21 +0000
(19:16 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 21 Mar 2023 13:11:17 +0000
(09:11 -0400)
this is purely aesthetic and should not affect code generation or
functionality.
src/stdio/vfprintf.c
patch
|
blob
|
history
diff --git
a/src/stdio/vfprintf.c
b/src/stdio/vfprintf.c
index
7b84808
..
a712d80
100644
(file)
--- a/
src/stdio/vfprintf.c
+++ b/
src/stdio/vfprintf.c
@@
-132,7
+132,7
@@
static void pop_arg(union arg *arg, int type, va_list *ap)
static void out(FILE *f, const char *s, size_t l)
{
- if (!
(f->flags & F_ERR
)) __fwritex((void *)s, l, f);
+ if (!
ferror(f
)) __fwritex((void *)s, l, f);
}
static void pad(FILE *f, char c, int w, int l, int fl)
@@
-693,7
+693,7
@@
int vfprintf(FILE *restrict f, const char *restrict fmt, va_list ap)
f->buf_size = 0;
f->wpos = f->wbase = f->wend = 0;
}
- if (f
->flags & F_ERR
) ret = -1;
+ if (f
error(f)
) ret = -1;
f->flags |= olderr;
FUNLOCK(f);
va_end(ap2);