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 <nalit...@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)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to