git: eefd863cbae9 - main - bhyve: Drop a bogus const qualifier
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 24 Oct 2022 21:36:09 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=eefd863cbae9d7b2f5c83948b45be13951a0c495 commit eefd863cbae9d7b2f5c83948b45be13951a0c495 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-10-24 21:35:16 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-10-24 21:35:16 +0000 bhyve: Drop a bogus const qualifier No functional change intended. MFC after: 1 week --- usr.sbin/bhyve/pci_virtio_input.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/pci_virtio_input.c b/usr.sbin/bhyve/pci_virtio_input.c index 758b228ea39c..ba5c024e30bf 100644 --- a/usr.sbin/bhyve/pci_virtio_input.c +++ b/usr.sbin/bhyve/pci_virtio_input.c @@ -474,15 +474,14 @@ vtinput_eventqueue_add_event( if (queue->idx >= queue->size) { /* alloc new elements for queue */ const uint32_t newSize = queue->idx; - const void *newPtr = realloc(queue->events, + void *newPtr = realloc(queue->events, queue->size * sizeof(struct vtinput_event_elem)); if (newPtr == NULL) { WPRINTF(("%s: realloc memory for eventqueue failed!", __func__)); return (1); } - /* save new size and eventqueue */ - queue->events = (struct vtinput_event_elem *)newPtr; + queue->events = newPtr; queue->size = newSize; }