ls.c: remove unnecessary strdup
git-svn-id: https://svn.musicpd.org/mpd/trunk@3927 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
6963502213
commit
6dadabea21
2
src/ls.c
2
src/ls.c
@ -155,12 +155,10 @@ int lsPlaylists(FILE * fp, char * utf8path) {
|
|||||||
if(stat(s,&st)==0) {
|
if(stat(s,&st)==0) {
|
||||||
if(S_ISREG(st.st_mode)) {
|
if(S_ISREG(st.st_mode)) {
|
||||||
if(list==NULL) list = makeList(NULL, 1);
|
if(list==NULL) list = makeList(NULL, 1);
|
||||||
dup = strdup(ent->d_name);
|
|
||||||
dup[suff] = '\0';
|
dup[suff] = '\0';
|
||||||
if((utf8 = fsCharsetToUtf8(dup))) {
|
if((utf8 = fsCharsetToUtf8(dup))) {
|
||||||
insertInList(list,utf8,NULL);
|
insertInList(list,utf8,NULL);
|
||||||
}
|
}
|
||||||
free(dup);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user