提交 ca1eb181 编写于 作者: J John Ferlan

secret: Rename virSecretObjPtr 'entry' to 'secret'

Just renaming the variable in secretConnectListAllSecrets.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 bfd25584
...@@ -576,7 +576,7 @@ secretConnectListAllSecrets(virConnectPtr conn, ...@@ -576,7 +576,7 @@ secretConnectListAllSecrets(virConnectPtr conn,
virSecretPtr *tmp_secrets = NULL; virSecretPtr *tmp_secrets = NULL;
int nsecrets = 0; int nsecrets = 0;
int ret_nsecrets = 0; int ret_nsecrets = 0;
virSecretObjPtr entry = NULL; virSecretObjPtr secret = NULL;
size_t i = 0; size_t i = 0;
int ret = -1; int ret = -1;
...@@ -587,39 +587,39 @@ secretConnectListAllSecrets(virConnectPtr conn, ...@@ -587,39 +587,39 @@ secretConnectListAllSecrets(virConnectPtr conn,
secretDriverLock(); secretDriverLock();
for (entry = driver->secrets; entry != NULL; entry = entry->next) for (secret = driver->secrets; secret != NULL; secret = secret->next)
nsecrets++; nsecrets++;
if (secrets && VIR_ALLOC_N(tmp_secrets, nsecrets + 1) < 0) if (secrets && VIR_ALLOC_N(tmp_secrets, nsecrets + 1) < 0)
goto cleanup; goto cleanup;
for (entry = driver->secrets; entry != NULL; entry = entry->next) { for (secret = driver->secrets; secret != NULL; secret = secret->next) {
if (!virConnectListAllSecretsCheckACL(conn, if (!virConnectListAllSecretsCheckACL(conn,
entry->def)) secret->def))
continue; continue;
/* filter by whether it's ephemeral */ /* filter by whether it's ephemeral */
if (MATCH(VIR_CONNECT_LIST_SECRETS_FILTERS_EPHEMERAL) && if (MATCH(VIR_CONNECT_LIST_SECRETS_FILTERS_EPHEMERAL) &&
!((MATCH(VIR_CONNECT_LIST_SECRETS_EPHEMERAL) && !((MATCH(VIR_CONNECT_LIST_SECRETS_EPHEMERAL) &&
entry->def->ephemeral) || secret->def->ephemeral) ||
(MATCH(VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL) && (MATCH(VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL) &&
!entry->def->ephemeral))) !secret->def->ephemeral)))
continue; continue;
/* filter by whether it's private */ /* filter by whether it's private */
if (MATCH(VIR_CONNECT_LIST_SECRETS_FILTERS_PRIVATE) && if (MATCH(VIR_CONNECT_LIST_SECRETS_FILTERS_PRIVATE) &&
!((MATCH(VIR_CONNECT_LIST_SECRETS_PRIVATE) && !((MATCH(VIR_CONNECT_LIST_SECRETS_PRIVATE) &&
entry->def->private) || secret->def->private) ||
(MATCH(VIR_CONNECT_LIST_SECRETS_NO_PRIVATE) && (MATCH(VIR_CONNECT_LIST_SECRETS_NO_PRIVATE) &&
!entry->def->private))) !secret->def->private)))
continue; continue;
if (secrets) { if (secrets) {
if (!(tmp_secrets[ret_nsecrets] = if (!(tmp_secrets[ret_nsecrets] =
virGetSecret(conn, virGetSecret(conn,
entry->def->uuid, secret->def->uuid,
entry->def->usage_type, secret->def->usage_type,
secretUsageIDForDef(entry->def)))) secretUsageIDForDef(secret->def))))
goto cleanup; goto cleanup;
} }
ret_nsecrets++; ret_nsecrets++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册