diff options
author | Jiri Slaby <jirislaby@kernel.org> | 2023-06-21 12:16:09 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-06-21 17:57:29 +0200 |
commit | 3e540a7bad8534a9b8845defa051834c9694d86c (patch) | |
tree | da2afe684cb0c6038f2ca55a108b7d10cd686c06 /drivers/tty | |
parent | 94f94810efc4b4b337c9f2abc8b0188cef5ccb9b (diff) | |
download | lwn-3e540a7bad8534a9b8845defa051834c9694d86c.tar.gz lwn-3e540a7bad8534a9b8845defa051834c9694d86c.zip |
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/tty_audit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c index c6c27acad2ad..6cf8b63368ee 100644 --- a/drivers/tty/tty_audit.c +++ b/drivers/tty/tty_audit.c @@ -15,7 +15,7 @@ struct tty_audit_buf { struct mutex mutex; /* Protects all data below */ dev_t dev; /* The TTY which the data is from */ - unsigned icanon:1; + bool icanon; size_t valid; unsigned char *data; /* Allocated size N_TTY_BUF_SIZE */ }; @@ -202,8 +202,8 @@ static struct tty_audit_buf *tty_audit_buf_get(void) void tty_audit_add_data(struct tty_struct *tty, const void *data, size_t size) { struct tty_audit_buf *buf; - unsigned int icanon = !!L_ICANON(tty); unsigned int audit_tty; + bool icanon = L_ICANON(tty); dev_t dev; audit_tty = READ_ONCE(current->signal->audit_tty); |