All callers of qemuMonitorJSONHumanCommand() pass a non-NULL pointer
as @reply_str therefore there's no need to check whether it is NULL.
NB, the sister function (qemuMonitorJSONArbitraryCommand()) doesn't
check for NULL either.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
virJSONValue *cmd = NULL;
virJSONValue *reply = NULL;
virJSONValue *obj;
+ const char *data;
int ret = -1;
cmd = qemuMonitorJSONMakeCommand("human-monitor-command",
goto cleanup;
obj = virJSONValueObjectGet(reply, "return");
-
- if (reply_str) {
- const char *data;
-
- data = virJSONValueGetString(obj);
- *reply_str = g_strdup(NULLSTR_EMPTY(data));
- }
+ data = virJSONValueGetString(obj);
+ *reply_str = g_strdup(NULLSTR_EMPTY(data));
ret = 0;