On 10/15/2015 09:08 AM, Markus Armbruster wrote: > We don't actually care for the scale, so we can just as well use the > simpler interface. > > Signed-off-by: Markus Armbruster <[email protected]> > --- > monitor.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/monitor.c b/monitor.c > index ca201fd..baffd76 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -545,10 +545,9 @@ monitor_qapi_event_throttle(QAPIEvent event, int64_t > rate) > assert(rate * SCALE_MS <= INT64_MAX);
A bit unrelated: Isn't this assertion risky, compared to: assert(rate <= INT64_MAX / SCALE_MS); > evstate->rate = rate * SCALE_MS; > evstate->qdict = NULL; > - evstate->timer = timer_new(QEMU_CLOCK_REALTIME, > - SCALE_MS, > - monitor_qapi_event_handler, > - evstate); > + evstate->timer = timer_new_ns(QEMU_CLOCK_REALTIME, > + monitor_qapi_event_handler, > + evstate); > } Reviewed-by: Eric Blake <[email protected]> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
