[libvirt] [PATCH 2/5] qemuDomainObjBeginJobInternal: Remove spurious @ret assignment

Michal Privoznik posted 5 patches 6 years, 11 months ago
[libvirt] [PATCH 2/5] qemuDomainObjBeginJobInternal: Remove spurious @ret assignment
Posted by Michal Privoznik 6 years, 11 months ago
The variable is initialized to -1 already. There's no way it can
be overwritten by the time control gets to the line I'm removing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_domain.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 97149613a2..5273ab56ac 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -6471,7 +6471,6 @@ qemuDomainObjBeginJobInternal(virQEMUDriverPtr driver,
     else
         blocker = priv->job.asyncOwnerAPI;
 
-    ret = -1;
     if (errno == ETIMEDOUT) {
         if (blocker) {
             virReportError(VIR_ERR_OPERATION_TIMEOUT,
-- 
2.16.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/5] qemuDomainObjBeginJobInternal: Remove spurious @ret assignment
Posted by John Ferlan 6 years, 11 months ago

On 06/07/2018 07:59 AM, Michal Privoznik wrote:
> The variable is initialized to -1 already. There's no way it can
> be overwritten by the time control gets to the line I'm removing.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  src/qemu/qemu_domain.c | 1 -
>  1 file changed, 1 deletion(-)
> 

Reviewed-by: John Ferlan <jferlan@redhat.com>

John

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