提交 ebd8142a 编写于 作者: R Rich Felker

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.
上级 0b3d33d4
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册