Author: pfg
Date: Tue Mar 24 01:32:46 2015
New Revision: 280409
URL: https://svnweb.freebsd.org/changeset/base/280409

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

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

Modified: stable/9/usr.bin/grep/grep.c
==============================================================================
--- stable/9/usr.bin/grep/grep.c        Tue Mar 24 01:31:02 2015        
(r280408)
+++ stable/9/usr.bin/grep/grep.c        Tue Mar 24 01:32:46 2015        
(r280409)
@@ -315,7 +315,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