Skip to content

Commit 3e540a7

Browse files
Jiri Slabygregkh
authored andcommitted
tty_audit: make icanon a bool
Use bool for tty_audit_buf::icanon in favor of ugly bitfields. And get rid of "!!" as that is completely unnecessary. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20230621101611.10580-5-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 94f9481 commit 3e540a7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/tty/tty_audit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
struct tty_audit_buf {
1616
struct mutex mutex; /* Protects all data below */
1717
dev_t dev; /* The TTY which the data is from */
18-
unsigned icanon:1;
18+
bool icanon;
1919
size_t valid;
2020
unsigned char *data; /* Allocated size N_TTY_BUF_SIZE */
2121
};
@@ -202,8 +202,8 @@ static struct tty_audit_buf *tty_audit_buf_get(void)
202202
void tty_audit_add_data(struct tty_struct *tty, const void *data, size_t size)
203203
{
204204
struct tty_audit_buf *buf;
205-
unsigned int icanon = !!L_ICANON(tty);
206205
unsigned int audit_tty;
206+
bool icanon = L_ICANON(tty);
207207
dev_t dev;
208208

209209
audit_tty = READ_ONCE(current->signal->audit_tty);

0 commit comments

Comments
 (0)