From bfd25584b4992c718fcba4bff8429308659236a9 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 23 Feb 2016 18:14:31 -0500 Subject: [PATCH] secret: Remove local virSecretPtr 'secret' Remove the need for the local 'secret' in secretConnectListAllSecrets. A subsequent patch will rename the ObjPtr entry to secret. Signed-off-by: John Ferlan --- src/secret/secret_driver.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c index 27c3f9e312..07b32570a2 100644 --- a/src/secret/secret_driver.c +++ b/src/secret/secret_driver.c @@ -576,7 +576,6 @@ secretConnectListAllSecrets(virConnectPtr conn, virSecretPtr *tmp_secrets = NULL; int nsecrets = 0; int ret_nsecrets = 0; - virSecretPtr secret = NULL; virSecretObjPtr entry = NULL; size_t i = 0; int ret = -1; @@ -616,12 +615,12 @@ secretConnectListAllSecrets(virConnectPtr conn, continue; if (secrets) { - if (!(secret = virGetSecret(conn, - entry->def->uuid, - entry->def->usage_type, - secretUsageIDForDef(entry->def)))) + if (!(tmp_secrets[ret_nsecrets] = + virGetSecret(conn, + entry->def->uuid, + entry->def->usage_type, + secretUsageIDForDef(entry->def)))) goto cleanup; - tmp_secrets[ret_nsecrets] = secret; } ret_nsecrets++; } -- GitLab