svn commit: r280307 - head/usr.bin/grep
Pedro F. Giffuni
pfg at FreeBSD.org
Sat Mar 21 00:21:31 UTC 2015
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);
More information about the svn-src-head
mailing list