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:
726df5a
)
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>
Mon, 28 Jul 2014 04:27:58 +0000
(
00:27
-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.
(cherry picked from commit
ebd8142a6ae19db1a5440d11c01afc7529eae0cd
)
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;
}