| 251 | } |
| 252 | |
| 253 | static void apply_item_command(struct trailer_item *in_tok, struct arg_item *arg_tok) |
| 254 | { |
| 255 | if (arg_tok->conf.command || arg_tok->conf.cmd) { |
| 256 | char *value_to_free = NULL; |
| 257 | char *arg; |
| 258 | |
| 259 | if (arg_tok->value && arg_tok->value[0]) { |
| 260 | arg = arg_tok->value; |
| 261 | } else { |
| 262 | if (in_tok && in_tok->value) |
| 263 | arg = xstrdup(in_tok->value); |
| 264 | else |
| 265 | arg = xstrdup(""); |
| 266 | value_to_free = arg_tok->value; |
| 267 | } |
| 268 | |
| 269 | arg_tok->value = apply_command(&arg_tok->conf, arg); |
| 270 | |
| 271 | free(value_to_free); |
| 272 | free(arg); |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | static void apply_arg_if_exists(struct trailer_item *in_tok, |
| 277 | struct arg_item *arg_tok, |
no test coverage detected