Re: [PATCH 3/3] event: Make debug message match function comments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 24, 2013 at 11:44:56AM -0500, Doug Goldstein wrote:
> The debug message said there was a timeout of 0 pending for -1 ms which
> made me think this is where a hang was coming from but according to the
> function comments this case means that there is no timeout pending so
> make the debug message say that instead of saying there's a -1 ms
> timeout.
> ---
>  src/util/vireventpoll.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/util/vireventpoll.c b/src/util/vireventpoll.c
> index c84ac20..8a4c8bc 100644
> --- a/src/util/vireventpoll.c
> +++ b/src/util/vireventpoll.c
> @@ -358,7 +358,10 @@ static int virEventPollCalculateTimeout(int *timeout) {
>          *timeout = -1;
>      }
>  
> -    EVENT_DEBUG("Timeout at %llu due in %d ms", then, *timeout);
> +    if (*timeout > -1)
> +        EVENT_DEBUG("Timeout at %llu due in %d ms", then, *timeout);
> +    else
> +        EVENT_DEBUG("%s", "No timeout is pending");
>  
>      return 0;
>  }

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]