diff options
author | Arwed Meyer | 2022-09-11 20:18:37 +0200 |
---|---|---|
committer | Marc-André Lureau | 2022-09-29 12:38:05 +0200 |
commit | 8f9abdf586d48552273abe38cf55058f7d0c85fd (patch) | |
tree | dcc0fd036654a1e40fdc920e5f54da661b8b5ef3 /chardev | |
parent | msmouse: Handle mouse reset (diff) | |
download | qemu-8f9abdf586d48552273abe38cf55058f7d0c85fd.tar.gz qemu-8f9abdf586d48552273abe38cf55058f7d0c85fd.tar.xz qemu-8f9abdf586d48552273abe38cf55058f7d0c85fd.zip |
chardev: src buffer const for write functions
Make source buffers const for char be write functions.
This allows using buffers returned by fifo as buf parameter and source buffer
should not be changed by write functions anyway.
Signed-off-by: Arwed Meyer <arwed.meyer@gmx.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220911181840.8933-3-arwed.meyer@gmx.de>
Diffstat (limited to 'chardev')
-rw-r--r-- | chardev/char.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chardev/char.c b/chardev/char.c index 0169d8dde4..b005df3ccf 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -193,7 +193,7 @@ int qemu_chr_be_can_write(Chardev *s) return be->chr_can_read(be->opaque); } -void qemu_chr_be_write_impl(Chardev *s, uint8_t *buf, int len) +void qemu_chr_be_write_impl(Chardev *s, const uint8_t *buf, int len) { CharBackend *be = s->be; @@ -202,7 +202,7 @@ void qemu_chr_be_write_impl(Chardev *s, uint8_t *buf, int len) } } -void qemu_chr_be_write(Chardev *s, uint8_t *buf, int len) +void qemu_chr_be_write(Chardev *s, const uint8_t *buf, int len) { if (qemu_chr_replay(s)) { if (replay_mode == REPLAY_MODE_PLAY) { |