[libvirt] [PATCH v2 07/12] storage: Use virStoragePoolObjGetAutostartLink
Michal Privoznik
mprivozn at redhat.com
Tue Sep 19 06:38:48 UTC 2017
On 08/24/2017 03:09 PM, John Ferlan wrote:
> Use the new accessor API for storage_driver.
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
> src/storage/storage_driver.c | 21 ++++++++++++---------
> 1 file changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
> index 7b1396f..a7a77ba 100644
> --- a/src/storage/storage_driver.c
> +++ b/src/storage/storage_driver.c
> @@ -814,6 +814,7 @@ static int
> storagePoolUndefine(virStoragePoolPtr pool)
> {
> virStoragePoolObjPtr obj;
> + const char *autostartLink;
> virObjectEventPtr event = NULL;
> int ret = -1;
>
> @@ -838,18 +839,17 @@ storagePoolUndefine(virStoragePoolPtr pool)
> goto cleanup;
> }
>
> + autostartLink = virStoragePoolObjGetAutostartLink(obj);
virStoragePoolObjGetAutostartLink() should look a bit different. Now
it's returning char * which suggests that caller is supposed to free the
retval. But in fact they shouldn't. const char * would be better. But
lets save that for a follow up patch.
Michal
More information about the libvir-list
mailing list