]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
fs: Fix '<' comparison of value produced by logical not '!'
authorErik Skultety <eskultet@redhat.com>
Tue, 19 Jul 2016 07:27:32 +0000 (09:27 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 19 Jul 2016 07:38:40 +0000 (09:38 +0200)
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@redhat.com>
src/lxc/lxc_process.c
src/openvz/openvz_conf.c

index 67613948e1c0d73d87af3337255d3f6aca6c58d7..7703fe18fea7e8cd67cdb2570fe0e9ee81f513ab 100644 (file)
@@ -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;
index cb30b322203279afed53ec82895e5eea31cc5339..9b820a90d9e91fea2a366d7d89380a458a9f287e 100644 (file)
@@ -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;