aboutsummaryrefslogtreecommitdiff
path: root/chardev/chardev-internal.h
diff options
context:
space:
mode:
authorRoman Penyaev <r.peniaev@gmail.com>2024-10-14 17:24:04 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2024-10-15 12:26:01 +0400
commitc64f0bc1ce2f1d117d581b3445fe8286acd413d0 (patch)
tree1f2c781f64cec13ec76c2ea7bfad679a6bfe21f6 /chardev/chardev-internal.h
parent1ba399406a8fa82ad24fd5208595ca429d2927ab (diff)
chardev/mux: convert size members to unsigned int
There is no sense to keep `focus`, `mux_cnt`, `prod`, `cons` and `tag` variables as signed, those represent either size, either position in array, which both are unsigned. `focus` member of `MuxChardev` is kept signed, because initially set to -1. Signed-off-by: Roman Penyaev <r.peniaev@gmail.com> Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com> Cc: qemu-devel@nongnu.org Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20241014152408.427700-5-r.peniaev@gmail.com>
Diffstat (limited to 'chardev/chardev-internal.h')
-rw-r--r--chardev/chardev-internal.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/chardev/chardev-internal.h b/chardev/chardev-internal.h
index 975c16de80..ab93f6ea17 100644
--- a/chardev/chardev-internal.h
+++ b/chardev/chardev-internal.h
@@ -38,14 +38,14 @@ struct MuxChardev {
CharBackend *backends[MAX_MUX];
CharBackend chr;
int focus;
- int mux_cnt;
+ unsigned int mux_cnt;
bool term_got_escape;
/* Intermediate input buffer catches escape sequences even if the
currently active device is not accepting any input - but only until it
is full as well. */
unsigned char buffer[MAX_MUX][MUX_BUFFER_SIZE];
- int prod[MAX_MUX];
- int cons[MAX_MUX];
+ unsigned int prod[MAX_MUX];
+ unsigned int cons[MAX_MUX];
int timestamps;
/* Protected by the Chardev chr_write_lock. */
@@ -59,7 +59,7 @@ DECLARE_INSTANCE_CHECKER(MuxChardev, MUX_CHARDEV,
#define CHARDEV_IS_MUX(chr) \
object_dynamic_cast(OBJECT(chr), TYPE_CHARDEV_MUX)
-void mux_set_focus(Chardev *chr, int focus);
+void mux_set_focus(Chardev *chr, unsigned int focus);
void mux_chr_send_all_event(Chardev *chr, QEMUChrEvent event);
Object *get_chardevs_root(void);