127bba
From 6ee171e55799c279c776a7dfea6e132f2de5bca5 Mon Sep 17 00:00:00 2001
127bba
Message-Id: <6ee171e55799c279c776a7dfea6e132f2de5bca5@dist-git>
127bba
From: Martin Kletzander <mkletzan@redhat.com>
127bba
Date: Fri, 4 Nov 2016 10:29:46 +0100
127bba
Subject: [PATCH] conf: Fix virDomainShmemDefFind
127bba
127bba
Due to the switch of parameters in a call to virDomainShmemDefEquals()
127bba
no device was found when looking for device with all the information
127bba
except address.  Also fix the indentation.
127bba
127bba
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
127bba
(cherry picked from commit ae612493ffbba8980a31800e260cc5b6b7f456e8)
127bba
127bba
https://bugzilla.redhat.com/show_bug.cgi?id=1392031
127bba
127bba
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
127bba
---
127bba
 src/conf/domain_conf.c | 4 ++--
127bba
 1 file changed, 2 insertions(+), 2 deletions(-)
127bba
127bba
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
127bba
index 57d5ec8..8afd2b0 100644
127bba
--- a/src/conf/domain_conf.c
127bba
+++ b/src/conf/domain_conf.c
127bba
@@ -14883,8 +14883,8 @@ virDomainShmemDefFind(virDomainDefPtr def,
127bba
     size_t i;
127bba
 
127bba
     for (i = 0; i < def->nshmems; i++) {
127bba
-         if (virDomainShmemDefEquals(def->shmems[i], shmem))
127bba
-             break;
127bba
+        if (virDomainShmemDefEquals(shmem, def->shmems[i]))
127bba
+            break;
127bba
     }
127bba
 
127bba
     if (i < def->nshmems)
127bba
-- 
127bba
2.10.2
127bba