1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 02:36:16 +02:00

(set_mode): Parenthesize expressions with bit operations

to correctly set/reset modes bits.
This commit is contained in:
Jim Meyering
1992-11-12 02:19:02 +00:00
parent 17387a999c
commit 5fdea6164b

View File

@@ -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