aboutsummaryrefslogtreecommitdiff
path: root/migration/qemu-file.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-05-08 15:08:52 +0200
committerJuan Quintela <quintela@redhat.com>2023-05-15 13:44:38 +0200
commitbffc0441d52e1b88c7fca857cc8e2d5c24c15c5e (patch)
treee58b263ca7b2fb110f7c843f51913437596eef3c /migration/qemu-file.c
parent9d3ebbe21749937f9c9270d0841016e57de3fb92 (diff)
qemu-file: make qemu_file_[sg]et_rate_limit() use an uint64_t
It is really size_t. Everything else uses uint64_t, so move this to uint64_t as well. A size can't be negative anyways. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20230508130909.65420-5-quintela@redhat.com>
Diffstat (limited to 'migration/qemu-file.c')
-rw-r--r--migration/qemu-file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 60f6345033..94d1069c8e 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -44,7 +44,7 @@ struct QEMUFile {
* Maximum amount of data in bytes to transfer during one
* rate limiting time window
*/
- int64_t rate_limit_max;
+ uint64_t rate_limit_max;
/*
* Total amount of data in bytes queued for transfer
* during this rate limiting time window
@@ -738,12 +738,12 @@ int qemu_file_rate_limit(QEMUFile *f)
return 0;
}
-int64_t qemu_file_get_rate_limit(QEMUFile *f)
+uint64_t qemu_file_get_rate_limit(QEMUFile *f)
{
return f->rate_limit_max;
}
-void qemu_file_set_rate_limit(QEMUFile *f, int64_t limit)
+void qemu_file_set_rate_limit(QEMUFile *f, uint64_t limit)
{
/*
* 'limit' is per second. But we check it each 100 miliseconds.