ipc: cosmetic: switch a negated if/else

This commit is contained in:
wm4 2018-05-13 12:21:00 +02:00
parent b44ea70209
commit 11c74068b2
1 changed files with 3 additions and 3 deletions

View File

@ -269,11 +269,11 @@ static char *json_execute_command(struct mpv_handle *client, void *ta_parent,
char *result = mpv_get_property_string(client,
cmd_node->u.list->values[1].u.string);
if (!result) {
mpv_node_map_add_null(ta_parent, &reply_node, "data");
} else {
if (result) {
mpv_node_map_add_string(ta_parent, &reply_node, "data", result);
mpv_free(result);
} else {
mpv_node_map_add_null(ta_parent, &reply_node, "data");
}
} else if (!strcmp("set_property", cmd) ||
!strcmp("set_property_string", cmd))