From: Wang King Date: Thu, 13 Apr 2017 02:16:27 +0000 (+0800) Subject: tools: remove unused assignment statement in virshStorageVolListCollect X-Git-Tag: v3.3.0-rc1~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9db0a63b7e0fd67ba21a6f5b410aa663acb4627a;p=thirdparty%2Flibvirt.git tools: remove unused assignment statement in virshStorageVolListCollect Assigning value true to @success if there is no volumes, that stored value is not used. --- diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index ddd41d229f..66fe70ea77 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));