summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Kbuild.src1
-rw-r--r--libbb/bb_basename.c18
-rw-r--r--libbb/get_last_path_component.c10
3 files changed, 9 insertions, 20 deletions
diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src
index a22e708..fa6e5b6 100644
--- a/libbb/Kbuild.src
+++ b/libbb/Kbuild.src
@@ -13,7 +13,6 @@ INSERT
lib-y += appletlib.o
lib-y += ask_confirmation.o
lib-y += bb_askpass.o
-lib-y += bb_basename.o
lib-y += bb_bswap_64.o
lib-y += bb_do_delay.o
lib-y += bb_pwd.o
diff --git a/libbb/bb_basename.c b/libbb/bb_basename.c
deleted file mode 100644
index d678360..0000000
--- a/libbb/bb_basename.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Utility routines.
- *
- * Copyright (C) 2007 Denys Vlasenko
- *
- * Licensed under GPLv2, see file LICENSE in this source tree.
- */
-
-#include "libbb.h"
-
-const char* FAST_FUNC bb_basename(const char *name)
-{
- const char *cp = strrchr(name, '/');
- if (cp)
- return cp + 1;
- return name;
-}
diff --git a/libbb/get_last_path_component.c b/libbb/get_last_path_component.c
index 72598d2..04fdf2a 100644
--- a/libbb/get_last_path_component.c
+++ b/libbb/get_last_path_component.c
@@ -6,8 +6,16 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
-
#include "libbb.h"
+
+const char* FAST_FUNC bb_basename(const char *name)
+{
+ const char *cp = strrchr(name, '/');
+ if (cp)
+ return cp + 1;
+ return name;
+}
+
/*
* "/" -> "/"
* "abc" -> "abc"