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>
int rc;
va_list args;
- if (virJSONValueObjectCreate(&props,
- "s:qom-type", type,
- "s:id", alias,
- NULL) < 0)
+ if (virJSONValueObjectAdd(&props,
+ "s:qom-type", type,
+ "s:id", alias,
+ NULL) < 0)
return -1;
*props = NULL;
}
- if (virJSONValueObjectCreate(&pr,
- "s:qom-type", type,
- "s:id", id,
- "A:props", props,
- NULL) < 0)
+ if (virJSONValueObjectAdd(&pr,
+ "s:qom-type", type,
+ "s:id", id,
+ "A:props", props,
+ NULL) < 0)
return -1;
}