The check can be easily replaced with a simple test in the JSON
implementation and we don't need to update it every time a new parameter
is added.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
QEMU_CHECK_MONITOR_JSON(mon);
- if (!params->compressLevel_set &&
- !params->compressThreads_set &&
- !params->decompressThreads_set &&
- !params->cpuThrottleInitial_set &&
- !params->cpuThrottleIncrement_set &&
- !params->migrateTLSAlias &&
- !params->migrateTLSHostname)
- return 0;
-
return qemuMonitorJSONSetMigrationParams(mon, params);
}
#undef APPEND_INT
#undef APPEND_STR
+ if (virJSONValueObjectKeysNumber(args) == 0) {
+ ret = 0;
+ goto cleanup;
+ }
+
if (virJSONValueObjectAppend(cmd, "arguments", args) < 0)
goto cleanup;
args = NULL;