summaryrefslogtreecommitdiff
path: root/src/compat/compat-basename.c
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2016-12-27 18:25:47 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2016-12-27 18:25:47 +0100
commit79f3537f69e125f19f59c36aa090120a63186a54 (patch)
tree2089a3b7dac990841dbc2e4d9b2f535b82dbb0af /src/compat/compat-basename.c
parentf2137fedb30cb87448eb03b2f288920df6187571 (diff)
parent3a2bbdb05ca6a6996e424c9fb225cb0d53804125 (diff)
Merge tag 'upstream/2.4.0'
Upstream version 2.4.0
Diffstat (limited to 'src/compat/compat-basename.c')
-rw-r--r--src/compat/compat-basename.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/compat/compat-basename.c b/src/compat/compat-basename.c
index a057691..b7b5c43 100644
--- a/src/compat/compat-basename.c
+++ b/src/compat/compat-basename.c
@@ -37,14 +37,15 @@
* This version is extended to handle both / and \ in path names
*/
char *
-basename (char *filename)
+basename(char *filename)
{
- char *p = strrchr (filename, '/');
- if (!p) {
- /* If NULL, check for \ instead ... might be Windows a path */
- p = strrchr (filename, '\\');
- }
- return p ? p + 1 : (char *) filename;
+ char *p = strrchr(filename, '/');
+ if (!p)
+ {
+ /* If NULL, check for \ instead ... might be Windows a path */
+ p = strrchr(filename, '\\');
+ }
+ return p ? p + 1 : (char *) filename;
}
#endif /* HAVE_BASENAME */