From d2ffdc2bb5b20cd7859d4e0728101075f618cc2b Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Fri, 14 Aug 2009 16:59:41 +0200 Subject: [PATCH] remove redundant check in MPD::Song::SetHashAndSlash() http is already filtered out with isStream() function --- src/song.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/song.cpp b/src/song.cpp index c82fef50..af7c32d0 100644 --- a/src/song.cpp +++ b/src/song.cpp @@ -453,7 +453,7 @@ void MPD::Song::SetHashAndSlash() if (!isStream()) { const char *tmp = strrchr(itsSong->file, '/'); - itsSlash = tmp && *(tmp-1) != '/' /* no http:// */ ? tmp-itsSong->file : std::string::npos; + itsSlash = tmp ? tmp-itsSong->file : std::string::npos; } itsHash = calc_hash(itsSong->file); }