projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b3d33d
)
fix incorrect return value for fwide function
author
Rich Felker
<dalias@aerifal.cx>
Tue, 1 Jul 2014 22:49:54 +0000
(18:49 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 1 Jul 2014 22:49:54 +0000
(18:49 -0400)
when the orientation of the stream was already set, fwide was
incorrectly returning its argument (the requested orientation) rather
than the actual orientation of the stream.
src/stdio/fwide.c
patch
|
blob
|
history
diff --git
a/src/stdio/fwide.c
b/src/stdio/fwide.c
index fdf8e4bb334706ad8e4d2f911de30876e50b3bd4..8088e7ad4311f116a579c998f7aa4bee3e3e85c7 100644
(file)
--- a/
src/stdio/fwide.c
+++ b/
src/stdio/fwide.c
@@
-7,7
+7,8
@@
int fwide(FILE *f, int mode)
{
FLOCK(f);
- if (!f->mode) mode = f->mode = NORMALIZE(mode);
+ if (!f->mode) f->mode = NORMALIZE(mode);
+ mode = f->mode;
FUNLOCK(f);
return mode;
}