]> xenbits.xensource.com Git - libvirt.git/commitdiff
Require spaces around equality comparisons
authorMartin Kletzander <mkletzan@redhat.com>
Mon, 17 Mar 2014 09:38:38 +0000 (10:38 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 18 Mar 2014 10:29:44 +0000 (11:29 +0100)
Commit a1cbe4b5 added a check for spaces around assignments and this
patch extends it to checks for spaces around '=='.  One exception is
virAssertCmpInt where comma after '==' is acceptable (since it is a
macro and '==' is its argument).

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
55 files changed:
build-aux/bracket-spacing.pl
src/libvirt.c
src/locking/lock_driver_sanlock.c
src/qemu/qemu_command.c
src/rpc/virnetclient.c
src/util/vircgroup.c
src/util/virthreadpool.c
src/vbox/vbox_tmpl.c
src/xenapi/xenapi_driver.c
tests/commandtest.c
tests/domainsnapshotxml2xmltest.c
tests/interfacexml2xmltest.c
tests/libvirtdconftest.c
tests/lxcxml2xmltest.c
tests/networkxml2conftest.c
tests/networkxml2xmltest.c
tests/nodedevxml2xmltest.c
tests/nodeinfotest.c
tests/nwfilterxml2xmltest.c
tests/qemuargv2xmltest.c
tests/qemuxml2argvtest.c
tests/qemuxml2xmltest.c
tests/qemuxmlnstest.c
tests/sexpr2xmltest.c
tests/sockettest.c
tests/statstest.c
tests/storagepoolxml2xmltest.c
tests/storagevolxml2argvtest.c
tests/storagevolxml2xmltest.c
tests/virauthconfigtest.c
tests/virbuftest.c
tests/vircgrouptest.c
tests/virdbustest.c
tests/virdrivermoduletest.c
tests/virhostdevtest.c
tests/viridentitytest.c
tests/virkeyfiletest.c
tests/virkmodtest.c
tests/virlockspacetest.c
tests/virnetmessagetest.c
tests/virnetsockettest.c
tests/virnettlscontexttest.c
tests/virnettlssessiontest.c
tests/virpcitest.c
tests/virportallocatortest.c
tests/virshtest.c
tests/virstringtest.c
tests/virsystemdtest.c
tests/virtimetest.c
tests/viruritest.c
tests/xencapstest.c
tests/xmconfigtest.c
tests/xml2sexprtest.c
tools/virsh-domain-monitor.c
tools/virsh-pool.c

index 4f9f13a6864d728bde7d9c9c7a3d8837cc9c6b21..e4ae8f0647c66d9e628a3e57b8097e963ca1d4c1 100755 (executable)
@@ -145,9 +145,12 @@ foreach my $file (@ARGV) {
             last;
         }
 
-        # Require spaces around assignment '=' and compounds
-        while ($data =~ /[^!<>&|\-+*\/%\^'= ]=[^=]/ ||
-               $data =~ /[^!<>&|\-+*\/%\^'=]=[^= \\\n]/) {
+        # Require spaces around assignment '=', compounds and '=='
+        # with the exception of virAssertCmpInt()
+        while ($data =~ /[^!<>&|\-+*\/%\^'= ]=\+[^=]/ ||
+               $data =~ /[^!<>&|\-+*\/%\^'=]=[^= \\\n]/ ||
+               $data =~ /[\S]==/ ||
+               ($data =~ /==[^\s,]/ && $data !~ /[\s]virAssertCmpInt\(/)) {
             print "$file:$.: $line";
             $ret = 1;
             last;
index a385935379a16b5081855a735fdd8c3e92bf6ca7..6715fc65d4f6adae5f782a3c1a2254b764e05ae2 100644 (file)
@@ -9209,7 +9209,7 @@ error:
  * Not all hypervisors will support sending signals to
  * arbitrary processes or process groups. If this API is
  * implemented the minimum requirement is to be able to
- * use @pid_value==1 (i.e. kill init). No other value is
+ * use @pid_value == 1 (i.e. kill init). No other value is
  * required to be supported.
  *
  * If the @signum is VIR_DOMAIN_PROCESS_SIGNAL_NOP then this
index 0c87048f9856340df0086a0ea668bb9faa78aa52..c54d75550db8b78b85e8327c81bd188ca5f4630f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * lock_driver_sanlock.c: A lock driver for Sanlock
  *
- * Copyright (C) 2010-2013 Red Hat, Inc.
+ * Copyright (C) 2010-2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -912,7 +912,7 @@ static int virLockManagerSanlockAcquire(virLockManagerPtr lock,
     /* We only initialize 'sock' if we are in the real
      * child process and we need it to be inherited
      *
-     * If sock==-1, then sanlock auto-open/closes a
+     * If sock == -1, then sanlock auto-open/closes a
      * temporary sock
      */
     if (priv->vm_pid == getpid()) {
index 778d0510a3c521da32eac58eda3fe1392f8ad797..304889b2d1caa44443e03a684e361a03f90de721 100644 (file)
@@ -649,7 +649,7 @@ static int qemuAssignDeviceDiskAliasFixed(virDomainDiskDefPtr disk)
 
     switch (disk->bus) {
     case VIR_DOMAIN_DISK_BUS_IDE:
-        if (disk->device== VIR_DOMAIN_DISK_DEVICE_DISK)
+        if (disk->device == VIR_DOMAIN_DISK_DEVICE_DISK)
             ret = virAsprintf(&dev_name, "ide%d-hd%d", busid, devid);
         else
             ret = virAsprintf(&dev_name, "ide%d-cd%d", busid, devid);
@@ -2479,7 +2479,7 @@ qemuValidateDevicePCISlotsPIIX3(virDomainDefPtr def,
                                _("Primary video card must have PCI address 0:0:2.0"));
                 goto cleanup;
             }
-            /* If TYPE==PCI, then qemuCollectPCIAddress() function
+            /* If TYPE == PCI, then qemuCollectPCIAddress() function
              * has already reserved the address, so we must skip */
         }
     } else if (addrs->nbuses && !qemuDeviceVideoUsable) {
@@ -2649,7 +2649,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
                                _("Primary video card must have PCI address 0:0:1.0"));
                 goto cleanup;
             }
-            /* If TYPE==PCI, then qemuCollectPCIAddress() function
+            /* If TYPE == PCI, then qemuCollectPCIAddress() function
              * has already reserved the address, so we must skip */
         }
     } else if (addrs->nbuses && !qemuDeviceVideoUsable) {
index 327768bac3e29acb96ec2c8a89c0e6d94028e922..923332be8db1b73d0fe5d56158645c2000eea955 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * virnetclient.c: generic network RPC client
  *
- * Copyright (C) 2006-2013 Red Hat, Inc.
+ * Copyright (C) 2006-2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -1438,7 +1438,7 @@ virNetClientIOEventLoopPassTheBuck(virNetClientPtr client,
  * to someone else.
  *
  * Returns 1 if the call was queued and will be completed later (only
- * for nonBlock==true), 0 if the call was completed and -1 on error.
+ * for nonBlock == true), 0 if the call was completed and -1 on error.
  */
 static int virNetClientIOEventLoop(virNetClientPtr client,
                                    virNetClientCallPtr thiscall)
@@ -1688,7 +1688,7 @@ static void virNetClientIOUpdateCallback(virNetClientPtr client,
  * NB(7) Don't Panic!
  *
  * Returns 1 if the call was queued and will be completed later (only
- * for nonBlock==true), 0 if the call was completed and -1 on error.
+ * for nonBlock == true), 0 if the call was completed and -1 on error.
  */
 static int virNetClientIO(virNetClientPtr client,
                           virNetClientCallPtr thiscall)
@@ -1926,7 +1926,7 @@ virNetClientQueueNonBlocking(virNetClientPtr client,
 
 /*
  * Returns 1 if the call was queued and will be completed later (only
- * for nonBlock==true), 0 if the call was completed and -1 on error.
+ * for nonBlock == true), 0 if the call was completed and -1 on error.
  */
 static int virNetClientSendInternal(virNetClientPtr client,
                                     virNetMessagePtr msg,
@@ -2019,7 +2019,7 @@ int virNetClientSendNoReply(virNetClientPtr client,
  * this method returns 1.
  *
  * Returns 1 if the message was queued and will be completed later (only
- * for nonBlock==true), 0 if the message was completed and -1 on error.
+ * for nonBlock == true), 0 if the message was completed and -1 on error.
  */
 int virNetClientSendNonBlock(virNetClientPtr client,
                              virNetMessagePtr msg)
index 0f04b4d39b2a9a0c362aeffdef03e83bc2f40ec3..7e1dc57ade12f70df4679687e8086b8c2941d254 100644 (file)
@@ -415,9 +415,9 @@ virCgroupCopyPlacement(virCgroupPtr group,
                 return -1;
         } else {
             /*
-             * parent=="/" + path="" => "/"
-             * parent=="/libvirt.service" + path=="" => "/libvirt.service"
-             * parent=="/libvirt.service" + path=="foo" => "/libvirt.service/foo"
+             * parent == "/" + path="" => "/"
+             * parent == "/libvirt.service" + path == "" => "/libvirt.service"
+             * parent == "/libvirt.service" + path == "foo" => "/libvirt.service/foo"
              */
             if (virAsprintf(&group->controllers[i].placement,
                             "%s%s%s",
@@ -516,9 +516,9 @@ virCgroupDetectPlacement(virCgroupPtr group,
                 }
 
                 /*
-                 * selfpath=="/" + path="" -> "/"
-                 * selfpath=="/libvirt.service" + path="" -> "/libvirt.service"
-                 * selfpath=="/libvirt.service" + path="foo" -> "/libvirt.service/foo"
+                 * selfpath == "/" + path="" -> "/"
+                 * selfpath == "/libvirt.service" + path == "" -> "/libvirt.service"
+                 * selfpath == "/libvirt.service" + path == "foo" -> "/libvirt.service/foo"
                  */
                 if (typelen == len && STREQLEN(typestr, tmp, len) &&
                     group->controllers[i].mountPoint != NULL &&
index aa442d1e92927d4011e10b2d113833d66eba5013..57a7f7648d816d680e7469daf51227d516ba935b 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * virthreadpool.c: a generic thread pool implementation
  *
+ * Copyright (C) 2014 Red Hat, Inc.
  * Copyright (C) 2010 Hu Tao
  * Copyright (C) 2010 Daniel P. Berrange
  *
@@ -151,7 +152,7 @@ out:
         pool->nPrioWorkers--;
     else
         pool->nWorkers--;
-    if (pool->nWorkers == 0 && pool->nPrioWorkers==0)
+    if (pool->nWorkers == 0 && pool->nPrioWorkers == 0)
         virCondSignal(&pool->quit_cond);
     virMutexUnlock(&pool->mutex);
 }
index 382d7b4ee644a0588a416d155d5fd4e7a80a3909..c9cdd72ca6e2c08b017cf1e6333409c4a4b1eac0 100644 (file)
@@ -1259,7 +1259,7 @@ static virDomainPtr vboxDomainLookupByID(virConnectPtr conn, int id) {
     nsresult rc;
 
     /* Internal vbox IDs start from 0, the public libvirt ID
-     * starts from 1, so refuse id==0, and adjust the rest*/
+     * starts from 1, so refuse id == 0, and adjust the rest*/
     if (id == 0) {
         virReportError(VIR_ERR_NO_DOMAIN,
                        _("no domain with matching id %d"), id);
index a5473062e26b2b3fde44c2b950becbfce0cf93b8..6d3288d473494eb195132b1ebe6fb97b8c2597df 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * xenapi_driver.c: Xen API driver.
- * Copyright (C) 2011-2013 Red Hat, Inc.
+ * Copyright (C) 2011-2014 Red Hat, Inc.
  * Copyright (C) 2009, 2010 Citrix Ltd.
  *
  * This library is free software; you can redistribute it and/or
@@ -1850,7 +1850,7 @@ xenapiDomainSetAutostart(virDomainPtr dom, int autostart)
         }
         vm = vms->contents[0];
         xen_vm_remove_from_other_config(session, vm, (char *)"auto_poweron");
-        if (autostart==1)
+        if (autostart == 1)
             value = (char *)"true";
         else
             value = (char *)"false";
index c8053ff604f769a84e37e126d57f3de1dbfd024a..0cba8d9382f0f4b9f0f8f592495c8ccda8ea47cd 100644 (file)
@@ -1188,7 +1188,7 @@ cleanup:
     virMutexDestroy(&test->lock);
     VIR_FREE(test);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 921c7ad4204c4b86801c9bb11b1a4cec7be388d4..82925c5c0070734f13c6b5cee9cc52032953969c 100644 (file)
@@ -233,7 +233,7 @@ cleanup:
     virObjectUnref(driver.caps);
     virObjectUnref(driver.xmlopt);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 13f9053881f5e1760a38c5b5a89d1f04ae17599d..5e11754575d4ce5dc863da59e9023e39d1b3611f 100644 (file)
@@ -94,7 +94,7 @@ mymain(void)
     DO_TEST("ipv6-static-multi");
     DO_TEST("ipv6-static");
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index fbc0f3feb980483863720cd99284c3e9533fd665..d069bb7cadb203d9a1e80fbe2c5207e17cd9f164 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2013 Red Hat, Inc.
+ * Copyright (C) 2012-2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -231,7 +231,7 @@ cleanup:
     VIR_FREE(filename);
     VIR_FREE(filedata);
     VIR_FREE(params);
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index af50dc5ebf8e6988a8af6daaa1324e9ef2148718..4e73d7ff06c7c33bf2bccc40ee52d90ca3fa70ed 100644 (file)
@@ -148,7 +148,7 @@ mymain(void)
     virObjectUnref(caps);
     virObjectUnref(xmlopt);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index d968568eace7691c9687a011924181f79afb4ee9..9b6b86915e931eb4beb688b416a72fa201e8b134 100644 (file)
@@ -150,7 +150,7 @@ mymain(void)
     DO_TEST("dhcp6-nat-network", dhcpv6);
     DO_TEST("dhcp6host-routed-network", dhcpv6);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 0a925133513664ae4c7a61a7f85188c54ee87a2f..1977675dc2c90f5735345a2f7bfef85db483f53f 100644 (file)
@@ -120,7 +120,7 @@ mymain(void)
     DO_TEST("hostdev");
     DO_TEST_FULL("hostdev-pf", VIR_NETWORK_XML_INACTIVE);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 2ebdee133bd96ba6bdf04584e4662e97ce0d19ce..9390bf5de85a29d5362924b1f4b8705c734f77ed 100644 (file)
@@ -89,7 +89,7 @@ mymain(void)
     DO_TEST("usb_device_1d6b_1_0000_00_1d_0_if0");
     DO_TEST("usb_device_1d6b_1_0000_00_1d_0");
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 7cafd1157eee9a769269aa8d1342600ea2823cbb..6a175cb3ec4eae09e106d86d4c946029bd4c4206 100644 (file)
@@ -265,7 +265,7 @@ mymain(void)
 
     DO_TEST_CPU_STATS("24cpu", 24);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 8c510ca025664df45921ba0f68d2a139cc8c836d..5cebb9fbc10e33567fd155a6abddb625215f556e 100644 (file)
@@ -160,7 +160,7 @@ mymain(void)
 
     DO_TEST("ipset-test", false);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index e75c85db2f378a1ea274b06e650a6b02b6e70af4..4923c2bfe64864cc8b9370d2cc87de2978f8fd32 100644 (file)
@@ -271,7 +271,7 @@ mymain(void)
     virObjectUnref(driver.caps);
     virObjectUnref(driver.xmlopt);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 8d7d9e5dc511edc7b990bf6f2aa0ee14c672e5bc..a6c7c80392cde78a7f0fd73677235ccc9c09ecf6 100644 (file)
@@ -1359,7 +1359,7 @@ mymain(void)
     virObjectUnref(driver.xmlopt);
     VIR_FREE(map);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/qemuxml2argvmock.so")
index 8e8fe7166f417877ba91d10ce16fbb417cf8f860..a1f7a4f17db66fdc21d17da7891d9d2ef3819dbe 100644 (file)
@@ -337,7 +337,7 @@ mymain(void)
     virObjectUnref(driver.caps);
     virObjectUnref(driver.xmlopt);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 81d496e1431d50f054bfe8d6b909f24c7e250b77..2a4d7461a44213706315bbe58b895e69f7bad4c4 100644 (file)
@@ -268,7 +268,7 @@ mymain(void)
     virObjectUnref(driver.xmlopt);
     VIR_FREE(map);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index c2710c27d78a1253fabe0a17264bfab84a924d0d..34cdc6d8de1f3653a5fe9efe51b37f711815c262 100644 (file)
@@ -194,7 +194,7 @@ mymain(void)
 
     virObjectUnref(caps);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index f98955d6f0c1bd9959f9b00a485b282ed2ed4660..648b05e081c3ef6616ee8456a2c32d2d4a6233d7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * sockettest.c: Testing for src/util/network.c APIs
  *
- * Copyright (C) 2010-2011 Red Hat, Inc.
+ * Copyright (C) 2010-2011, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -336,7 +336,7 @@ mymain(void)
     DO_TEST_IS_NUMERIC("::ffff", true);
     DO_TEST_IS_NUMERIC("examplehost", false);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 7af152a49fd539d4d3969f567c6fa9bfe8017ee6..ce1567cf1350926b95896eea55cedefd37b28c79 100644 (file)
@@ -205,7 +205,7 @@ mymain(void)
     DO_TEST("/dev/xvda1", 51713);
     DO_TEST("/dev/xvda15", 51727);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 039d515cbab6f701cd48e39236c1a0858b24250f..d54f2e5e14b2331474763bed5e27762006427dd6 100644 (file)
@@ -105,7 +105,7 @@ mymain(void)
     DO_TEST("pool-gluster");
     DO_TEST("pool-gluster-sub");
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index ed9a520b019132ea30c8c49eacc459c9cf80ae5c..7362823f98fb8e1475049b1130a4849deef97117 100644 (file)
@@ -297,7 +297,7 @@ mymain(void)
             "pool-dir", "vol-qcow2-nobacking",
             "logical-from-qcow2", 0, FMT_COMPAT);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index fdcdea125300d0cbb7a003e8ea89ff400acf1361..1705aefb0caaadfe07008e083acce79af578dbe7 100644 (file)
@@ -123,7 +123,7 @@ mymain(void)
     DO_TEST("pool-sheepdog", "vol-sheepdog");
     DO_TEST("pool-gluster", "vol-gluster-dir");
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 0bed9974f19d2526a7665007df5a39cab5a4c549..7678f2455e1ddf97da47a8225cc21dbece867fae 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (C) 2012, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -133,7 +133,7 @@ mymain(void)
 
     virAuthConfigFree(config);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 1645e76e1b64c44a1c9970f240b258662b913001..9eb7f6643e43dda44494328451998a28b61b8b0b 100644 (file)
@@ -219,7 +219,7 @@ mymain(void)
     DO_TEST("Auto-indentation", testBufAutoIndent, 0);
     DO_TEST("Trim", testBufTrim, 0);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 5d5ecccc04e15b2d75069b148982df59b52af892..8d79821c536f8c649dea9e39f0e49c58e4ab3d5a 100644 (file)
@@ -820,7 +820,7 @@ mymain(void)
 
     VIR_FREE(fakesysfsdir);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/vircgroupmock.so")
index cd4edc742ce0b85842c1e728ccc4395e34e24d93..b3ae2f4c0b7412729843b3d8d8f8033ba406e077 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Red Hat, Inc.
+ * Copyright (C) 2013, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -387,7 +387,7 @@ mymain(void)
         ret = -1;
     if (virtTestRun("Test message dict ", testMessageDict, NULL) < 0)
         ret = -1;
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index ba6e39d08f18890d229ab1c689c17069e3b9c889..6849febb571909d23ea5d10337ae0a3330536448 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (C) 2012, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -102,7 +102,7 @@ mymain(void)
     TEST("libxl", NULL);
 #endif
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 04bd2eaf413ce349cf68c2303c4f61cc73c740a8..7d2ce4f2a49d4628840e124c1d248744b3df24fa 100644 (file)
@@ -457,7 +457,7 @@ mymain(void)
 
     VIR_FREE(fakesysfsdir);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/virpcimock.so")
index 9fcdcd3eeae2f7eaae5a898277b58598851c735f..8b1e22dd74c8367b1686b1fdbb7fafb16a5bc793 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Red Hat, Inc.
+ * Copyright (C) 2013, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -238,7 +238,7 @@ mymain(void)
     if (virtTestRun("System identity (fake SELinux disabled) ", testIdentityGetSystem, NULL) < 0)
         ret = -1;
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 #if WITH_SELINUX
index 1570ad6cf9eb1b8c94f8123bb26496112cb233ee..6bb6ab085b0938af40f1bad2bfba0612b98f787f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2012 Red Hat, Inc.
+ * Copyright (C) 2011, 2012, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -116,7 +116,7 @@ mymain(void)
     if (virtTestRun("Test parse", testParse, NULL) < 0)
         ret = -1;
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index eaf1b75c783d9bc7a9b782e870ab714fcb2dbf94..88996895bff3371457f5db1494d258b5585edab9 100644 (file)
@@ -170,7 +170,7 @@ mymain(void)
     DO_TEST("unload", testKModUnload, false, RMMOD " vfio-pci\n");
     DO_TEST("blklist", testKModLoad, true, MODPROBE " -b vfio-pci\n");
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 
 }
 
index 78094ef38955c735ce7d1417fc0a63186c8f658c..7e417f45d05a6fde2f204795b49992ffa3c5a704 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2013 Red Hat, Inc.
+ * Copyright (C) 2011, 2013, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -366,7 +366,7 @@ mymain(void)
     if (virtTestRun("Lockspace res full path", testLockSpaceResourceLockPath, NULL) < 0)
         ret = -1;
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index ad619de6c286af6618895e4f961e28148407ad94..af2a4c83218e83922af4568c9f5f127468a993f2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2011, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -542,7 +542,7 @@ mymain(void)
     if (virtTestRun("Message Payload Stream Encode", testMessagePayloadStreamEncode, NULL) < 0)
         ret = -1;
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index a14371a12cd192a50666e237ba115a6bd556ede9..51b7a6a153b70346b03b5ec04e6e568d3767cd8b 100644 (file)
@@ -610,7 +610,7 @@ mymain(void)
 
 #endif
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 1cc994652edea4437dc424c24dda97b76bf05ef8..f5df03b2ed3549a7e098f9bbe2b380522eb69eba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2013 Red Hat, Inc.
+ * Copyright (C) 2011-2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -625,7 +625,7 @@ mymain(void)
 
     testTLSCleanup(KEYFILE);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 6d77d35f229e03fc83d3610f78e663d05331dce3..83a086290a84067aa13c28e957b53d5ce40703ad 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2012 Red Hat, Inc.
+ * Copyright (C) 2011-2012, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -478,7 +478,7 @@ mymain(void)
 
     testTLSCleanup(KEYFILE);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 994b30036d59a4bc2f7d873913eb8e5256d0ca8a..1df8d0afb197a2c43f718d8ec0dc9344e9ef0581 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Red Hat, Inc.
+ * Copyright (C) 2013, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -449,7 +449,7 @@ mymain(void)
 
     VIR_FREE(fakesysfsdir);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/virpcimock.so")
index fd48c1137dbc014b0d2482549aefde65c34f3341..7cf6498ce0ce9a0facb15be07c5439d59fb043bf 100644 (file)
@@ -261,7 +261,7 @@ mymain(void)
     if (virtTestRun("Test IPv4-only alloc reuse", testAllocReuse, NULL) < 0)
         ret = -1;
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/libvirportallocatormock.so")
index 6510208fd337a80319b152dbfaf931dd6063bc71..3da5fa45c770619e01147cf050baf17007810385 100644 (file)
@@ -398,7 +398,7 @@ mymain(void)
 # undef DO_TEST
 
     VIR_FREE(custom_uri);
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 8d45e7134e003b388cdfad11f425ebbb53abf74b..8f7a539251c477f2e6f148f3ca2d9b64f6d7985b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2013 Red Hat, Inc.
+ * Copyright (C) 2012-2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -425,7 +425,6 @@ mymain(void)
     if (virtTestRun("virStringSortCompare", testStringSortCompare, NULL) < 0)
         ret = -1;
 
-
 #define TEST_SEARCH(s, r, x, n, m, e)                                   \
     do {                                                                \
         struct stringSearchData data = {                                \
@@ -492,7 +491,7 @@ mymain(void)
     TEST_REPLACE("fooooofoooo", "foo", "barwizzeek", "barwizzeekooobarwizzeekoo");
     TEST_REPLACE("fooooofoooo", "foooo", "foo", "fooofoo");
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 9752d12b3a68d7126c965821676867195538840e..80d3659eb6772ca133c8e2d9dfc4b1ecdec7a25e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Red Hat, Inc.
+ * Copyright (C) 2013, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -273,7 +273,7 @@ mymain(void)
     TEST_SCOPE("demo", "/machine/eng-dept/testing!stuff",
                "machine-eng\\x2ddept-testing\\x21stuff-lxc\\x2ddemo.scope");
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/virsystemdmock.so")
index c1f8f4bbe0f41a6c54b3b325a72ae023ad94bf70..034db4af1c52ab098316a5f0e3ca00aa7e6b6099 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2011, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -117,7 +117,7 @@ mymain(void)
 
     TEST_FIELDS(2147483648000ull, 2038,  1, 19,  3, 14,  8);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 41a8ca70b6c7360f5b0aefe745587bb18c64ca2d..7bca80ce3d502fb2b87c634bae3e8ffb397e55a0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (C) 2012, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -220,7 +220,7 @@ mymain(void)
 #endif
     TEST_PARAMS("=bogus&foo=one", "foo=one", params6);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index ed1fee5c384462e84e1f8f6f3196c811ce86bc12..74423a1a6a8ef18dd1f546220d817d84e0fe64fe 100644 (file)
@@ -214,7 +214,7 @@ mymain(void)
         ret = -1;
 
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index 05903333bd0cba5688174f4825e8cc676d7ac3fe..5ed16b1818b7d0818a33481bb161eba17d6451da 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * xmconfigtest.c: Test backend for xm_internal config file handling
  *
- * Copyright (C) 2007, 2010-2011 Red Hat, Inc.
+ * Copyright (C) 2007, 2010-2011, 2014 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -261,7 +261,7 @@ mymain(void)
     virObjectUnref(caps);
     virObjectUnref(xmlopt);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index deb2fced3b416d878f66f7da03e58f4981f111f0..7597bd44e6b491e76e17794fe6f943b47b390b27 100644 (file)
@@ -185,7 +185,7 @@ mymain(void)
     virObjectUnref(caps);
     virObjectUnref(xmlopt);
 
-    return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
+    return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 VIRT_TEST_MAIN(mymain)
index bcc5526fa7a97920fd2911f0289b1fc1ecaf1b6c..f47442295a5f671e570a4c188c8d9f338b9d07df 100644 (file)
@@ -1203,7 +1203,7 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
         vshPrint(ctl, "%-15s %d\n", _("Id:"), id);
     vshPrint(ctl, "%-15s %s\n", _("Name:"), virDomainGetName(dom));
 
-    if (virDomainGetUUIDString(dom, &uuid[0])==0)
+    if (virDomainGetUUIDString(dom, &uuid[0]) == 0)
         vshPrint(ctl, "%-15s %s\n", _("UUID:"), uuid);
 
     if ((str = virDomainGetOSType(dom))) {
index 3d0ea202eefcdc401154689cc9304482b92735f6..700fdbe8f511ee0a5d73600486174c4a54f92c95 100644 (file)
@@ -1504,7 +1504,7 @@ cmdPoolInfo(vshControl *ctl, const vshCmd *cmd)
 
     vshPrint(ctl, "%-15s %s\n", _("Name:"), virStoragePoolGetName(pool));
 
-    if (virStoragePoolGetUUIDString(pool, &uuid[0])==0)
+    if (virStoragePoolGetUUIDString(pool, &uuid[0]) == 0)
         vshPrint(ctl, "%-15s %s\n", _("UUID:"), uuid);
 
     if (virStoragePoolGetInfo(pool, &info) == 0) {