Merge "Fix grep -f."

This commit is contained in:
Elliott Hughes 2014-03-01 01:12:49 +00:00 committed by Gerrit Code Review
commit 54bb1d3b98

View file

@ -294,10 +294,8 @@ read_patterns(const char *fn)
err(2, "%s", fn);
line = NULL;
len = 0;
#ifndef ANDROID
while ((rlen = getline(&line, &len, f)) != -1)
add_pattern(line, *line == '\n' ? 0 : (size_t)rlen);
#endif
free(line);
if (ferror(f))
err(2, "%s", fn);