aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2022-10-24 21:35:16 +0000
committerMark Johnston <markj@FreeBSD.org>2022-10-24 21:35:16 +0000
commiteefd863cbae9d7b2f5c83948b45be13951a0c495 (patch)
tree7af1aff7348bfccf63d3af3288dcedf3bb5be3f8
parentfb7ce0a95ef1e796c10def3ed660e487ffb77c75 (diff)
downloadsrc-eefd863cbae9d7b2f5c83948b45be13951a0c495.tar.gz
src-eefd863cbae9d7b2f5c83948b45be13951a0c495.zip
bhyve: Drop a bogus const qualifier
No functional change intended. MFC after: 1 week
-rw-r--r--usr.sbin/bhyve/pci_virtio_input.c5
1 files 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;
}