[libvirt] [PATCH] tools: remove unused assignment statement in virshStorageVolListCollect

Wang King posted 1 patch 6 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20170413021627.10312-1-king.wang@huawei.com
tools/virsh-volume.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
[libvirt] [PATCH] tools: remove unused assignment statement in virshStorageVolListCollect
Posted by Wang King 6 years, 11 months ago
Assigning value true to @success if there is no volumes, that stored value is not used.
---
 tools/virsh-volume.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c
index ddd41d2..66fe70e 100644
--- a/tools/virsh-volume.c
+++ b/tools/virsh-volume.c
@@ -1282,10 +1282,8 @@ virshStorageVolListCollect(vshControl *ctl,
         goto cleanup;
     }
 
-    if (nvols == 0) {
-        success = true;
+    if (nvols == 0)
         return list;
-    }
 
     /* Retrieve the list of volume names in the pool */
     names = vshCalloc(ctl, nvols, sizeof(*names));
-- 
2.8.3


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] tools: remove unused assignment statement in virshStorageVolListCollect
Posted by John Ferlan 6 years, 11 months ago

On 04/12/2017 10:16 PM, Wang King wrote:
> Assigning value true to @success if there is no volumes, that stored value is not used.
> ---
>  tools/virsh-volume.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 

ACK (and will push shortly)

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list