diff options
author | Jim Meyering <jim@meyering.net> | 1992-11-12 02:19:02 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1992-11-12 02:19:02 +0000 |
commit | 5fdea6164b1d94feb110fc85d50ddae5f9e0a1c3 (patch) | |
tree | 47efacff83691ac74016d5f1fdff507ffc46071a | |
parent | 17387a999c446fab250321a02cbcb7774ec6c032 (diff) | |
download | coreutils-5fdea6164b1d94feb110fc85d50ddae5f9e0a1c3.tar.xz |
(set_mode): Parenthesize expressions with bit operations
to correctly set/reset modes bits.
-rw-r--r-- | src/stty.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stty.c b/src/stty.c index 7e27cac6f..f06a9759c 100644 --- a/src/stty.c +++ b/src/stty.c @@ -573,11 +573,12 @@ set_mode (info, reversed, mode) { if (reversed) { - mode->c_iflag = mode->c_iflag | ICRNL & ~INLCR & ~IGNCR; - mode->c_oflag = mode->c_oflag + mode->c_iflag = (mode->c_iflag | ICRNL) & ~INLCR & ~IGNCR; + mode->c_oflag = (mode->c_oflag #ifdef ONLCR | ONLCR #endif + ) #ifdef OCRNL & ~OCRNL #endif |