Sometimes adding a separate variable to access vm->privateData is not necessary. Add a macro that will do the typecasting rather than having to add a temp variable to force the compiler to typecast it. --- src/qemu/qemu_domain.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index a1404d0..e9dfbff 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -234,6 +234,9 @@ struct _qemuDomainObjPrivate { size_t masterKeyLen; }; +# define QEMU_DOMAIN_PRIVATE(vm) \ + ((qemuDomainObjPrivatePtr) (vm)->privateData) + /* Type of domain secret */ typedef enum { VIR_DOMAIN_SECRET_INFO_TYPE_PLAIN = 0, -- 2.10.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list