diff options
author | Denis Vlasenko | 2006-12-21 13:23:14 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-12-21 13:23:14 +0000 |
commit | bf66fbc8e2380717c1fab860cfc60c78582839dd (patch) | |
tree | 3ab3dd4df901851ff7f4345708592118766ba4aa /coreutils/diff.c | |
parent | 6910741067913d131d931b1e6424d3b8ed43e64f (diff) | |
download | busybox-bf66fbc8e2380717c1fab860cfc60c78582839dd.zip busybox-bf66fbc8e2380717c1fab860cfc60c78582839dd.tar.gz |
introduce LONE_CHAR (optimized strcmp with one-char string)
Diffstat (limited to 'coreutils/diff.c')
-rw-r--r-- | coreutils/diff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/diff.c b/coreutils/diff.c index 887679a..a49d519 100644 --- a/coreutils/diff.c +++ b/coreutils/diff.c @@ -1079,7 +1079,7 @@ static char **get_dir(char *path) dp = warn_opendir(path); while ((ep = readdir(dp))) { - if ((!strcmp(ep->d_name, "..")) || (!strcmp(ep->d_name, "."))) + if (!strcmp(ep->d_name, "..") || LONE_CHAR(ep->d_name, '.')) continue; add_to_dirlist(ep->d_name, NULL, NULL, 0); } |