aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2013-01-05 00:44:24 -0600
committerRob Landley <rob@landley.net>2013-01-05 00:44:24 -0600
commit41ed9793498916c63d375326ea8c9b3fa1479dd6 (patch)
tree85cbe885f586ac1c0402b3bf3b3b3e7f7afa618b /toys/other
parent90e8605ea587c4ebd00de77e3c71551b6e26b7c0 (diff)
downloadtoybox-41ed9793498916c63d375326ea8c9b3fa1479dd6.tar.gz
Use basename() where appropriate.
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/rmmod.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/toys/other/rmmod.c b/toys/other/rmmod.c
index 093eb8a1..b789acc6 100644
--- a/toys/other/rmmod.c
+++ b/toys/other/rmmod.c
@@ -29,9 +29,7 @@ void rmmod_main(void)
int len;
// Basename
- mod_name = strrchr(toys.optargs[0],'/');
- if (mod_name) mod_name++;
- else mod_name = toys.optargs[0];
+ mod_name = basename(*toys.optargs);
// Remove .ko if present
len = strlen(mod_name);