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
5b98e57430
commit
333a2693df
@ -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