| 2635 | } |
| 2636 | |
| 2637 | struct route_hop *json_to_route(const tal_t *ctx, const char *buffer, |
| 2638 | const jsmntok_t *toks) |
| 2639 | { |
| 2640 | size_t num = toks->size, i; |
| 2641 | struct route_hop *hops; |
| 2642 | const jsmntok_t *rtok; |
| 2643 | if (toks->type != JSMN_ARRAY) |
| 2644 | return NULL; |
| 2645 | |
| 2646 | hops = tal_arr(ctx, struct route_hop, num); |
| 2647 | json_for_each_arr(i, rtok, toks) { |
| 2648 | if (!json_to_route_hop_inplace(&hops[i], buffer, rtok)) |
| 2649 | return tal_free(hops); |
| 2650 | } |
| 2651 | return hops; |
| 2652 | } |
| 2653 | |
| 2654 | struct command_result *WARN_UNUSED_RESULT |
| 2655 | command_hook_success(struct command *cmd) |
nothing calls this directly
no test coverage detected