svn commit: r280409 - stable/9/usr.bin/grep
Pedro F. Giffuni
pfg at FreeBSD.org
Tue Mar 24 01:32:47 UTC 2015
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);
More information about the svn-src-stable-9
mailing list