mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 17:52:43 +00:00
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:
parent
be730b4f66
commit
dc6b602d4f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=280408
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user