virsh: Replace list element to defined variable

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
This commit is contained in:
Li Yang 2014-04-28 22:10:18 -04:00 committed by Eric Blake
parent da74412046
commit e4fe06e017

View File

@ -542,7 +542,7 @@ cmdSecretList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
const char *usageStr = virSecretUsageTypeTypeToString(usageType);
char uuid[VIR_UUID_STRING_BUFLEN];
if (virSecretGetUUIDString(list->secrets[i], uuid) < 0) {
if (virSecretGetUUIDString(sec, uuid) < 0) {
vshError(ctl, "%s", _("Failed to get uuid of secret"));
goto cleanup;
}