On 07/11/2014 06:35 AM, John Ferlan wrote:
Create a separate typedef for the hostdev union data describing SCSI
Then adjust the code to use the new pointer
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/conf/domain_audit.c | 7 +++---
src/conf/domain_conf.c | 40 ++++++++++++++++--------------
src/conf/domain_conf.h | 18 ++++++++------
src/qemu/qemu_cgroup.c | 7 +++---
src/qemu/qemu_command.c | 7 +++---
src/qemu/qemu_conf.c | 18 ++++++++------
src/qemu/qemu_hotplug.c | 12 ++++-----
src/security/security_apparmor.c | 10 +++-----
src/security/security_dac.c | 20 ++++++---------
src/security/security_selinux.c | 20 ++++++---------
src/util/virhostdev.c | 53 ++++++++++++++++------------------------
11 files changed, 98 insertions(+), 114 deletions(-)
@@ -10139,10 +10139,13 @@ static int
virDomainHostdevMatchSubsysSCSI(virDomainHostdevDefPtr a,
virDomainHostdevDefPtr b)
{
- if (STREQ(a->source.subsys.u.scsi.adapter, b->source.subsys.u.scsi.adapter)
&&
- a->source.subsys.u.scsi.bus == b->source.subsys.u.scsi.bus &&
- a->source.subsys.u.scsi.target == b->source.subsys.u.scsi.target
&&
- a->source.subsys.u.scsi.unit == b->source.subsys.u.scsi.unit)
+ virDomainHostdevSubsysSCSIPtr ascsisrc = &a->source.subsys.u.scsi;
+ virDomainHostdevSubsysSCSIPtr bscsisrc = &b->source.subsys.u.scsi;
+
+ if (STREQ(ascsisrc->adapter, bscsisrc->adapter) &&
+ ascsisrc->bus == bscsisrc->bus &&
+ ascsisrc->target == bscsisrc->target &&
+ ascsisrc->unit == bscsisrc->unit)
return 1;
Same as 1/8 on naming 'first', 'second'
ACK assuming rebase is trivial.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org