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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user