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 /include/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 'include/chardev')
-rw-r--r-- | include/chardev/char.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/chardev/char.h b/include/chardev/char.h index a319b5fdff..44cd82e405 100644 --- a/include/chardev/char.h +++ b/include/chardev/char.h @@ -186,7 +186,7 @@ int qemu_chr_be_can_write(Chardev *s); * the caller should call @qemu_chr_be_can_write to determine how much data * the front end can currently accept. */ -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); /** * qemu_chr_be_write_impl: @@ -195,7 +195,7 @@ void qemu_chr_be_write(Chardev *s, uint8_t *buf, int len); * * Implementation of back end writing. Used by replay module. */ -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); /** * qemu_chr_be_update_read_handlers: |