| 51 | } |
| 52 | |
| 53 | static struct command_result *make_callback(struct command *cmd, |
| 54 | struct param *def, |
| 55 | const char *buffer, |
| 56 | const jsmntok_t *tok) |
| 57 | { |
| 58 | /* If it had a default, free that now to avoid leak */ |
| 59 | if (def->style == PARAM_OPTIONAL_WITH_DEFAULT && !def->is_set) |
| 60 | tal_free(*(void **)def->arg); |
| 61 | |
| 62 | def->is_set = true; |
| 63 | |
| 64 | return def->cbx(cmd, def->name, buffer, tok, def->arg); |
| 65 | } |
| 66 | |
| 67 | static struct command_result *post_check(struct command *cmd, |
| 68 | struct param *params) |
no test coverage detected