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:
pfg 2015-03-24 01:31:02 +00:00
parent 5b98e57430
commit 333a2693df

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