[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt PATCH 02/19] util: virHostMemSetParameters: remove pointless variable



It is only used inside the condition.

Signed-off-by: Ján Tomko <jtomko redhat com>
---
 src/util/virhostmem.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/util/virhostmem.c b/src/util/virhostmem.c
index 2f60e2a250..7d1871610c 100644
--- a/src/util/virhostmem.c
+++ b/src/util/virhostmem.c
@@ -363,7 +363,6 @@ virHostMemSetParameters(virTypedParameterPtr params G_GNUC_UNUSED,
 
 #ifdef __linux__
     size_t i;
-    int rc;
 
     if (virTypedParamsValidate(params, nparams,
                                VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN,
@@ -379,9 +378,7 @@ virHostMemSetParameters(virTypedParameterPtr params G_GNUC_UNUSED,
         return -1;
 
     for (i = 0; i < nparams; i++) {
-        rc = virHostMemSetParameterValue(&params[i]);
-
-        if (rc < 0)
+        if (virHostMemSetParameterValue(&params[i]) < 0)
             return -1;
     }
 
-- 
2.26.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]