From 71eb8b3f61bf10df306d124ac247358472a2512d Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Sat, 4 Jan 2020 10:28:03 +0100 Subject: [PATCH] fs.c: replaces rindex with strrchr --- src/fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fs.c b/src/fs.c index 77841cf..e35078d 100644 --- a/src/fs.c +++ b/src/fs.c @@ -1,4 +1,4 @@ -#include +#include #include // error_message_format @@ -46,7 +46,7 @@ int dirname_ (const char *path, char *dname) { assert (dname != NULL); - char *last_slash = rindex (path, '/'); + char *last_slash = strrchr (path, '/'); int pathlen = last_slash - path; snprintf (dname, pathlen + 1, "%s", path);