diff options
Diffstat (limited to 'hmp.c')
-rw-r--r-- | hmp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1348,7 +1348,7 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict) long valueint = 0; Error *err = NULL; bool use_int_value = false; - int i; + int i, ret; for (i = 0; i < MIGRATION_PARAMETER__MAX; i++) { if (strcmp(param, MigrationParameter_lookup[i]) == 0) { @@ -1384,8 +1384,8 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict) break; case MIGRATION_PARAMETER_MAX_BANDWIDTH: p.has_max_bandwidth = true; - valuebw = qemu_strtosz_MiB(valuestr, NULL); - if (valuebw < 0 || (size_t)valuebw != valuebw) { + ret = qemu_strtosz_MiB(valuestr, NULL, &valuebw); + if (ret < 0 || (size_t)valuebw != valuebw) { error_setg(&err, "Invalid size %s", valuestr); goto cleanup; } |