Different from sub_done(), sub_channel_controller returns NULL for invalid accesses and never crashes.
| 416 | // Different from sub_done(), sub_channel_controller returns NULL for |
| 417 | // invalid accesses and never crashes. |
| 418 | const Controller* sub_channel_controller(int i) const { |
| 419 | if (i >= 0 && i < _nchan) { |
| 420 | if (_nchan == _ndone) { |
| 421 | return &sub_done(i)->cntl; |
| 422 | } |
| 423 | const int offset = sub_done_map(i); |
| 424 | if (offset >= 0) { |
| 425 | return &sub_done(offset)->cntl; |
| 426 | } |
| 427 | } |
| 428 | return NULL; |
| 429 | } |
| 430 | |
| 431 | private: |
| 432 | int _fail_limit; |
no outgoing calls
no test coverage detected