diff options
author | Jiri Slaby (SUSE) <jirislaby@kernel.org> | 2023-08-16 12:55:28 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-22 14:58:15 +0200 |
commit | 64365743b366ae756d4e9c16a0b639960f417493 (patch) | |
tree | 39410dc611c447ebab474d643f3aa6cde667d3e2 /drivers/tty | |
parent | b49a0ff7328f5f9acfd027906f4c7d313a225361 (diff) |
tty: tty_buffer: better types in __tty_buffer_request_room()
* use bool for 'change' as it holds a result of a boolean.
* use size_t for 'left', so it is the same as 'size' which it is
compared to. Both are supposed to contain an unsigned value.
Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230816105530.3335-9-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/tty_buffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index e162318d6c31..414bb7f9155f 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -263,7 +263,8 @@ static int __tty_buffer_request_room(struct tty_port *port, size_t size, { struct tty_bufhead *buf = &port->buf; struct tty_buffer *b, *n; - int left, change; + size_t left; + bool change; b = buf->tail; if (!b->flags) |