Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jan 2023 19:47:57 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: dc1d08705b4e - stable/13 - bhyve: Drop a bogus const qualifier
Message-ID:  <202301261947.30QJlvAG007325@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=dc1d08705b4efa8e38f1884bc238478e7a5878a8

commit dc1d08705b4efa8e38f1884bc238478e7a5878a8
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-10-24 21:35:16 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-01-26 19:31:46 +0000

    bhyve: Drop a bogus const qualifier
    
    No functional change intended.
    
    MFC after:      1 week
    
    (cherry picked from commit eefd863cbae9d7b2f5c83948b45be13951a0c495)
---
 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 dff8eaafaa21..77cbcf3aa0cf 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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301261947.30QJlvAG007325>