]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Replace list element to defined variable
authorLi Yang <liyang.fnst@cn.fujitsu.com>
Tue, 29 Apr 2014 02:10:18 +0000 (22:10 -0400)
committerEric Blake <eblake@redhat.com>
Mon, 5 May 2014 19:49:09 +0000 (13:49 -0600)
Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
tools/virsh-secret.c

index 10d5db3d4b8166c1c21042c6d8a15a74509a540e..bbe83cf6901880d60694f43db7116fef5e6e2b25 100644 (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;
         }