Blob Blame History Raw
From 6ee171e55799c279c776a7dfea6e132f2de5bca5 Mon Sep 17 00:00:00 2001
Message-Id: <6ee171e55799c279c776a7dfea6e132f2de5bca5@dist-git>
From: Martin Kletzander <mkletzan@redhat.com>
Date: Fri, 4 Nov 2016 10:29:46 +0100
Subject: [PATCH] conf: Fix virDomainShmemDefFind

Due to the switch of parameters in a call to virDomainShmemDefEquals()
no device was found when looking for device with all the information
except address.  Also fix the indentation.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit ae612493ffbba8980a31800e260cc5b6b7f456e8)

https://bugzilla.redhat.com/show_bug.cgi?id=1392031

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
---
 src/conf/domain_conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 57d5ec8..8afd2b0 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -14883,8 +14883,8 @@ virDomainShmemDefFind(virDomainDefPtr def,
     size_t i;
 
     for (i = 0; i < def->nshmems; i++) {
-         if (virDomainShmemDefEquals(def->shmems[i], shmem))
-             break;
+        if (virDomainShmemDefEquals(shmem, def->shmems[i]))
+            break;
     }
 
     if (i < def->nshmems)
-- 
2.10.2