| 198 | } |
| 199 | |
| 200 | static void *run(void *arg) |
| 201 | { |
| 202 | int hit = 0; |
| 203 | struct grep_opt *opt = arg; |
| 204 | |
| 205 | while (1) { |
| 206 | struct work_item *w = get_work(); |
| 207 | if (!w) |
| 208 | break; |
| 209 | |
| 210 | opt->output_priv = w; |
| 211 | hit |= grep_source(opt, &w->source); |
| 212 | grep_source_clear_data(&w->source); |
| 213 | work_done(w); |
| 214 | } |
| 215 | free_grep_patterns(opt); |
| 216 | free(opt); |
| 217 | |
| 218 | return (void*) (intptr_t) hit; |
| 219 | } |
| 220 | |
| 221 | static void strbuf_out(struct grep_opt *opt, const void *buf, size_t size) |
| 222 | { |
nothing calls this directly
no test coverage detected