Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Oct 2011 01:09:57 +0000 (UTC)
From:      Gabor Kovesdan <gabor@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r226273 - head/usr.bin/grep
Message-ID:  <201110120109.p9C19v6H040099@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gabor
Date: Wed Oct 12 01:09:57 2011
New Revision: 226273
URL: http://svn.freebsd.org/changeset/base/226273

Log:
  - Fix counting of match limit (-m)
  
  Reported by:	Nali Toja <nalitoja@gmail.com>
  Approved by:	delphij (mentor)

Modified:
  head/usr.bin/grep/util.c

Modified: head/usr.bin/grep/util.c
==============================================================================
--- head/usr.bin/grep/util.c	Wed Oct 12 00:17:43 2011	(r226272)
+++ head/usr.bin/grep/util.c	Wed Oct 12 01:09:57 2011	(r226273)
@@ -233,7 +233,7 @@ procfile(const char *fn)
 			linesqueued++;
 		}
 		c += t;
-		if (mflag && mcount < 0)
+		if (mflag && mcount <= 0)
 			break;
 	}
 	if (Bflag > 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110120109.p9C19v6H040099>