mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
bsdgrep: fix regression in the -f option since r268799
Caused by an incomplete merge from NetBSD. PR: 198725 MFC after: 3 days
This commit is contained in:
parent
3fde12b6f8
commit
2fa7a2afac
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue