mirror of https://github.com/mpv-player/mpv
ipc: cosmetic: switch a negated if/else
This commit is contained in:
parent
40ebedabcf
commit
db03f01300
|
@ -280,11 +280,11 @@ static char *json_execute_command(struct mpv_handle *client, void *ta_parent,
|
||||||
|
|
||||||
char *result = mpv_get_property_string(client,
|
char *result = mpv_get_property_string(client,
|
||||||
cmd_node->u.list->values[1].u.string);
|
cmd_node->u.list->values[1].u.string);
|
||||||
if (!result) {
|
if (result) {
|
||||||
mpv_node_map_add_null(ta_parent, &reply_node, "data");
|
|
||||||
} else {
|
|
||||||
mpv_node_map_add_string(ta_parent, &reply_node, "data", result);
|
mpv_node_map_add_string(ta_parent, &reply_node, "data", result);
|
||||||
mpv_free(result);
|
mpv_free(result);
|
||||||
|
} else {
|
||||||
|
mpv_node_map_add_null(ta_parent, &reply_node, "data");
|
||||||
}
|
}
|
||||||
} else if (!strcmp("set_property", cmd) ||
|
} else if (!strcmp("set_property", cmd) ||
|
||||||
!strcmp("set_property_string", cmd))
|
!strcmp("set_property_string", cmd))
|
||||||
|
|
Loading…
Reference in New Issue