| 193 | } |
| 194 | |
| 195 | static int check_if_different(struct trailer_item *in_tok, |
| 196 | struct arg_item *arg_tok, |
| 197 | int check_all, |
| 198 | struct list_head *head) |
| 199 | { |
| 200 | enum trailer_where where = arg_tok->conf.where; |
| 201 | struct list_head *next_head; |
| 202 | do { |
| 203 | if (same_trailer(in_tok, arg_tok)) |
| 204 | return 0; |
| 205 | /* |
| 206 | * if we want to add a trailer after another one, |
| 207 | * we have to check those before this one |
| 208 | */ |
| 209 | next_head = after_or_end(where) ? in_tok->list.prev |
| 210 | : in_tok->list.next; |
| 211 | if (next_head == head) |
| 212 | break; |
| 213 | in_tok = list_entry(next_head, struct trailer_item, list); |
| 214 | } while (check_all); |
| 215 | return 1; |
| 216 | } |
| 217 | |
| 218 | static char *apply_command(struct conf_info *conf, const char *arg) |
| 219 | { |
no test coverage detected