From: Wang Liang
The delay time should never be a negative value.
Signed-off-by: Wang Liang
---
include/qemu/ratelimit.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h
index 48bf59e857..c8ea855fc1 100644
--- a/include/qem
Alberto Garcia writes:
> On Wed 21 Sep 2022 09:47:32 AM +08, Wang Liang wrote:
>>> > -return limit->slice_end_time - now;
>>> > +return MAX(limit->slice_end_time - now, 0);
>>>
>>> How can this be negative? slice_end_time is guaranteed to be larger
>>> than
>>> now:
>>>
>>> if (limi
On Tue 20 Sep 2022 08:33:50 PM +08, wanglian...@126.com wrote:
> From: Wang Liang
>
> The delay time should never be a negative value.
>
> -return limit->slice_end_time - now;
> +return MAX(limit->slice_end_time - now, 0);
How can this be negative? slice_end_time is guaranteed to be large
On Tue, 2022-09-20 at 13:18 +, Alberto Garcia wrote:
> On Tue 20 Sep 2022 08:33:50 PM +08, wanglian...@126.com wrote:
> > From: Wang Liang
> >
> > The delay time should never be a negative value.
> >
> > -return limit->slice_end_time - now;
> > +return MAX(limit->slice_end_time - now
Wang Liang writes:
> On Tue, 2022-09-20 at 13:18 +, Alberto Garcia wrote:
>> On Tue 20 Sep 2022 08:33:50 PM +08, wanglian...@126.com wrote:
>> > From: Wang Liang
>> >
>> > The delay time should never be a negative value.
>> >
>> > -return limit->slice_end_time - now;
>> > +return M
On Wed, 2022-09-21 at 06:53 +0200, Markus Armbruster wrote:
> Wang Liang writes:
>
> > On Tue, 2022-09-20 at 13:18 +, Alberto Garcia wrote:
> > > On Tue 20 Sep 2022 08:33:50 PM +08, wanglian...@126.com wrote:
> > > > From: Wang Liang
> > > >
> > > > The delay time should never be a negative
On Wed 21 Sep 2022 09:47:32 AM +08, Wang Liang wrote:
>> > -return limit->slice_end_time - now;
>> > +return MAX(limit->slice_end_time - now, 0);
>>
>> How can this be negative? slice_end_time is guaranteed to be larger
>> than
>> now:
>>
>> if (limit->slice_end_time < now) {
>>