[libvirt] [PATCH] util: Missing 'removeTimeoutImpl' check variable inside virEventRegisterImpl() function.

Julio Faracco posted 1 patch 6 years, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1508427303-14536-1-git-send-email-jcfaracco@gmail.com
src/util/virevent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] util: Missing 'removeTimeoutImpl' check variable inside virEventRegisterImpl() function.
Posted by Julio Faracco 6 years, 6 months ago
The function virEventRegisterImpl() checks the attempt to replace the
registered events. But there is a duplicate variable inside the IF statement.
The variable 'removeHandleImpl' was wrongly repeated. One of them needs to be
replaced by 'removeTimeoutImpl'.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
---
 src/util/virevent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virevent.c b/src/util/virevent.c
index 51d8714..87069e3 100644
--- a/src/util/virevent.c
+++ b/src/util/virevent.c
@@ -241,7 +241,7 @@ void virEventRegisterImpl(virEventAddHandleFunc addHandle,
               addTimeout, updateTimeout, removeTimeout);
 
     if (addHandleImpl || updateHandleImpl || removeHandleImpl ||
-        addTimeoutImpl || updateTimeoutImpl || removeHandleImpl) {
+        addTimeoutImpl || updateTimeoutImpl || removeTimeoutImpl) {
         VIR_WARN("Ignoring attempt to replace registered event loop");
         return;
     }
-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] util: Missing 'removeTimeoutImpl' check variable inside virEventRegisterImpl() function.
Posted by Andrea Bolognani 6 years, 6 months ago
On Thu, 2017-10-19 at 13:35 -0200, Julio Faracco wrote:
> The function virEventRegisterImpl() checks the attempt to replace the
> registered events. But there is a duplicate variable inside the IF statement.
> The variable 'removeHandleImpl' was wrongly repeated. One of them needs to be
> replaced by 'removeTimeoutImpl'.
> 
> Signed-off-by: Julio Faracco <jcfaracco@gmail.com>

Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] util: Missing 'removeTimeoutImpl' check variable inside virEventRegisterImpl() function.
Posted by John Ferlan 6 years, 6 months ago

On 10/19/2017 11:35 AM, Julio Faracco wrote:
> The function virEventRegisterImpl() checks the attempt to replace the
> registered events. But there is a duplicate variable inside the IF statement.
> The variable 'removeHandleImpl' was wrongly repeated. One of them needs to be
> replaced by 'removeTimeoutImpl'.
> 
> Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
> ---
>  src/util/virevent.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Introduced by commit id '5f5c515bb'

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

will push shortly...

Tks,

John

> diff --git a/src/util/virevent.c b/src/util/virevent.c
> index 51d8714..87069e3 100644
> --- a/src/util/virevent.c
> +++ b/src/util/virevent.c
> @@ -241,7 +241,7 @@ void virEventRegisterImpl(virEventAddHandleFunc addHandle,
>                addTimeout, updateTimeout, removeTimeout);
>  
>      if (addHandleImpl || updateHandleImpl || removeHandleImpl ||
> -        addTimeoutImpl || updateTimeoutImpl || removeHandleImpl) {
> +        addTimeoutImpl || updateTimeoutImpl || removeTimeoutImpl) {
>          VIR_WARN("Ignoring attempt to replace registered event loop");
>          return;
>      }
> 

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