From 5fdea6164b1d94feb110fc85d50ddae5f9e0a1c3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 12 Nov 1992 02:19:02 +0000 Subject: [PATCH] (set_mode): Parenthesize expressions with bit operations to correctly set/reset modes bits. --- src/stty.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stty.c b/src/stty.c index 7e27cac6fc..f06a9759c8 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 -- 2.47.3