stream: fix ratelimit_set_speed

The formula to compute slice_quota was wrong since commit 6ef228fc.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Dietmar Maurer 2012-10-24 12:10:47 +02:00 committed by Kevin Wolf
parent 0c6f08b0b0
commit e3980e28bb
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ static inline void ratelimit_set_speed(RateLimit *limit, uint64_t speed,
uint64_t slice_ns)
{
limit->slice_ns = slice_ns;
limit->slice_quota = ((double)speed * 1000000000ULL) / slice_ns;
limit->slice_quota = ((double)speed * slice_ns)/1000000000ULL;
}
#endif