[PATCH] fs: Fix '<' comparison of value produced by logical not '!'

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

 



Commit da665fbd introduced the following condition to virLXCProcessEnsureRootFS
and openvzReadFSConf:

if (!(<some_var> = virDomainFSDefNew()) < 0)

which broke the build on fedora with GCC 5.3.1: "logical not is only applied to
the left hand side of comparison".

Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
---
Pushed under the build breaker rule.

 src/lxc/lxc_process.c    | 2 +-
 src/openvz/openvz_conf.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 6761394..7703fe1 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -1153,7 +1153,7 @@ virLXCProcessEnsureRootFS(virDomainObjPtr vm)
     if (root)
         return 0;
 
-    if (!(root = virDomainFSDefNew()) < 0)
+    if (!(root = virDomainFSDefNew()))
         goto error;
 
     root->type = VIR_DOMAIN_FS_TYPE_MOUNT;
diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
index cb30b32..9b820a9 100644
--- a/src/openvz/openvz_conf.c
+++ b/src/openvz/openvz_conf.c
@@ -351,7 +351,7 @@ openvzReadFSConf(virDomainDefPtr def,
                        veid);
         goto error;
     } else if (ret > 0) {
-        if (!(fs = virDomainFSDefNew()) < 0)
+        if (!(fs = virDomainFSDefNew()))
             goto error;
 
         fs->type = VIR_DOMAIN_FS_TYPE_TEMPLATE;
-- 
2.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]