aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/flags.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/flags.c')
-rw-r--r--newlib/libc/stdio/flags.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/stdio/flags.c b/newlib/libc/stdio/flags.c
index d7bf52b..26d2f82 100644
--- a/newlib/libc/stdio/flags.c
+++ b/newlib/libc/stdio/flags.c
@@ -62,7 +62,7 @@ _DEFUN(__sflags, (ptr, mode, optr),
}
if (mode[1] && (mode[1] == '+' || mode[2] == '+'))
{
- ret = __SRW;
+ ret = (ret & ~(__SRD | __SWR)) | __SRW;
m = O_RDWR;
}
if (mode[1] && (mode[1] == 'b' || mode[2] == 'b'))