Author: pfg
Date: Tue Mar 24 01:31:02 2015
New Revision: 280408
URL: https://svnweb.freebsd.org/changeset/base/280408

Log:
  MFC   r280307:
  bsdgrep: fix regression in the -f option since r268799
  
  Caused by an incomplete merge from NetBSD.
  
  PR:           198725

Modified:
  stable/10/usr.bin/grep/grep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/grep/grep.c
==============================================================================
--- stable/10/usr.bin/grep/grep.c       Tue Mar 24 00:10:11 2015        
(r280407)
+++ stable/10/usr.bin/grep/grep.c       Tue Mar 24 01:31:02 2015        
(r280408)
@@ -316,7 +316,7 @@ read_patterns(const char *fn)
        len = 0;
        line = NULL;
        while ((rlen = getline(&line, &len, f)) != -1)
-               add_pattern(line, line[0] == '\n' ? 0 : len);
+               add_pattern(line, line[0] == '\n' ? 0 : (size_t)rlen);
        free(line);
        if (ferror(f))
                err(2, "%s", fn);
_______________________________________________
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