about summary refs log tree commit diff
path: root/src/stdio/fwide.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/fwide.c')
-rw-r--r--src/stdio/fwide.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stdio/fwide.c b/src/stdio/fwide.c
index fdf8e4bb..8088e7ad 100644
--- 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;
 }