aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index c2c1e424f2..8baeaf0ff3 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2799,6 +2799,7 @@ static QDict *monitor_parse_arguments(Monitor *mon,
break;
case 'o':
{
+ int ret;
int64_t val;
char *end;
@@ -2811,8 +2812,8 @@ static QDict *monitor_parse_arguments(Monitor *mon,
break;
}
}
- val = qemu_strtosz_MiB(p, &end);
- if (val < 0) {
+ ret = qemu_strtosz_MiB(p, &end, &val);
+ if (ret < 0) {
monitor_printf(mon, "invalid size\n");
goto fail;
}