aboutsummaryrefslogtreecommitdiff
path: root/coreutils/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/test.c')
-rw-r--r--coreutils/test.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/coreutils/test.c b/coreutils/test.c
index 7b87a42f9..82d2664a8 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -181,11 +181,10 @@ static void initialize_group_array(void);
181int test_main(int argc, char **argv) 181int test_main(int argc, char **argv)
182{ 182{
183 int res; 183 int res;
184 char *arg0; 184 const char *arg0;
185 bool _off; 185 bool _off;
186 186
187 arg0 = strrchr(argv[0], '/'); 187 arg0 = bb_basename(argv[0]);
188 if (!arg0++) arg0 = argv[0];
189 if (arg0[0] == '[') { 188 if (arg0[0] == '[') {
190 --argc; 189 --argc;
191 if (!arg0[1]) { /* "[" ? */ 190 if (!arg0[1]) { /* "[" ? */