MFC r280307:

bsdgrep: fix regression in the -f option since r268799

Caused by an incomplete merge from NetBSD.

PR:		198725
This commit is contained in:
Pedro F. Giffuni 2015-03-24 01:31:02 +00:00
parent be730b4f66
commit dc6b602d4f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=280408

View File

@ -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);