aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ls.c6
-rw-r--r--src/player.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ls.c b/src/ls.c
index 4b634650b..38aaebe40 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -130,10 +130,12 @@ int isFile(char * utf8file, time_t * mtime) {
int hasSuffix(char * utf8file, char * suffix) {
char * file = utf8ToFsCharset(utf8file);
- char * dup = strdup(file);;
+ char * dup = strdup(file);
char * cLast;
- char * cNext = cLast = strtok(dup,".");
+ char * cNext;
int ret = 0;
+
+ cNext = cLast = strtok(dup,".");
while((cNext = strtok(NULL,"."))) cLast = cNext;
if(cLast && 0==strcasecmp(cLast,suffix)) ret = 1;
diff --git a/src/player.c b/src/player.c
index ea7d3723b..1685837fa 100644
--- a/src/player.c
+++ b/src/player.c
@@ -172,9 +172,10 @@ int playerGetDecodeType(char * utf8file) {
int playerPlay(FILE * fp, char * utf8file) {
PlayerControl * pc = &(getPlayerData()->playerControl);
- if(fp==NULL) fp = stderr;
int decodeType;
+ if(fp==NULL) fp = stderr;
+
if(playerStop(fp)<0) return -1;
{