summaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
authorEric Andersen2001-11-20 00:23:48 +0000
committerEric Andersen2001-11-20 00:23:48 +0000
commit81ee96fe62916e9bd571cf3456d87cb1bba4c210 (patch)
tree425b6c0cb5efe78505d2f3948c5a96e598508284 /findutils
parentc36642195cb97c1a632b85d4f473058f1409aaed (diff)
downloadbusybox-81ee96fe62916e9bd571cf3456d87cb1bba4c210.zip
busybox-81ee96fe62916e9bd571cf3456d87cb1bba4c210.tar.gz
Usr get_last_path_component() name basename()
Diffstat (limited to 'findutils')
-rw-r--r--findutils/grep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/findutils/grep.c b/findutils/grep.c
index d39dac1..0fe898c 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -244,7 +244,8 @@ extern int grep_main(int argc, char **argv)
#endif
#ifdef CONFIG_FEATURE_GREP_EGREP_ALIAS
- if (strcmp (basename (argv[0]), "egrep") == 0)
+ junk = get_last_path_component(argv[0]);
+ if (junk && strcmp(junk, "egrep") == 0)
reflags |= REG_EXTENDED;
#endif