summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-03-23 03:02:49 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-03-23 03:02:49 +0000
commitfc84fa54fccbee2e9cf3fe4fbaa4089500c24ab1 (patch)
tree7d8615e78a78e87e78711f4514f98a415aa2ea24 /src/ls.c
parent7874a003e9084b0dd763b1e9deeb1c0bc0a0d52b (diff)
fix some gcc-2.95 errors
git-svn-id: https://svn.musicpd.org/mpd/trunk@414 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c6
1 files changed, 4 insertions, 2 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;