libvirt/src/conf
Michal Privoznik 857df2fe50 lib: Drop intermediary return variables
In a few places we declare a variable (which is optionally
followed by a code not touching it) then set the variable to a
value and return the variable immediately. It's obvious that the
variable is needless and the value can be returned directly
instead.

This patch was generated using this semantic patch:

  @@
  type T;
  identifier ret;
  expression E;
  @@
  - T ret;
  ... when != ret
      when strict
  - ret = E;
  - return ret;
  + return E;

After that I fixed couple of formatting issues because coccinelle
formatted some lines differently than our coding style.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-10-25 12:48:46 +02:00
..
backup_conf.c conf: replace validation with variables passed to virXMLParse() 2021-08-12 13:12:29 +02:00
backup_conf.h
capabilities.c conf: Introduce virCapabilitiesHostNUMAGetMaxNode() 2021-08-23 13:59:28 +02:00
capabilities.h conf: Introduce virCapabilitiesHostNUMAGetMaxNode() 2021-08-23 13:59:28 +02:00
checkpoint_conf.c conf: snapshot/checkpoint: Rewrite 'AlignDisk' logic to appease clang 2021-08-23 16:59:23 +02:00
checkpoint_conf.h
cpu_conf.c virCPUDefParseXML: Prefer virXMLPropUInt over virXPathUInt 2021-10-01 10:52:35 +02:00
cpu_conf.h
device_conf.c virDomainDeviceSpaprVioAddressParseXML: Use virXMLProp* 2021-05-20 11:52:46 +02:00
device_conf.h qemuBuildDeviceAddressProps: Format also 'drive' addresses 2021-10-12 10:26:04 +02:00
domain_addr.c lib: Drop intermediary return variables 2021-10-25 12:48:46 +02:00
domain_addr.h conf: Make virDomainDeviceInfoFormat() const correct 2021-10-20 16:53:01 +02:00
domain_audit.c conf: Parse/format XML input type 'evdev' 2021-05-21 14:29:09 +02:00
domain_audit.h
domain_capabilities.c conf: Add availability of s390-pv in domain capabilities 2021-07-21 13:30:30 +02:00
domain_capabilities.h conf: Add availability of s390-pv in domain capabilities 2021-07-21 13:30:30 +02:00
domain_conf.c lib: Drop intermediary return variables 2021-10-25 12:48:46 +02:00
domain_conf.h conf: Add new/free functions for virDomainIOMMUDef 2021-10-20 16:53:09 +02:00
domain_event.c qemu: Wire up MEMORY_DEVICE_SIZE_CHANGE event 2021-10-01 11:04:47 +02:00
domain_event.h qemu: Wire up MEMORY_DEVICE_SIZE_CHANGE event 2021-10-01 11:04:47 +02:00
domain_nwfilter.c virNWFilterBindingDefForNet: Remove superfluous gotos 2021-07-19 09:39:15 +02:00
domain_nwfilter.h
domain_validate.c conf: Add page_per_vq for driver element 2021-10-15 09:40:55 +02:00
domain_validate.h conf: validate: Move qemu-specific LUN disk validation to global validation 2021-09-09 10:17:28 +02:00
interface_conf.c conf: add validation and propagate flags into virInterfaceDefParse() 2021-08-20 15:41:21 +02:00
interface_conf.h conf: add validation and propagate flags into virInterfaceDefParse() 2021-08-20 15:41:21 +02:00
meson.build
moment_conf.c
moment_conf.h
netdev_bandwidth_conf.c
netdev_bandwidth_conf.h
netdev_vlan_conf.c
netdev_vlan_conf.h
netdev_vport_profile_conf.c
netdev_vport_profile_conf.h
network_conf.c src: network_conf: propagate only bool to virNetworkDefParseString() 2021-09-10 17:38:06 +02:00
network_conf.h src: network_conf: propagate only bool to virNetworkDefParseString() 2021-09-10 17:38:06 +02:00
network_event.c
network_event.h
networkcommon_conf.c
networkcommon_conf.h
node_device_conf.c Add PCI VPD Capability Support 2021-10-21 17:34:04 +01:00
node_device_conf.h Add PCI VPD Capability Support 2021-10-21 17:34:04 +01:00
node_device_event.c
node_device_event.h
node_device_util.c
node_device_util.h
numa_conf.c numa_conf: Expose virNumaInterconnect formatter 2021-06-15 10:41:22 +02:00
numa_conf.h numa_conf: Expose virNumaInterconnect formatter 2021-06-15 10:41:22 +02:00
nwfilter_conf.c nwfilter_conf: add validation against schema in define 2021-08-20 15:38:53 +02:00
nwfilter_conf.h nwfilter_conf: add validation against schema in define 2021-08-20 15:38:53 +02:00
nwfilter_ipaddrmap.c virNWFilterIPAddrMapInit: virHashNew cannot return NULL 2021-07-23 11:27:05 +02:00
nwfilter_ipaddrmap.h
nwfilter_params.c virNWFilterParseParamAttributes: Simplify loop 2021-08-04 10:39:27 +02:00
nwfilter_params.h conf: Add AUTOPTR_CLEANUP_FUNC for virNWFilterVarValue 2021-07-23 11:27:05 +02:00
object_event_private.h
object_event.c virObjectEventCallbackListAddID: Remove pointless cleanup of 'cb' 2021-08-06 08:53:26 +02:00
object_event.h
secret_conf.c secret_conf: add validation against schema in define 2021-08-20 15:41:22 +02:00
secret_conf.h secret_conf: add validation against schema in define 2021-08-20 15:41:22 +02:00
secret_event.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
secret_event.h
snapshot_conf_priv.h
snapshot_conf.c conf: snapshot/checkpoint: Rewrite 'AlignDisk' logic to appease clang 2021-08-23 16:59:23 +02:00
snapshot_conf.h conf: snapshot: rename variable holding memory snapshot file location 2021-06-18 09:16:16 +02:00
storage_adapter_conf.c virStorageAdapterParseXML: Use virXMLProp* 2021-05-20 11:52:44 +02:00
storage_adapter_conf.h virStorageAdapterFCHost: Change type of "type" to virStorageAdapterType 2021-05-20 11:52:41 +02:00
storage_capabilities.c
storage_capabilities.h
storage_conf.c storage_conf: add validation against schema in pool define 2021-08-25 09:57:51 +02:00
storage_conf.h storage_conf: add validation against schema in pool define 2021-08-25 09:57:51 +02:00
storage_encryption_conf.c
storage_encryption_conf.h
storage_event.c
storage_event.h
storage_source_conf.c
storage_source_conf.h storage_source: Add flag storing whether threshold event was registered with index 2021-07-12 16:34:07 +02:00
virchrdev.c virChrdevAlloc: virHashNew cannot return NULL 2021-07-23 11:30:49 +02:00
virchrdev.h
virconftypes.h conf: Refactor launch security to allow more types 2021-07-21 13:30:14 +02:00
virdomaincheckpointobjlist.c
virdomaincheckpointobjlist.h
virdomainmomentobjlist.c virDomainMomentObjListNew: virHashNew cannot return NULL 2021-07-23 11:31:03 +02:00
virdomainmomentobjlist.h
virdomainobjlist.c util: alloc: Reimplement VIR_APPEND_ELEMENT using virAppendElement 2021-08-06 08:53:25 +02:00
virdomainobjlist.h
virdomainsnapshotobjlist.c
virdomainsnapshotobjlist.h
virinterfaceobj.c conf: add validation and propagate flags into virInterfaceDefParse() 2021-08-20 15:41:21 +02:00
virinterfaceobj.h
virnetworkobj.c lib: Drop intermediary return variables 2021-10-25 12:48:46 +02:00
virnetworkobj.h
virnetworkportdef.c conf: virnetworkportdef: add validation against schema in network port create 2021-09-06 17:08:59 +02:00
virnetworkportdef.h conf: virnetworkportdef: add validation against schema in network port create 2021-09-06 17:08:59 +02:00
virnodedeviceobj.c Add PCI VPD Capability Support 2021-10-21 17:34:04 +01:00
virnodedeviceobj.h nodedev: implement virNodeDevice(Get|Set)Autostart() 2021-09-14 14:24:00 -05:00
virnwfilterbindingdef.c conf: virnwfilterbindingdef: add validation against schema in create 2021-09-06 17:08:59 +02:00
virnwfilterbindingdef.h conf: virnwfilterbindingdef: add validation against schema in create 2021-09-06 17:08:59 +02:00
virnwfilterbindingobj.c lib: Drop intermediary return variables 2021-10-25 12:48:46 +02:00
virnwfilterbindingobj.h
virnwfilterbindingobjlist.c virNWFilterBindingObjListNew: virHashNew cannot return NULL 2021-07-19 09:39:15 +02:00
virnwfilterbindingobjlist.h
virnwfilterobj.c lib: Drop intermediary return variables 2021-10-25 12:48:46 +02:00
virnwfilterobj.h
virsavecookie.c Remove redundant labels 2021-08-17 18:27:13 +02:00
virsavecookie.h
virsecretobj.c
virsecretobj.h
virstorageobj.c Remove redundant labels 2021-08-17 18:27:13 +02:00
virstorageobj.h