]> xenbits.xensource.com Git - libvirt.git/commitdiff
event: Make debug message match function comments
authorDoug Goldstein <cardoe@cardoe.com>
Sat, 21 Sep 2013 16:07:21 +0000 (11:07 -0500)
committerDoug Goldstein <cardoe@cardoe.com>
Fri, 27 Sep 2013 16:16:35 +0000 (11:16 -0500)
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

index c84ac20ff6cf56fc27d4bf173d3c69f0044c7c86..8a4c8bc8d230831b689133bd189030994c819c2f 100644 (file)
@@ -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;
 }