fix incorrect return value for fwide function
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.
This commit is contained in:
parent
0b3d33d4d2
commit
ebd8142a6a
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue