summaryrefslogtreecommitdiff
path: root/playlist.c
diff options
context:
space:
mode:
authorGravatar Igor Murzov <igor@gplsoft.org>2009-12-15 20:33:42 +0300
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-16 22:53:20 +0100
commit12ddfb5d72aad34d602f1e841b301e6fac84a0fc (patch)
tree03c88c0c325f7e9c5c291e7864d1f7cfb4236ce3 /playlist.c
parent684453e98446d1f3ab8079d25595650517b132de (diff)
readability edit in pl_insert_file
Diffstat (limited to 'playlist.c')
-rw-r--r--playlist.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/playlist.c b/playlist.c
index fde10860..5ef853b7 100644
--- a/playlist.c
+++ b/playlist.c
@@ -599,12 +599,10 @@ pl_insert_file (playItem_t *after, const char *fname, int *pabort, int (*cb)(pla
const char **exts = decoders[i]->exts;
for (int e = 0; exts[e]; e++) {
if (!strcasecmp (exts[e], eol)) {
- playItem_t *inserted = NULL;
- if ((inserted = (playItem_t *)decoders[i]->insert (DB_PLAYITEM (after), fname)) != NULL) {
- if (cb) {
- if (cb (inserted, user_data) < 0) {
- *pabort = 1;
- }
+ playItem_t *inserted = (playItem_t *)decoders[i]->insert (DB_PLAYITEM (after), fname);
+ if (inserted != NULL) {
+ if (cb && cb (inserted, user_data) < 0) {
+ *pabort = 1;
}
return inserted;
}