[PATCH v2 0/6] use g_autofree and g_autoptr

Kristina Hanicova khanicov at redhat.com
Wed Mar 3 10:48:14 UTC 2021


This is v2 from
https://listman.redhat.com/archives/libvir-list/2021-February/msg01117.html

I split commit 3/4 into more commits and left out autofreeing outer
array as suggested by Jan Tomko.
Patches 2/6 and 6/6 (previously 2/4 and 4/4) have already been
reviewed-by and I am sending them for completness.

This uses g_autofree (if possible) in files: vsh-table,
     netdev_bandwidth_conf and g_autoptr instead of
     virNetDevBandwidthFree where possible.


Kristina Hanicova (6):
  vsh-table: Use g_autofree where possible
  netdev_bandwidth_conf: Use g_autofree where possible
  netdev_bandwidth_conf: Refractor virNetDevBandwidthParse()
  Use g_steal_pointer where possible
  Use g_autoptr instead of virNetDevBandwidthFree where possible
  netdev_bandwidth_conf: Remove redundant variables/labels

 src/conf/netdev_bandwidth_conf.c | 67 ++++++++++++--------------------
 src/network/bridge_driver.c      |  6 +--
 src/qemu/qemu_driver.c           | 11 ++----
 src/test/test_driver.c           |  3 +-
 src/util/virnetdevbandwidth.h    |  2 +
 tests/virnetdevbandwidthtest.c   |  3 +-
 tools/vsh-table.c                | 13 ++-----
 7 files changed, 39 insertions(+), 66 deletions(-)

-- 
2.29.2




More information about the libvir-list mailing list