map

minimalistic audio player
git clone https://porkepik.fr/map
Log | Files | Refs | README | LICENSE

commit f16b9cda2ea492b14d0c3da1650c9e38625db476
parent 495cf60f649dcf7c98f063038f753bbf8b41c377
Author: Thomas Philippe <dev@porkepik.fr>
Date:   Tue, 27 Aug 2019 02:40:58 +0200

replace strncmp with strcmp

Diffstat:
Mmap.c | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/map.c b/map.c @@ -247,14 +247,9 @@ get_tracks(const char *curdir) static int trackcmp(const void *a, const void *b) { - size_t len; const struct track *arg1 = *(const struct track **)a; const struct track *arg2 = *(const struct track **)b; - if (strlen(arg1->filename) < strlen(arg2->filename)) - len = strlen(arg1->filename); - else - len = strlen(arg2->filename); - return strncmp(arg1->filename, arg2->filename, len); + return strcmp(arg1->filename, arg2->filename); } static void