[PATCH 00/23] Remove return value from VIR_APPEND_ELEMENT and cleanups

Peter Krempa posted 23 patches 2 years, 8 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1628074874.git.pkrempa@redhat.com
src/bhyve/bhyve_parse_command.c           |  18 +--
src/conf/capabilities.c                   |  11 +-
src/conf/domain_conf.c                    |  95 ++++++----------
src/conf/network_conf.c                   |   9 +-
src/conf/node_device_conf.c               |  24 ++--
src/conf/nwfilter_conf.c                  |  12 +-
src/conf/object_event.c                   |   9 +-
src/conf/storage_conf.c                   |   6 +-
src/conf/virdomainobjlist.c               |   6 +-
src/conf/virnwfilterobj.c                 |   8 +-
src/cpu/cpu_arm.c                         |   6 +-
src/cpu/cpu_ppc64.c                       |   6 +-
src/cpu/cpu_x86.c                         |  21 ++--
src/esx/esx_driver.c                      |   7 +-
src/esx/esx_network_driver.c              |   3 +-
src/hyperv/hyperv_driver.c                |  22 +---
src/hyperv/hyperv_network_driver.c        |   3 +-
src/libvirt_private.syms                  |   1 +
src/libxl/xen_common.c                    |  17 +--
src/libxl/xen_xl.c                        |  21 +---
src/libxl/xen_xm.c                        |  21 +---
src/logging/log_handler.c                 |   6 +-
src/lxc/lxc_container.c                   |   5 +-
src/lxc/lxc_controller.c                  |   3 +-
src/lxc/lxc_native.c                      |  12 +-
src/network/bridge_driver.c               |   4 +-
src/node_device/node_device_driver.c      |   3 +-
src/nwfilter/nwfilter_ebiptables_driver.c |   3 +-
src/nwfilter/nwfilter_gentech_driver.c    |  57 ++++------
src/openvz/openvz_conf.c                  |   8 +-
src/qemu/qemu_block.c                     |   9 +-
src/qemu/qemu_command.c                   |  14 +--
src/qemu/qemu_domain.c                    |   6 +-
src/qemu/qemu_domain_address.c            |   9 +-
src/qemu/qemu_driver.c                    |  17 +--
src/qemu/qemu_firmware.c                  |   3 +-
src/qemu/qemu_hotplug.c                   |   6 +-
src/qemu/qemu_monitor_json.c              |   3 +-
src/qemu/qemu_namespace.c                 |   5 +-
src/qemu/qemu_process.c                   |  17 +--
src/remote/remote_daemon_dispatch.c       |  56 ++++------
src/rpc/virnetdaemon.c                    |   4 +-
src/rpc/virnetmessage.c                   |   3 +-
src/rpc/virnetserver.c                    |  12 +-
src/security/security_dac.c               |   3 +-
src/security/security_manager.c           |   5 +-
src/security/security_selinux.c           |  15 +--
src/storage/storage_backend_logical.c     |  38 +++----
src/storage/storage_backend_rbd.c         |   3 +-
src/util/viralloc.c                       | 129 +++++++++++++++++-----
src/util/viralloc.h                       |  48 ++++----
src/util/virfirewall.c                    |   8 +-
src/util/viriscsi.c                       |   3 +-
src/util/virjson.c                        |   5 +-
src/util/virlog.c                         |  10 +-
src/util/virmdev.c                        |   7 +-
src/util/virnetdev.c                      |   3 +-
src/util/virnvme.c                        |   7 +-
src/util/virpci.c                         |  13 +--
src/util/virprocess.c                     |   3 +-
src/util/virresctrl.c                     |   6 +-
src/util/virscsi.c                        |   7 +-
src/util/virscsivhost.c                   |   4 +-
src/util/virusb.c                         |   4 +-
src/util/virutil.c                        |   9 +-
src/vbox/vbox_common.c                    |  13 +--
src/vmx/vmx.c                             |   3 +-
src/vz/vz_sdk.c                           |  32 ++----
tests/nwfilterxml2firewalltest.c          |  13 +--
tests/qemumonitortestutils.c              |  11 +-
tests/testutils.c                         |  10 +-
tests/virfilewrapper.c                    |   9 +-
tests/virpcimock.c                        |  10 +-
tools/virsh-domain.c                      |   3 +-
tools/vsh-table.c                         |   9 +-
75 files changed, 404 insertions(+), 630 deletions(-)
[PATCH 00/23] Remove return value from VIR_APPEND_ELEMENT and cleanups
Posted by Peter Krempa 2 years, 8 months ago
Since this touches all kind of conditionally compiled code you can find
the pipeline build results here:

https://gitlab.com/pipo.sk/libvirt/-/pipelines/347734973

Peter Krempa (23):
  virInsertElementsN: Rename 'add' argument
  virInsertElementsN: Split out actual insertion code
  util: alloc: Introduce virAppendElement helper
  util: alloc: Reimplement VIR_APPEND_ELEMENT_(COPY_)INPLACE using
    virAppendElement
  util: alloc: Reimplement VIR_APPEND_ELEMENT_COPY using
    virAppendElement
  util: alloc: Reimplement VIR_APPEND_ELEMENT_QUIET using
    virAppendElement
  util: alloc: Reimplement VIR_APPEND_ELEMENT using virAppendElement
  util: alloc: Completely replace VIR_APPEND_ELEMENT_QUIET by
    VIR_APPEND_ELEMENT
  prlsdkAddDomainVideoInfoCt: Remove pointless cleanup section
  xenParseXMDisk: Use automatic memory clearing and remove 'ret'
    variable
  qemuDomainUSBAddressAddHubs: Refactor cleanup
  virSecuritySELinuxContextListAppend: Remove unreachable cleanup
  qemuDomainAttachDeviceConfig: Remove pointless assignment
  virNWFilterRuleDefToRuleInst: Remove pointless assignment
  virObjectEventCallbackListAddID: Remove pointless cleanup of 'cb'
  virNWFilterRuleDefToRuleInst: Restructure code to avoid cleanup
  virNWFilterIncludeDefToRuleInst: Refactor cleanup
  qemuProcessSetupHotpluggableVcpus: Use automatic memory freeing
  virNetServerGetClients: Remove pointless cleanup
  lxcNetworkParseDataIPs: Automatically free string list
  virStorageBackendLogicalParseVolExtents: Declare one variable per line
  virStorageBackendLogicalParseVolExtents: Move 'extents' inside the
    loop
  virStorageBackendLogicalParseVolExtents: Remove 'cleanup' and 'ret'

 src/bhyve/bhyve_parse_command.c           |  18 +--
 src/conf/capabilities.c                   |  11 +-
 src/conf/domain_conf.c                    |  95 ++++++----------
 src/conf/network_conf.c                   |   9 +-
 src/conf/node_device_conf.c               |  24 ++--
 src/conf/nwfilter_conf.c                  |  12 +-
 src/conf/object_event.c                   |   9 +-
 src/conf/storage_conf.c                   |   6 +-
 src/conf/virdomainobjlist.c               |   6 +-
 src/conf/virnwfilterobj.c                 |   8 +-
 src/cpu/cpu_arm.c                         |   6 +-
 src/cpu/cpu_ppc64.c                       |   6 +-
 src/cpu/cpu_x86.c                         |  21 ++--
 src/esx/esx_driver.c                      |   7 +-
 src/esx/esx_network_driver.c              |   3 +-
 src/hyperv/hyperv_driver.c                |  22 +---
 src/hyperv/hyperv_network_driver.c        |   3 +-
 src/libvirt_private.syms                  |   1 +
 src/libxl/xen_common.c                    |  17 +--
 src/libxl/xen_xl.c                        |  21 +---
 src/libxl/xen_xm.c                        |  21 +---
 src/logging/log_handler.c                 |   6 +-
 src/lxc/lxc_container.c                   |   5 +-
 src/lxc/lxc_controller.c                  |   3 +-
 src/lxc/lxc_native.c                      |  12 +-
 src/network/bridge_driver.c               |   4 +-
 src/node_device/node_device_driver.c      |   3 +-
 src/nwfilter/nwfilter_ebiptables_driver.c |   3 +-
 src/nwfilter/nwfilter_gentech_driver.c    |  57 ++++------
 src/openvz/openvz_conf.c                  |   8 +-
 src/qemu/qemu_block.c                     |   9 +-
 src/qemu/qemu_command.c                   |  14 +--
 src/qemu/qemu_domain.c                    |   6 +-
 src/qemu/qemu_domain_address.c            |   9 +-
 src/qemu/qemu_driver.c                    |  17 +--
 src/qemu/qemu_firmware.c                  |   3 +-
 src/qemu/qemu_hotplug.c                   |   6 +-
 src/qemu/qemu_monitor_json.c              |   3 +-
 src/qemu/qemu_namespace.c                 |   5 +-
 src/qemu/qemu_process.c                   |  17 +--
 src/remote/remote_daemon_dispatch.c       |  56 ++++------
 src/rpc/virnetdaemon.c                    |   4 +-
 src/rpc/virnetmessage.c                   |   3 +-
 src/rpc/virnetserver.c                    |  12 +-
 src/security/security_dac.c               |   3 +-
 src/security/security_manager.c           |   5 +-
 src/security/security_selinux.c           |  15 +--
 src/storage/storage_backend_logical.c     |  38 +++----
 src/storage/storage_backend_rbd.c         |   3 +-
 src/util/viralloc.c                       | 129 +++++++++++++++++-----
 src/util/viralloc.h                       |  48 ++++----
 src/util/virfirewall.c                    |   8 +-
 src/util/viriscsi.c                       |   3 +-
 src/util/virjson.c                        |   5 +-
 src/util/virlog.c                         |  10 +-
 src/util/virmdev.c                        |   7 +-
 src/util/virnetdev.c                      |   3 +-
 src/util/virnvme.c                        |   7 +-
 src/util/virpci.c                         |  13 +--
 src/util/virprocess.c                     |   3 +-
 src/util/virresctrl.c                     |   6 +-
 src/util/virscsi.c                        |   7 +-
 src/util/virscsivhost.c                   |   4 +-
 src/util/virusb.c                         |   4 +-
 src/util/virutil.c                        |   9 +-
 src/vbox/vbox_common.c                    |  13 +--
 src/vmx/vmx.c                             |   3 +-
 src/vz/vz_sdk.c                           |  32 ++----
 tests/nwfilterxml2firewalltest.c          |  13 +--
 tests/qemumonitortestutils.c              |  11 +-
 tests/testutils.c                         |  10 +-
 tests/virfilewrapper.c                    |   9 +-
 tests/virpcimock.c                        |  10 +-
 tools/virsh-domain.c                      |   3 +-
 tools/vsh-table.c                         |   9 +-
 75 files changed, 404 insertions(+), 630 deletions(-)

-- 
2.31.1

Re: [PATCH 00/23] Remove return value from VIR_APPEND_ELEMENT and cleanups
Posted by Michal Prívozník 2 years, 8 months ago
On 8/4/21 1:02 PM, Peter Krempa wrote:
> Since this touches all kind of conditionally compiled code you can find
> the pipeline build results here:
> 
> https://gitlab.com/pipo.sk/libvirt/-/pipelines/347734973
> 
> Peter Krempa (23):
>   virInsertElementsN: Rename 'add' argument
>   virInsertElementsN: Split out actual insertion code
>   util: alloc: Introduce virAppendElement helper
>   util: alloc: Reimplement VIR_APPEND_ELEMENT_(COPY_)INPLACE using
>     virAppendElement
>   util: alloc: Reimplement VIR_APPEND_ELEMENT_COPY using
>     virAppendElement
>   util: alloc: Reimplement VIR_APPEND_ELEMENT_QUIET using
>     virAppendElement
>   util: alloc: Reimplement VIR_APPEND_ELEMENT using virAppendElement
>   util: alloc: Completely replace VIR_APPEND_ELEMENT_QUIET by
>     VIR_APPEND_ELEMENT
>   prlsdkAddDomainVideoInfoCt: Remove pointless cleanup section
>   xenParseXMDisk: Use automatic memory clearing and remove 'ret'
>     variable
>   qemuDomainUSBAddressAddHubs: Refactor cleanup
>   virSecuritySELinuxContextListAppend: Remove unreachable cleanup
>   qemuDomainAttachDeviceConfig: Remove pointless assignment
>   virNWFilterRuleDefToRuleInst: Remove pointless assignment
>   virObjectEventCallbackListAddID: Remove pointless cleanup of 'cb'
>   virNWFilterRuleDefToRuleInst: Restructure code to avoid cleanup
>   virNWFilterIncludeDefToRuleInst: Refactor cleanup
>   qemuProcessSetupHotpluggableVcpus: Use automatic memory freeing
>   virNetServerGetClients: Remove pointless cleanup
>   lxcNetworkParseDataIPs: Automatically free string list
>   virStorageBackendLogicalParseVolExtents: Declare one variable per line
>   virStorageBackendLogicalParseVolExtents: Move 'extents' inside the
>     loop
>   virStorageBackendLogicalParseVolExtents: Remove 'cleanup' and 'ret'
> 


>  75 files changed, 404 insertions(+), 630 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal