]> xenbits.xensource.com Git - libvirt.git/commit
virTypedParamsGetStringList: Refactor and adjust docs
authorPeter Krempa <pkrempa@redhat.com>
Fri, 27 Sep 2024 09:15:06 +0000 (11:15 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 1 Oct 2024 10:57:02 +0000 (12:57 +0200)
commite5fae984b1c500d5199ace234cdae2bc89da9065
treec41fad1f135608f62408c60b25bf3f3e49c06d8b
parent933ab93e8f7bb7779717305b602ef5d08cd72bed
virTypedParamsGetStringList: Refactor and adjust docs

Use automatic freeing, declare one variable per line and return early
when possible. As this is an internal helper there's no need to check
that the caller passed non-NULL @values.

Modify the documentation to be accurate and warn callers to not free the
strings just the array.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/util/virtypedparam.c