From bf66fbc8e2380717c1fab860cfc60c78582839dd Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 21 Dec 2006 13:23:14 +0000 Subject: introduce LONE_CHAR (optimized strcmp with one-char string) --- coreutils/diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coreutils/diff.c') diff --git a/coreutils/diff.c b/coreutils/diff.c index 887679a0a..a49d5195a 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); } -- cgit v1.2.3-55-g6feb