Skip to content

Commit 046b44a

Browse files
Jiri Slaby (SUSE)gregkh
authored andcommitted
tty: n_tty: remove unsigned char casts from character constants
We compile with -funsigned-char, so all character constants are already unsigned chars. Therefore, remove superfluous casts. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0083040 commit 046b44a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/tty/n_tty.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ static bool n_tty_receive_char_canon(struct tty_struct *tty, u8 c)
13471347
* XXX does PARMRK doubling happen for
13481348
* EOL_CHAR and EOL2_CHAR?
13491349
*/
1350-
if (c == (unsigned char) '\377' && I_PARMRK(tty))
1350+
if (c == '\377' && I_PARMRK(tty))
13511351
put_tty_queue(c, ldata);
13521352

13531353
n_tty_receive_handle_newline(tty, c);
@@ -1409,7 +1409,7 @@ static void n_tty_receive_char_special(struct tty_struct *tty, unsigned char c,
14091409
}
14101410

14111411
/* PARMRK doubling check */
1412-
if (c == (unsigned char) '\377' && I_PARMRK(tty))
1412+
if (c == '\377' && I_PARMRK(tty))
14131413
put_tty_queue(c, ldata);
14141414

14151415
put_tty_queue(c, ldata);
@@ -1444,7 +1444,7 @@ static void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
14441444
commit_echoes(tty);
14451445
}
14461446
/* PARMRK doubling check */
1447-
if (c == (unsigned char) '\377' && I_PARMRK(tty))
1447+
if (c == '\377' && I_PARMRK(tty))
14481448
put_tty_queue(c, ldata);
14491449
put_tty_queue(c, ldata);
14501450
}

0 commit comments

Comments
 (0)