| 59 | } |
| 60 | |
| 61 | static int option_parse_trailer(const struct option *opt, |
| 62 | const char *arg, int unset) |
| 63 | { |
| 64 | struct list_head *trailers = opt->value; |
| 65 | struct new_trailer_item *item; |
| 66 | |
| 67 | if (unset) { |
| 68 | new_trailers_clear(trailers); |
| 69 | return 0; |
| 70 | } |
| 71 | |
| 72 | if (!arg) |
| 73 | return -1; |
| 74 | |
| 75 | item = xmalloc(sizeof(*item)); |
| 76 | item->text = arg; |
| 77 | item->where = where; |
| 78 | item->if_exists = if_exists; |
| 79 | item->if_missing = if_missing; |
| 80 | list_add_tail(&item->list, trailers); |
| 81 | return 0; |
| 82 | } |
| 83 | |
| 84 | static int parse_opt_parse(const struct option *opt, const char *arg, |
| 85 | int unset) |
nothing calls this directly
no test coverage detected