From: Peter Krempa Date: Mon, 2 May 2022 13:18:40 +0000 (+0200) Subject: bhyveProcessAutoDestroy: Use 'driver' from VM private data X-Git-Tag: v8.4.0-rc1~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e90301134cb5eff61b1fba4b2d84e366ea398694;p=thirdparty%2Flibvirt.git bhyveProcessAutoDestroy: Use 'driver' from VM private data Access the 'driver' struct from the private data rather than the passed opaque pointer in preparation to remove the opaque pointer. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index ee692d2ba3..40c97cb6ca 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -57,9 +57,10 @@ VIR_LOG_INIT("bhyve.bhyve_process"); static void bhyveProcessAutoDestroy(virDomainObj *vm, virConnectPtr conn G_GNUC_UNUSED, - void *opaque) + void *opaque G_GNUC_UNUSED) { - struct _bhyveConn *driver = opaque; + bhyveDomainObjPrivate *priv = vm->privateData; + struct _bhyveConn *driver = priv->driver; virBhyveProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_DESTROYED);