| 78 | } |
| 79 | |
| 80 | static void destroy_commando(struct commando *commando, struct commando ***arr) |
| 81 | { |
| 82 | for (size_t i = 0; i < tal_count(*arr); i++) { |
| 83 | if ((*arr)[i] == commando) { |
| 84 | tal_arr_remove(arr, i); |
| 85 | return; |
| 86 | } |
| 87 | } |
| 88 | abort(); |
| 89 | } |
| 90 | |
| 91 | /* Append to commando->contents: set to NULL if we've over max. */ |
| 92 | static void append_contents(struct commando *commando, const u8 *msg, size_t msglen, |