From 237772bb4095e4fa4dcaadd390e83a27ac1d2134 Mon Sep 17 00:00:00 2001 From: Georg Kilzer Date: Sun, 4 Feb 2018 05:58:58 +0100 Subject: [PATCH] Use the DIR_SEP macro to remove an ifdef. --- src/helpers.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/helpers.c b/src/helpers.c index 17a13e7..6754c1d 100644 --- a/src/helpers.c +++ b/src/helpers.c @@ -170,14 +170,9 @@ file_basename(const char *file) { char *ptr; - if ((ptr = strrchr(file, '/')) != NULL) { + if ((ptr = strrchr(file, DIR_SEP)) != NULL) { return ptr + 1; } -#ifdef _WIN32 - if ((ptr = strrchr(file, '\\')) != NULL) { - return ptr + 1; - } -#endif return file; }