aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Kbuild1
-rw-r--r--libbb/find_pid_by_name.c8
-rw-r--r--libbb/lineedit.c2
3 files changed, 2 insertions, 9 deletions
diff --git a/libbb/Kbuild b/libbb/Kbuild
index 693f6092c..ecd50a616 100644
--- a/libbb/Kbuild
+++ b/libbb/Kbuild
@@ -8,6 +8,7 @@ lib-y:=
lib-y += ask_confirmation.o
lib-y += bb_askpass.o
+lib-y += bb_basename.o
lib-y += bb_do_delay.o
lib-y += bb_pwd.o
lib-y += bb_strtonum.o
diff --git a/libbb/find_pid_by_name.c b/libbb/find_pid_by_name.c
index cfc5b3468..1fafec83a 100644
--- a/libbb/find_pid_by_name.c
+++ b/libbb/find_pid_by_name.c
@@ -38,14 +38,6 @@ execXXX("/proc/self/exe", applet_name, params....)
and therefore comm field contains "exe".
*/
-static const char *bb_basename(const char *name)
-{
- const char *cp = strrchr(name, '/');
- if (cp)
- return cp + 1;
- return name;
-}
-
/* find_pid_by_name()
*
* Modified by Vladimir Oleynik for use with libbb/procps.c
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 1f2e6a54e..62f8949d6 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1156,7 +1156,7 @@ static void parse_prompt(const char *prmt_ptr)
#endif
case 'W':
pbuf = pwd_buf;
- cp = strrchr(pbuf,'/');
+ cp = strrchr(pbuf, '/');
if (cp != NULL && cp != pbuf)
pbuf += (cp-pbuf) + 1;
break;