On 08/24/2017 03:09 PM, John Ferlan wrote:
Use the new accessor API for storage_driver.
Signed-off-by: John Ferlan <jferlan(a)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