From 1c0b6c81efe136b764b55b3362338dc62c514b48 Mon Sep 17 00:00:00 2001 From: delphij Date: Thu, 19 Aug 2010 22:55:17 +0000 Subject: Revert a minor part of revision 211364: - Imply -h if single file is grepped, this is the GNU behaviour This is already done by code above the change and have caused a regression since this instance of code does not check Hflag. Reported by: davidxu Pointy hat to: delphij --- usr.bin/grep/grep.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'usr.bin/grep/grep.c') diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index 3cb277c..f531c56 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -681,15 +681,12 @@ main(int argc, char *argv[]) if (dirbehave == DIR_RECURSE) c = grep_tree(aargv); - else { - if (aargc == 1) - hflag = true; + else for (c = 0; aargc--; ++aargv) { if ((finclude || fexclude) && !file_matching(*aargv)) continue; c+= procfile(*aargv); } - } #ifndef WITHOUT_NLS catclose(catalog); -- cgit v1.1