libvirt/src/util
Eric Blake eb9093763f maint: forbid 'int foo = true'
I noticed this while working on qemuDomainGetBlockInfo.  Assigning
a bool value to an int variable compiles fine, but raises red flags
on the maintenance front as it becomes too easy to assign -1 or 2
or any other non-bool value to the same variable.

* cfg.mk (sc_prohibit_int_assign_bool): New rule.
* src/conf/snapshot_conf.c (virDomainSnapshotRedefinePrep): Fix
offenders.
* src/qemu/qemu_driver.c (qemuDomainGetBlockInfo)
(qemuDomainSnapshotCreateXML): Likewise.
* src/test/test_driver.c (testDomainSnapshotAlignDisks):
Likewise.
* src/util/vircgroup.c (virCgroupSupportsCpuBW): Likewise.
* src/util/virpci.c (virPCIDeviceBindToStub): Likewise.
* src/util/virutil.c (virIsCapableVport): Likewise.
* tools/virsh-domain-monitor.c (cmdDomMemStat): Likewise.
* tools/virsh-domain.c (cmdBlockResize, cmdScreenshot)
(cmdInjectNMI, cmdSendKey, cmdSendProcessSignal)
(cmdDetachInterface): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-11-19 08:20:39 -07:00
..
iohelper.c
keymaps.csv
viralloc.c maint: avoid static zero init in core files 2014-10-29 09:55:09 -06:00
viralloc.h util: forbid freeing const pointers 2014-07-16 06:48:53 -06:00
virarch.c
virarch.h Cpu: Add support for Power LE Architecture. 2014-11-07 09:16:37 +01:00
viratomic.c
viratomic.h
viraudit.c audit: use bool for audit log choice 2014-10-29 09:55:09 -06:00
viraudit.h audit: use bool for audit log choice 2014-10-29 09:55:09 -06:00
virauth.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virauth.h
virauthconfig.c
virauthconfig.h
virbitmap.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virbitmap.h bitmap: add virBitmapLastSetBit for finding the last bit position of bitmap 2014-11-04 07:03:36 +01:00
virbuffer.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virbuffer.h maint: fix comment typo 2014-08-23 14:29:24 -06:00
vircgroup.c maint: forbid 'int foo = true' 2014-11-19 08:20:39 -07:00
vircgroup.h qemu: use systemd's TerminateMachine to kill all processes 2014-10-01 20:17:46 +02:00
vircgrouppriv.h
virclosecallbacks.c hash: add common utility functions 2014-04-07 06:14:45 -06:00
virclosecallbacks.h
vircommand.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
vircommand.h qemu: ensure sane umask for qemu process 2014-09-03 05:58:15 -06:00
vircommandpriv.h
virconf.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virconf.h
vircrypto.c
vircrypto.h
virdbus.c virdbus: don't force users to pass int for bool values 2014-11-19 08:20:39 -07:00
virdbus.h virdbus: Make virDBusCall static 2014-05-06 11:22:13 -04:00
virdbuspriv.h
virdnsmasq.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virdnsmasq.h
virebtables.c Convert ebtables code over to use firewall APIs 2014-04-25 15:44:09 +01:00
virebtables.h
virendian.h
virerror.c Add common API for doing polkit authentication 2014-09-24 15:29:22 +01:00
virerror.h virdbus: Remove redundant error macro 2014-05-21 09:33:24 -04:00
virevent.c maint: avoid static zero init in core files 2014-10-29 09:55:09 -06:00
virevent.h
vireventpoll.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
vireventpoll.h
virfile.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virfile.h Introduce virFileFindHugeTLBFS 2014-07-29 11:25:16 +01:00
virfirewall.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virfirewall.h Remove bogus ATTRIBUTE_NONNULL from virFirewallAddRuleFull 2014-04-28 14:27:40 +01:00
virfirewallpriv.h Introduce an object for managing firewall rulesets 2014-04-25 15:44:09 +01:00
virhash.c hash: add common utility functions 2014-04-07 06:14:45 -06:00
virhash.h hash: add common utility functions 2014-04-07 06:14:45 -06:00
virhashcode.c
virhashcode.h
virhook.c qemu: hook: Provide hook when restoring a domain save image 2014-09-22 17:11:56 +02:00
virhook.h qemu: hook: Provide hook when restoring a domain save image 2014-09-22 17:11:56 +02:00
virhostdev.c hostdev: Introduce virDomainHostdevSubsysSCSIiSCSI 2014-07-24 07:04:44 -04:00
virhostdev.h
viridentity.c Convert callers to use typesafe APIs for setting identity attrs 2014-09-24 15:29:22 +01:00
viridentity.h Add typesafe APIs for virIdentity attributes 2014-09-24 15:29:22 +01:00
virinitctl.c Add support for /run/initctl 2014-10-22 13:09:49 +01:00
virinitctl.h util: use typedefs for enums in "src/util/" directory 2014-05-05 14:30:01 -06:00
viriptables.c Re-add use of locking with iptables/ip6tables/ebtables 2014-11-14 15:15:16 +00:00
viriptables.h Convert bridge driver over to use new firewall APIs 2014-04-25 15:44:09 +01:00
viriscsi.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
viriscsi.h
virjson.c util: json: Add option to skip adding a JSON object if it is NULL 2014-10-15 10:27:50 +02:00
virjson.h util: json: Split out code to create json value objects 2014-10-15 10:27:50 +02:00
virkeycode-mapgen.py
virkeycode.c
virkeycode.h
virkeyfile.c hash: add common utility functions 2014-04-07 06:14:45 -06:00
virkeyfile.h
virkmod.c
virkmod.h
virlockspace.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virlockspace.h
virlog.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virlog.h
virmacaddr.c util: Functions to update host network device's multicast filter 2014-10-28 14:14:25 -04:00
virmacaddr.h util: Functions to update host network device's multicast filter 2014-10-28 14:14:25 -04:00
virnetdev.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virnetdev.h util: Functions to update host network device's multicast filter 2014-10-28 14:14:25 -04:00
virnetdevbandwidth.c virnetdevbandwidth: Include virutil.h 2014-11-06 15:30:13 +01:00
virnetdevbandwidth.h
virnetdevbridge.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virnetdevbridge.h
virnetdevmacvlan.c network: Add network bandwidth support to ethernet interfaces 2014-11-19 10:36:49 +01:00
virnetdevmacvlan.h network: Add network bandwidth support to ethernet interfaces 2014-11-19 10:36:49 +01:00
virnetdevopenvswitch.c openvswitch: Delete port if it exists while adding a new one 2014-07-14 12:49:30 +02:00
virnetdevopenvswitch.h
virnetdevtap.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virnetdevtap.h Wire up the interface backend options 2014-09-16 16:02:34 +02:00
virnetdevveth.c Use a static initializer for static mutexes 2014-04-08 13:46:29 +01:00
virnetdevveth.h
virnetdevvlan.c
virnetdevvlan.h
virnetdevvportprofile.c util: eliminate "use after free" in callers of virNetDevLinkDump 2014-10-26 12:23:23 -04:00
virnetdevvportprofile.h util: use typedefs for enums in "src/util/" directory 2014-05-05 14:30:01 -06:00
virnetlink.c maint: avoid static zero init in core files 2014-10-29 09:55:09 -06:00
virnetlink.h
virnodesuspend.c build: Don't use code with dbus_message_unref when built without dbus 2014-04-14 18:19:36 +02:00
virnodesuspend.h
virnuma.c virnuma: add nodeset NULL check in virNumaSetupMemoryPolicy 2014-11-07 12:04:57 +01:00
virnuma.h numa: split util/ and conf/ and support non-contiguous nodesets 2014-11-06 15:13:55 +01:00
virobject.c hash: add common utility functions 2014-04-07 06:14:45 -06:00
virobject.h hash: add common utility functions 2014-04-07 06:14:45 -06:00
virpci.c maint: forbid 'int foo = true' 2014-11-19 08:20:39 -07:00
virpci.h nodedev: fix pci express memory leak 2014-07-28 14:10:29 -06:00
virpidfile.c util: fix releasing pidfile in cleanup 2014-11-04 12:06:38 +01:00
virpidfile.h util: Introduce virPidFileForceCleanupPath 2014-11-03 16:43:23 +01:00
virpolkit.c virdbus: don't force users to pass int for bool values 2014-11-19 08:20:39 -07:00
virpolkit.h Add common API for doing polkit authentication 2014-09-24 15:29:22 +01:00
virportallocator.c util: Allow port allocator to skip bind() check 2014-09-11 15:40:14 -06:00
virportallocator.h util: Allow port allocator to skip bind() check 2014-09-11 15:40:14 -06:00
virprobe.h
virprocess.c maint: avoid static zero init in core files 2014-10-29 09:55:09 -06:00
virprocess.h
virrandom.c Use a static initializer for static mutexes 2014-04-08 13:46:29 +01:00
virrandom.h
virscsi.c Do not call closedir with NULL argument 2014-06-23 14:16:23 +02:00
virscsi.h
virseclabel.c virseclabel: Resolve Coverity FORWARD_NULL issue 2014-07-14 05:44:20 -04:00
virseclabel.h virSecurityDeviceLabelDef: substitute 'norelabel' with 'relabel' 2014-07-11 10:36:02 +02:00
virsexpr.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virsexpr.h
virsocketaddr.c Fix cast errors with clang 2014-10-22 12:54:38 +04:00
virsocketaddr.h conf: add check if migration_host is a localhost address 2014-10-15 09:25:33 +02:00
virstats.c maint: clean up _virDomainInterfaceStats 2014-09-17 11:28:48 -06:00
virstats.h maint: clean up _virDomainInterfaceStats 2014-09-17 11:28:48 -06:00
virstorageencryption.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virstorageencryption.h storage: encryption: Add deep copy function for storage encryption 2014-06-20 09:14:46 +02:00
virstoragefile.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virstoragefile.h util: Add function to check if a virStorageSource is "empty" 2014-09-12 09:37:37 +02:00
virstring.c util: string: Add helper to check whether string is empty 2014-10-22 17:51:18 +02:00
virstring.h util: string: Add helper to check whether string is empty 2014-10-22 17:51:18 +02:00
virsysinfo.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virsysinfo.h util: use typedefs for enums in "src/util/" directory 2014-05-05 14:30:01 -06:00
virsystemd.c Use virBufferCheckError everywhere we report OOM error 2014-07-03 10:48:14 +02:00
virsystemd.h Introduce --without-pm-utils to get rid of pm-is-supported dependency 2014-04-11 15:51:10 -06:00
virthread.c
virthread.h maint: avoid static zero init in core files 2014-10-29 09:55:09 -06:00
virthreadpool.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virthreadpool.h
virtime.c Renamed internal __mon_yday into mon_yday to avoid conflicts 2014-10-28 14:44:18 -06:00
virtime.h util: virTimeFieldsThenRaw never returns negative 2014-07-25 12:06:07 +02:00
virtpm.c
virtpm.h
virtypedparam.c maint: use hanging curly braces 2014-09-04 15:18:43 -06:00
virtypedparam.h
viruri.c Introduce virStringStripIPv6Brackets 2014-10-15 09:25:33 +02:00
viruri.h
virusb.c usb: Remove redundant comment 2014-07-03 10:41:15 +02:00
virusb.h
virutil.c maint: forbid 'int foo = true' 2014-11-19 08:20:39 -07:00
virutil.h virutil: Introduce virGetSCSIHostNameByParentaddr 2014-10-28 21:25:32 -04:00
viruuid.c
viruuid.h
virxml.c Remove unnecessary curly brackets in src/util/ 2014-11-14 17:13:35 +01:00
virxml.h