virJSONValueObjectAdd now works identically to virJSONValueObjectCreate
when used with a NULL argument. Replace all callers.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
va_end(args);
- if (virJSONValueObjectCreate(&obj,
- "s:execute", cmdname,
- "A:arguments", &jargs,
- NULL) < 0)
+ if (virJSONValueObjectAdd(&obj,
+ "s:execute", cmdname,
+ "A:arguments", &jargs,
+ NULL) < 0)
return NULL;
return g_steal_pointer(&obj);