| 1975 | } |
| 1976 | |
| 1977 | struct route_hop *json_to_route(const tal_t *ctx, const char *buffer, |
| 1978 | const jsmntok_t *toks) |
| 1979 | { |
| 1980 | size_t num = toks->size, i; |
| 1981 | struct route_hop *hops; |
| 1982 | const jsmntok_t *rtok; |
| 1983 | if (toks->type != JSMN_ARRAY) |
| 1984 | return NULL; |
| 1985 | |
| 1986 | hops = tal_arr(ctx, struct route_hop, num); |
| 1987 | json_for_each_arr(i, rtok, toks) { |
| 1988 | if (!json_to_route_hop_inplace(&hops[i], buffer, rtok)) |
| 1989 | return tal_free(hops); |
| 1990 | } |
| 1991 | return hops; |
| 1992 | } |
| 1993 | |
| 1994 | struct command_result *WARN_UNUSED_RESULT |
| 1995 | command_hook_success(struct command *cmd) |
nothing calls this directly
no test coverage detected