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>
This commit is contained in:
Arwed Meyer authored and Marc-André Lureau committed 2022-09-29 14:38:05 +04:00
1 parent a39fe10557
commit 8f9abdf586
5 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -48,7 +48,7 @@ void replay_register_char_driver(Chardev *chr)
char_drivers[drivers_count++] = chr;
}
void replay_chr_be_write(Chardev *s, uint8_t *buf, int len)
void replay_chr_be_write(Chardev *s, const uint8_t *buf, int len)
{
CharEvent *event = g_new0(CharEvent, 1);