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 aceptable (since it is a macro and '==' is its argument). Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> --- build-aux/bracket-spacing.pl | 9 ++++++--- src/libvirt.c | 2 +- src/locking/lock_driver_sanlock.c | 4 ++-- src/qemu/qemu_command.c | 6 +++--- src/rpc/virnetclient.c | 10 +++++----- src/util/vircgroup.c | 12 ++++++------ src/util/virthreadpool.c | 3 ++- src/vbox/vbox_tmpl.c | 2 +- src/xenapi/xenapi_driver.c | 4 ++-- tests/commandtest.c | 2 +- tests/domainsnapshotxml2xmltest.c | 2 +- tests/interfacexml2xmltest.c | 2 +- tests/libvirtdconftest.c | 4 ++-- tests/lxcxml2xmltest.c | 2 +- tests/networkxml2conftest.c | 2 +- tests/networkxml2xmltest.c | 2 +- tests/nodedevxml2xmltest.c | 2 +- tests/nodeinfotest.c | 2 +- tests/nwfilterxml2xmltest.c | 2 +- tests/qemuargv2xmltest.c | 2 +- tests/qemuxml2argvtest.c | 2 +- tests/qemuxml2xmltest.c | 2 +- tests/qemuxmlnstest.c | 2 +- tests/sexpr2xmltest.c | 2 +- tests/sockettest.c | 4 ++-- tests/statstest.c | 2 +- tests/storagepoolxml2xmltest.c | 2 +- tests/storagevolxml2argvtest.c | 2 +- tests/storagevolxml2xmltest.c | 2 +- tests/virauthconfigtest.c | 4 ++-- tests/virbuftest.c | 2 +- tests/vircgrouptest.c | 2 +- tests/virdbustest.c | 4 ++-- tests/virdrivermoduletest.c | 4 ++-- tests/virhostdevtest.c | 2 +- tests/viridentitytest.c | 4 ++-- tests/virkeyfiletest.c | 4 ++-- tests/virkmodtest.c | 2 +- tests/virlockspacetest.c | 4 ++-- tests/virnetmessagetest.c | 4 ++-- tests/virnetsockettest.c | 2 +- tests/virnettlscontexttest.c | 4 ++-- tests/virnettlssessiontest.c | 4 ++-- tests/virpcitest.c | 4 ++-- tests/virportallocatortest.c | 2 +- tests/virshtest.c | 2 +- tests/virstringtest.c | 5 ++--- tests/virsystemdtest.c | 4 ++-- tests/virtimetest.c | 4 ++-- tests/viruritest.c | 4 ++-- tests/xencapstest.c | 2 +- tests/xmconfigtest.c | 4 ++-- tests/xml2sexprtest.c | 2 +- tools/virsh-domain-monitor.c | 2 +- tools/virsh-pool.c | 2 +- 55 files changed, 91 insertions(+), 88 deletions(-) diff --git a/build-aux/bracket-spacing.pl b/build-aux/bracket-spacing.pl index 4f9f13a..e4ae8f0 100755 --- a/build-aux/bracket-spacing.pl +++ b/build-aux/bracket-spacing.pl @@ -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; diff --git a/src/libvirt.c b/src/libvirt.c index a385935..6715fc6 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -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 diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index 0c87048..c54d755 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/lock_driver_sanlock.c @@ -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()) { diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d89c440..4d68f35 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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); @@ -2480,7 +2480,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) { @@ -2650,7 +2650,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) { diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 327768b..923332b 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -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) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 0f04b4d..7e1dc57 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -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 && diff --git a/src/util/virthreadpool.c b/src/util/virthreadpool.c index aa442d1..57a7f76 100644 --- a/src/util/virthreadpool.c +++ b/src/util/virthreadpool.c @@ -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); } diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 4bdd881..f7cf4b1 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -1277,7 +1277,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); diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index a547306..6d3288d 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -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"; diff --git a/tests/commandtest.c b/tests/commandtest.c index c8053ff..0cba8d9 100644 --- a/tests/commandtest.c +++ b/tests/commandtest.c @@ -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) diff --git a/tests/domainsnapshotxml2xmltest.c b/tests/domainsnapshotxml2xmltest.c index 921c7ad..82925c5 100644 --- a/tests/domainsnapshotxml2xmltest.c +++ b/tests/domainsnapshotxml2xmltest.c @@ -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) diff --git a/tests/interfacexml2xmltest.c b/tests/interfacexml2xmltest.c index 13f9053..5e11754 100644 --- a/tests/interfacexml2xmltest.c +++ b/tests/interfacexml2xmltest.c @@ -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) diff --git a/tests/libvirtdconftest.c b/tests/libvirtdconftest.c index fbc0f3f..d069bb7 100644 --- a/tests/libvirtdconftest.c +++ b/tests/libvirtdconftest.c @@ -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) diff --git a/tests/lxcxml2xmltest.c b/tests/lxcxml2xmltest.c index af50dc5..4e73d7f 100644 --- a/tests/lxcxml2xmltest.c +++ b/tests/lxcxml2xmltest.c @@ -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) diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index d968568..9b6b869 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -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) diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index 0a92513..1977675 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -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) diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c index 2ebdee1..9390bf5 100644 --- a/tests/nodedevxml2xmltest.c +++ b/tests/nodedevxml2xmltest.c @@ -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) diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c index 7cafd11..6a175cb 100644 --- a/tests/nodeinfotest.c +++ b/tests/nodeinfotest.c @@ -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) diff --git a/tests/nwfilterxml2xmltest.c b/tests/nwfilterxml2xmltest.c index 8c510ca..5cebb9f 100644 --- a/tests/nwfilterxml2xmltest.c +++ b/tests/nwfilterxml2xmltest.c @@ -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) diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c index 7ec0376..9eb3c49 100644 --- a/tests/qemuargv2xmltest.c +++ b/tests/qemuargv2xmltest.c @@ -272,7 +272,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) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 8d7d9e5..a6c7c80 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -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") diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 8e8fe71..a1f7a4f 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -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) diff --git a/tests/qemuxmlnstest.c b/tests/qemuxmlnstest.c index 81d496e..2a4d746 100644 --- a/tests/qemuxmlnstest.c +++ b/tests/qemuxmlnstest.c @@ -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) diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c index c2710c2..34cdc6d 100644 --- a/tests/sexpr2xmltest.c +++ b/tests/sexpr2xmltest.c @@ -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) diff --git a/tests/sockettest.c b/tests/sockettest.c index f98955d..648b05e 100644 --- a/tests/sockettest.c +++ b/tests/sockettest.c @@ -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) diff --git a/tests/statstest.c b/tests/statstest.c index 7af152a..ce1567c 100644 --- a/tests/statstest.c +++ b/tests/statstest.c @@ -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) diff --git a/tests/storagepoolxml2xmltest.c b/tests/storagepoolxml2xmltest.c index 039d515..d54f2e5 100644 --- a/tests/storagepoolxml2xmltest.c +++ b/tests/storagepoolxml2xmltest.c @@ -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) diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c index ed9a520..7362823 100644 --- a/tests/storagevolxml2argvtest.c +++ b/tests/storagevolxml2argvtest.c @@ -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) diff --git a/tests/storagevolxml2xmltest.c b/tests/storagevolxml2xmltest.c index fdcdea1..1705aef 100644 --- a/tests/storagevolxml2xmltest.c +++ b/tests/storagevolxml2xmltest.c @@ -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) diff --git a/tests/virauthconfigtest.c b/tests/virauthconfigtest.c index 0bed997..7678f24 100644 --- a/tests/virauthconfigtest.c +++ b/tests/virauthconfigtest.c @@ -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) diff --git a/tests/virbuftest.c b/tests/virbuftest.c index 1645e76..9eb7f66 100644 --- a/tests/virbuftest.c +++ b/tests/virbuftest.c @@ -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) diff --git a/tests/vircgrouptest.c b/tests/vircgrouptest.c index 5d5eccc..8d79821 100644 --- a/tests/vircgrouptest.c +++ b/tests/vircgrouptest.c @@ -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") diff --git a/tests/virdbustest.c b/tests/virdbustest.c index cd4edc7..b3ae2f4 100644 --- a/tests/virdbustest.c +++ b/tests/virdbustest.c @@ -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) diff --git a/tests/virdrivermoduletest.c b/tests/virdrivermoduletest.c index ba6e39d..6849feb 100644 --- a/tests/virdrivermoduletest.c +++ b/tests/virdrivermoduletest.c @@ -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) diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c index 04bd2ea..7d2ce4f 100644 --- a/tests/virhostdevtest.c +++ b/tests/virhostdevtest.c @@ -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") diff --git a/tests/viridentitytest.c b/tests/viridentitytest.c index 9fcdcd3..8b1e22d 100644 --- a/tests/viridentitytest.c +++ b/tests/viridentitytest.c @@ -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 diff --git a/tests/virkeyfiletest.c b/tests/virkeyfiletest.c index 1570ad6..6bb6ab0 100644 --- a/tests/virkeyfiletest.c +++ b/tests/virkeyfiletest.c @@ -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) diff --git a/tests/virkmodtest.c b/tests/virkmodtest.c index eaf1b75..8899689 100644 --- a/tests/virkmodtest.c +++ b/tests/virkmodtest.c @@ -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; } diff --git a/tests/virlockspacetest.c b/tests/virlockspacetest.c index 78094ef..7e417f4 100644 --- a/tests/virlockspacetest.c +++ b/tests/virlockspacetest.c @@ -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) diff --git a/tests/virnetmessagetest.c b/tests/virnetmessagetest.c index ad619de..af2a4c8 100644 --- a/tests/virnetmessagetest.c +++ b/tests/virnetmessagetest.c @@ -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) diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c index a14371a..51b7a6a 100644 --- a/tests/virnetsockettest.c +++ b/tests/virnetsockettest.c @@ -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) diff --git a/tests/virnettlscontexttest.c b/tests/virnettlscontexttest.c index 1cc9946..f5df03b 100644 --- a/tests/virnettlscontexttest.c +++ b/tests/virnettlscontexttest.c @@ -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) diff --git a/tests/virnettlssessiontest.c b/tests/virnettlssessiontest.c index 6d77d35..83a0862 100644 --- a/tests/virnettlssessiontest.c +++ b/tests/virnettlssessiontest.c @@ -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) diff --git a/tests/virpcitest.c b/tests/virpcitest.c index 994b300..1df8d0a 100644 --- a/tests/virpcitest.c +++ b/tests/virpcitest.c @@ -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") diff --git a/tests/virportallocatortest.c b/tests/virportallocatortest.c index fd48c11..7cf6498 100644 --- a/tests/virportallocatortest.c +++ b/tests/virportallocatortest.c @@ -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") diff --git a/tests/virshtest.c b/tests/virshtest.c index 4844b59..f7edc02 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -416,7 +416,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) diff --git a/tests/virstringtest.c b/tests/virstringtest.c index 8d45e71..8f7a539 100644 --- a/tests/virstringtest.c +++ b/tests/virstringtest.c @@ -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) diff --git a/tests/virsystemdtest.c b/tests/virsystemdtest.c index 9752d12..80d3659 100644 --- a/tests/virsystemdtest.c +++ b/tests/virsystemdtest.c @@ -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") diff --git a/tests/virtimetest.c b/tests/virtimetest.c index c1f8f4b..034db4a 100644 --- a/tests/virtimetest.c +++ b/tests/virtimetest.c @@ -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) diff --git a/tests/viruritest.c b/tests/viruritest.c index 41a8ca7..7bca80c 100644 --- a/tests/viruritest.c +++ b/tests/viruritest.c @@ -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) diff --git a/tests/xencapstest.c b/tests/xencapstest.c index ebea205..176850b 100644 --- a/tests/xencapstest.c +++ b/tests/xencapstest.c @@ -225,7 +225,7 @@ mymain(void) ret = -1; - return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE; + return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } VIRT_TEST_MAIN(mymain) diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index 0590333..5ed16b1 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -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) diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c index e2e7f3b..d6bc51a 100644 --- a/tests/xml2sexprtest.c +++ b/tests/xml2sexprtest.c @@ -184,7 +184,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) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index bcc5526..f474422 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -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))) { diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index 3d0ea20..700fdbe 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -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) { -- 1.9.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list