qemu: domain: Add macro to simplify access to vm private data

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.
This commit is contained in:
Peter Krempa 2016-09-14 07:28:18 +02:00
parent 4cc65b4967
commit 63aac8c299

View File

@ -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,