From: Jim Meyering Date: Thu, 12 Nov 1992 02:19:02 +0000 (+0000) Subject: (set_mode): Parenthesize expressions with bit operations X-Git-Tag: ISDIGIT-bug-fix~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fdea6164b1d94feb110fc85d50ddae5f9e0a1c3;p=thirdparty%2Fcoreutils.git (set_mode): Parenthesize expressions with bit operations to correctly set/reset modes bits. --- 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