secret: Use 'secret' instead of 's' for variable name

Remove one letter variable.

Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
John Ferlan 2016-02-23 18:01:11 -05:00
parent ca1eb18113
commit 72a0121896

View File

@ -118,12 +118,12 @@ secretFree(virSecretObjPtr secret)
static virSecretObjPtr static virSecretObjPtr
secretFindByUUID(const unsigned char *uuid) secretFindByUUID(const unsigned char *uuid)
{ {
virSecretObjPtr *pptr, s; virSecretObjPtr *pptr, secret;
for (pptr = &driver->secrets; *pptr != NULL; pptr = &s->next) { for (pptr = &driver->secrets; *pptr != NULL; pptr = &secret->next) {
s = *pptr; secret = *pptr;
if (memcmp(s->def->uuid, uuid, VIR_UUID_BUFLEN) == 0) if (memcmp(secret->def->uuid, uuid, VIR_UUID_BUFLEN) == 0)
return s; return secret;
} }
return NULL; return NULL;
} }
@ -132,12 +132,12 @@ static virSecretObjPtr
secretFindByUsage(int usageType, secretFindByUsage(int usageType,
const char *usageID) const char *usageID)
{ {
virSecretObjPtr *pptr, s; virSecretObjPtr *pptr, secret;
for (pptr = &driver->secrets; *pptr != NULL; pptr = &s->next) { for (pptr = &driver->secrets; *pptr != NULL; pptr = &secret->next) {
s = *pptr; secret = *pptr;
if (s->def->usage_type != usageType) if (secret->def->usage_type != usageType)
continue; continue;
switch (usageType) { switch (usageType) {
@ -146,18 +146,18 @@ secretFindByUsage(int usageType,
break; break;
case VIR_SECRET_USAGE_TYPE_VOLUME: case VIR_SECRET_USAGE_TYPE_VOLUME:
if (STREQ(s->def->usage.volume, usageID)) if (STREQ(secret->def->usage.volume, usageID))
return s; return secret;
break; break;
case VIR_SECRET_USAGE_TYPE_CEPH: case VIR_SECRET_USAGE_TYPE_CEPH:
if (STREQ(s->def->usage.ceph, usageID)) if (STREQ(secret->def->usage.ceph, usageID))
return s; return secret;
break; break;
case VIR_SECRET_USAGE_TYPE_ISCSI: case VIR_SECRET_USAGE_TYPE_ISCSI:
if (STREQ(s->def->usage.target, usageID)) if (STREQ(secret->def->usage.target, usageID))
return s; return secret;
break; break;
} }
} }
@ -470,10 +470,10 @@ loadSecrets(virSecretObjPtr *dest)
secrets we managed to find. */ secrets we managed to find. */
while (list != NULL) { while (list != NULL) {
virSecretObjPtr s; virSecretObjPtr secret;
s = listUnlink(&list); secret = listUnlink(&list);
listInsert(dest, s); listInsert(dest, secret);
} }
closedir(dir); closedir(dir);
@ -1017,10 +1017,10 @@ secretStateCleanup(void)
secretDriverLock(); secretDriverLock();
while (driver->secrets != NULL) { while (driver->secrets != NULL) {
virSecretObjPtr s; virSecretObjPtr secret;
s = listUnlink(&driver->secrets); secret = listUnlink(&driver->secrets);
secretFree(s); secretFree(secret);
} }
VIR_FREE(driver->directory); VIR_FREE(driver->directory);
@ -1088,13 +1088,13 @@ secretStateReload(void)
* Discard non-ephemeral secrets that were removed * Discard non-ephemeral secrets that were removed
* by the secrets directory. */ * by the secrets directory. */
while (driver->secrets != NULL) { while (driver->secrets != NULL) {
virSecretObjPtr s; virSecretObjPtr secret;
s = listUnlink(&driver->secrets); secret = listUnlink(&driver->secrets);
if (s->def->ephemeral) if (secret->def->ephemeral)
listInsert(&new_secrets, s); listInsert(&new_secrets, secret);
else else
secretFree(s); secretFree(secret);
} }
driver->secrets = new_secrets; driver->secrets = new_secrets;