From f710129f32862b1129b8cff2c452bc7f068bd4b3 Mon Sep 17 00:00:00 2001 From: markwkidd Date: Wed, 7 Dec 2016 15:51:09 -0500 Subject: [PATCH] cleaner to use strpbrk --- playlist.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/playlist.c b/playlist.c index 84631fd290..d1548df98d 100644 --- a/playlist.c +++ b/playlist.c @@ -466,10 +466,8 @@ static bool playlist_read_file( /* Read playlist entry regardless * of Windows or Unix line endings */ - if(last = strrchr(buf[i], '\r')) + if((last = strpbrk(buf[i], "\n\r"))) *last = '\0'; - else if(last = strrchr(buf[i], '\n')) - *last = '\0'; } entry = &playlist->entries[playlist->size];