mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-26 04:59:30 +08:00
command: fix coding style
Add {...}, change if(!a) to if(a) and swap its if/else body.
This commit is contained in:
+6
-5
@@ -2165,19 +2165,20 @@ static int property_switch_track(struct m_property *prop, int action, void *arg,
|
||||
}
|
||||
return M_PROPERTY_OK;
|
||||
case M_PROPERTY_PRINT:
|
||||
if (!track)
|
||||
*(char **) arg = talloc_strdup(NULL, "no");
|
||||
else {
|
||||
if (track) {
|
||||
char *lang = track->lang;
|
||||
if (!lang)
|
||||
lang = "unknown";
|
||||
|
||||
if (track->title)
|
||||
if (track->title) {
|
||||
*(char **)arg = talloc_asprintf(NULL, "(%d) %s (\"%s\")",
|
||||
track->user_tid, lang, track->title);
|
||||
else
|
||||
} else {
|
||||
*(char **)arg = talloc_asprintf(NULL, "(%d) %s",
|
||||
track->user_tid, lang);
|
||||
}
|
||||
} else {
|
||||
*(char **) arg = talloc_strdup(NULL, "no");
|
||||
}
|
||||
return M_PROPERTY_OK;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user