| 152 | } |
| 153 | |
| 154 | static void add_chan(struct node *node, struct chan *chan) |
| 155 | { |
| 156 | if (!node_uses_chan_map(node)) { |
| 157 | for (size_t i = 0; i < NUM_IMMEDIATE_CHANS; i++) { |
| 158 | if (node->chans.arr[i] == NULL) { |
| 159 | node->chans.arr[i] = chan; |
| 160 | return; |
| 161 | } |
| 162 | } |
| 163 | convert_node_to_chan_map(node); |
| 164 | } |
| 165 | |
| 166 | chan_map_add(&node->chans.map, chan); |
| 167 | } |
| 168 | |
| 169 | static struct chan *next_chan_arr(const struct node *node, |
| 170 | struct chan_map_iter *i) |
no test coverage detected