[libvirt PATCH 00/10] virHashNew refactorings - part VI
Peter Krempa
pkrempa at redhat.com
Mon Jul 19 12:08:49 UTC 2021
On Mon, Jul 19, 2021 at 11:55:44 +0200, Tim Wiederhake wrote:
> "virHashNew" cannot return NULL, yet we check for NULL in various places.
>
> See https://listman.redhat.com/archives/libvir-list/2021-July/msg00074.html.
>
> Tim Wiederhake (10):
> qemuStateInitialize: `virHashNew` cannot return NULL
> qemuMonitorGetPRManagerInfo: `virHashNew` cannot return NULL
> qemuMonitorGetPRManagerInfo: Use automatic memory management
> qemuMonitorGetPRManagerInfo: Remove superfluous `goto`s
> qemuMonitorJSONGetAllBlockJobInfo: `virHashNew` cannot return NULL
> qemuMonitorJSONGetAllBlockJobInfo: Use automatic memory management
> qemuMonitorJSONGetAllBlockJobInfo: Remove superfluous `goto`s
> testQemuGetLatestCaps: `virHashNew` cannot return NULL
> testQemuGetLatestCaps: Use automatic memory management
> testQemuGetLatestCaps: Remove superfluous `goto`s
Series:
Reviewed-by: Peter Krempa <pkrempa at redhat.com>
For any further cleanups please consider fixing similar instances (e.g.
removal of NULL check for virHashNew) on a per-file basis rather than
per function.
Same way in most cases where you switching to automatic memory freeing
on a per-function basis it's okay to include cleanup of jumps/labels.
We mostly madated separation if you want to do it on a per-file basis.
More information about the libvir-list
mailing list