| 313 | } |
| 314 | |
| 315 | static void apply_arg_if_missing(struct list_head *head, |
| 316 | struct arg_item *arg_tok) |
| 317 | { |
| 318 | enum trailer_where where; |
| 319 | struct trailer_item *to_add; |
| 320 | |
| 321 | switch (arg_tok->conf.if_missing) { |
| 322 | case MISSING_DO_NOTHING: |
| 323 | free_arg_item(arg_tok); |
| 324 | break; |
| 325 | case MISSING_ADD: |
| 326 | where = arg_tok->conf.where; |
| 327 | apply_item_command(NULL, arg_tok); |
| 328 | to_add = trailer_from_arg(arg_tok); |
| 329 | if (after_or_end(where)) |
| 330 | list_add_tail(&to_add->list, head); |
| 331 | else |
| 332 | list_add(&to_add->list, head); |
| 333 | break; |
| 334 | default: |
| 335 | BUG("trailer.c: unhandled value %d", |
| 336 | arg_tok->conf.if_missing); |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | static int find_same_and_apply_arg(struct list_head *head, |
| 341 | struct arg_item *arg_tok) |
no test coverage detected