Author: pfg
Date: Sat Mar 21 00:21:30 2015
New Revision: 280307
URL: https://svnweb.freebsd.org/changeset/base/280307

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

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

Modified: head/usr.bin/grep/grep.c
==============================================================================
--- head/usr.bin/grep/grep.c    Fri Mar 20 23:48:11 2015        (r280306)
+++ head/usr.bin/grep/grep.c    Sat Mar 21 00:21:30 2015        (r280307)
@@ -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-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to