[PATCH v2 0/6] use g_autofree and g_autoptr

Kristina Hanicova posted 6 patches 3 years, 1 month ago
Failed in applying to current master (apply log)
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(-)
[PATCH v2 0/6] use g_autofree and g_autoptr
Posted by Kristina Hanicova 3 years, 1 month ago
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

Re: [PATCH v2 0/6] use g_autofree and g_autoptr
Posted by Ján Tomko 3 years, 1 month ago
On a Wednesday in 2021, Kristina Hanicova wrote:
>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(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

and pushed.

Jano