[libvirt PATCH 0/9] ch: use g_auto where possible

Ján Tomko posted 9 patches 2 years, 7 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1632344053.git.jtomko@redhat.com
src/ch/ch_monitor.c | 167 +++++++++++++++++---------------------------
1 file changed, 63 insertions(+), 104 deletions(-)
[libvirt PATCH 0/9] ch: use g_auto where possible
Posted by Ján Tomko 2 years, 7 months ago
While cleaning up the tests, I noticed that the 'ch' driver is
not using g_auto up to its full potential.

Use automatic cleanup where possible and remove redundant labels.

Ján Tomko (9):
  ch: use g_auto in virCHMonitorBuildCPUJson
  ch: use g_auto in virCHMonitorBuildKernelRelatedJson
  ch: use g_auto in virCHMonitorBuildMemoryJson
  ch: use g_auto in virCHMonitorBuildDiskJson
  ch: use g_auto in virCHMonitorBuildDisksJson
  ch: use g_auto in virCHMonitorBuildNetJson
  ch: use g_auto in virCHMonitorBuildNetsJson
  ch: use g_auto in virCHMonitorBuildVMJson
  ch: use g_auto in virCHMonitorNew

 src/ch/ch_monitor.c | 167 +++++++++++++++++---------------------------
 1 file changed, 63 insertions(+), 104 deletions(-)

-- 
2.31.1

Re: [libvirt PATCH 0/9] ch: use g_auto where possible
Posted by Douglas, William 2 years, 7 months ago
On Wed, 2021-09-22 at 22:55 +0200, Ján Tomko wrote:
> While cleaning up the tests, I noticed that the 'ch' driver is
> not using g_auto up to its full potential.
> 
> Use automatic cleanup where possible and remove redundant labels.
> 
> Ján Tomko (9):
>   ch: use g_auto in virCHMonitorBuildCPUJson
>   ch: use g_auto in virCHMonitorBuildKernelRelatedJson
>   ch: use g_auto in virCHMonitorBuildMemoryJson
>   ch: use g_auto in virCHMonitorBuildDiskJson
>   ch: use g_auto in virCHMonitorBuildDisksJson
>   ch: use g_auto in virCHMonitorBuildNetJson
>   ch: use g_auto in virCHMonitorBuildNetsJson
>   ch: use g_auto in virCHMonitorBuildVMJson
>   ch: use g_auto in virCHMonitorNew
> 
>  src/ch/ch_monitor.c | 167 +++++++++++++++++-------------------------
> --
>  1 file changed, 63 insertions(+), 104 deletions(-)
> 

Nice cleanup +1 for the patchset from me, thanks!

Re: [libvirt PATCH 0/9] ch: use g_auto where possible
Posted by Laine Stump 2 years, 7 months ago
On 9/22/21 4:55 PM, Ján Tomko wrote:
> While cleaning up the tests, I noticed that the 'ch' driver is
> not using g_auto up to its full potential.
> 
> Use automatic cleanup where possible and remove redundant labels.
> 
> Ján Tomko (9):
>    ch: use g_auto in virCHMonitorBuildCPUJson
>    ch: use g_auto in virCHMonitorBuildKernelRelatedJson
>    ch: use g_auto in virCHMonitorBuildMemoryJson
>    ch: use g_auto in virCHMonitorBuildDiskJson
>    ch: use g_auto in virCHMonitorBuildDisksJson
>    ch: use g_auto in virCHMonitorBuildNetJson
>    ch: use g_auto in virCHMonitorBuildNetsJson
>    ch: use g_auto in virCHMonitorBuildVMJson
>    ch: use g_auto in virCHMonitorNew
> 
>   src/ch/ch_monitor.c | 167 +++++++++++++++++---------------------------
>   1 file changed, 63 insertions(+), 104 deletions(-)
> 

I pointed out pre-existing object leaks in patch 2 & 9, which you could 
just fix with simple prerequisite patches. Aside from that

Reviewed-by: Laine Stump <laine@redhat.com>

for the series.