summaryrefslogtreecommitdiffstats
path: root/usr.bin/grep/grep.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2010-08-19 22:55:17 +0000
committerdelphij <delphij@FreeBSD.org>2010-08-19 22:55:17 +0000
commit1c0b6c81efe136b764b55b3362338dc62c514b48 (patch)
tree2b1a570ef88bf0033c4ce481386b8f63ec93ea44 /usr.bin/grep/grep.c
parentdf3fa718d477fbac636ef9b3922354f33d8635e8 (diff)
downloadFreeBSD-src-1c0b6c81efe136b764b55b3362338dc62c514b48.zip
FreeBSD-src-1c0b6c81efe136b764b55b3362338dc62c514b48.tar.gz
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
Diffstat (limited to 'usr.bin/grep/grep.c')
-rw-r--r--usr.bin/grep/grep.c5
1 files changed, 1 insertions, 4 deletions
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);
OpenPOWER on IntegriCloud