grep: fix -Fi
function old new delta grep_file 1151 1169 +18 Signed-off-by: Ian Wienand <ianw@vmware.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
committed by
Denys Vlasenko
parent
d2844fcb68
commit
0a2c793bd6
@ -254,7 +254,10 @@ static int grep_file(FILE *file)
|
||||
while (pattern_ptr) {
|
||||
gl = (grep_list_data_t *)pattern_ptr->data;
|
||||
if (FGREP_FLAG) {
|
||||
found |= (strstr(line, gl->pattern) != NULL);
|
||||
found |= (((option_mask32 & OPT_i)
|
||||
? strcasestr(line, gl->pattern)
|
||||
: strstr(line, gl->pattern)
|
||||
) != NULL);
|
||||
} else {
|
||||
if (!(gl->flg_mem_alocated_compiled & COMPILED)) {
|
||||
gl->flg_mem_alocated_compiled |= COMPILED;
|
||||
|
Reference in New Issue
Block a user