| 612 | }; |
| 613 | |
| 614 | static char *opt_set_commando(const char *arg, struct commando **commando) |
| 615 | { |
| 616 | size_t idlen = strcspn(arg, ":"); |
| 617 | *commando = tal(NULL, struct commando); |
| 618 | |
| 619 | /* We don't use common/node_id.c here, to keep dependencies minimal */ |
| 620 | if (idlen != PUBKEY_CMPR_LEN * 2) |
| 621 | return "Invalid peer id"; |
| 622 | (*commando)->peer_id = tal_strndup(*commando, arg, idlen); |
| 623 | |
| 624 | if (arg[idlen] == '\0') |
| 625 | (*commando)->rune = NULL; |
| 626 | else |
| 627 | (*commando)->rune = tal_strdup(*commando, arg + idlen + 1); |
| 628 | |
| 629 | return NULL; |
| 630 | } |
| 631 | |
| 632 | int main(int argc, char *argv[]) |
| 633 | { |
nothing calls this directly
no outgoing calls
no test coverage detected