X-Git-Url: http://royale.zerezo.com/git/?p=FAPG;a=blobdiff_plain;f=fapg.c;h=745e6ae3387ac42c944c1fee7d2ce19125463de0;hp=17b02b8cb2d58fb7b260a8a2964fb5361c98f8e4;hb=c921eac7a8659c4994abb0f7b6cb07a0ae168139;hpb=0c1e07e01c487f248ed61fd22fd2a85be49eae19 diff --git a/fapg.c b/fapg.c index 17b02b8..745e6ae 100644 --- a/fapg.c +++ b/fapg.c @@ -425,7 +425,7 @@ void print_webpath(const char *path) { const char *c = path; - printf(prefix); /* we must not modify this part */ + printf("%s", prefix); /* we must not modify this part */ if(*c == '.' && c[1] == '/') { /* remove leading "./" when parsing current directory */ c += 2; /* maybe there follow many slashes */ @@ -443,7 +443,7 @@ void print_webpath(const char *path) void print_path(const char *path) { const char *c = path; - printf(prefix); + printf("%s", prefix); /* skip leading "./" when parsing current directory */ if(*c == '.' && *(c + 1) == '/') { c += 2; @@ -500,7 +500,6 @@ void reference(const char *title) pipe = popen(command, "r"); if(pipe == NULL) { fprintf(stderr, "Warning >> can't open pipe >%s< !\n", command); - free(command); return; } fgets(buffer, 1020, pipe); @@ -1336,12 +1335,10 @@ void parse_file(unsigned char *newpath, unsigned char * original_path) counter++; switch (format) { case FORMAT_M3U: - if(duration != -1) { - printf("#EXTINF:%d,", duration); - if(strlen(artist) != 0) - printf("%s - ", artist); - printf("%s%s", title, eol); - } + printf("#EXTINF:%d,", duration); + if(strlen(artist) != 0) + printf("%s - ", artist); + printf("%s%s", title, eol); print_path(newpath); printf("%s", eol); break;