From: Joel Rosdahl Date: Thu, 7 Oct 2010 19:48:29 +0000 (+0200) Subject: Improve basename()'s argument name X-Git-Tag: v3.2~305 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d07bcfbd50de12db061a08c7da73f132829f031;p=thirdparty%2Fccache.git Improve basename()'s argument name --- diff --git a/ccache.h b/ccache.h index 9698c1fde..03f63763e 100644 --- a/ccache.h +++ b/ccache.h @@ -121,7 +121,7 @@ void *x_realloc(void *ptr, size_t size); void *x_malloc(size_t size); void *x_calloc(size_t nmemb, size_t size); void traverse(const char *dir, void (*fn)(const char *, struct stat *)); -char *basename(const char *s); +char *basename(const char *path); char *dirname(const char *path); const char *get_extension(const char *path); char *remove_extension(const char *path); diff --git a/util.c b/util.c index d3b24d7e6..e09b2cf06 100644 --- a/util.c +++ b/util.c @@ -659,17 +659,17 @@ traverse(const char *dir, void (*fn)(const char *, struct stat *)) /* return the base name of a file - caller frees */ char * -basename(const char *s) +basename(const char *path) { char *p; - p = strrchr(s, '/'); - if (p) s = p + 1; + p = strrchr(path, '/'); + if (p) path = p + 1; #ifdef _WIN32 - p = strrchr(s, '\\'); - if (p) s = p + 1; + p = strrchr(path, '\\'); + if (p) path = p + 1; #endif - return x_strdup(s); + return x_strdup(path); } /* return the dir name of a file - caller frees */