aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/blockdev.c b/blockdev.c
index 6472548186..18acc5bf01 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -334,8 +334,9 @@ static bool parse_stats_intervals(BlockAcctStats *stats, QList *intervals,
break;
}
- case QTYPE_QINT: {
- int64_t length = qint_get_int(qobject_to_qint(entry->value));
+ case QTYPE_QNUM: {
+ int64_t length = qnum_get_int(qobject_to_qnum(entry->value));
+
if (length > 0 && length <= UINT_MAX) {
block_acct_add_interval(stats, (unsigned) length);
} else {