Hi Michal, Thank you very much for the review.
I just had a small clarification regarding the following comment: >> + > + /* Allow index to be NULL */ > + index = index ? index : &_index; >If index argument is NULL, why bother setting this internal variable _index? This assignment is intended to support `index` as an optional output parameter: callers can pass NULL if they only care about the return value. This approach avoids repeated `if (index)` checks by aliasing to a local dummy variable upfront. Would you be happy for me to retain this pattern, renaming the dummy variable to make it clearer, e.g.: ``` uint8_t dummy_index; index = index ? index : &dummy_index; ``` I would also update the documentation to clarify that index is optional. Alternatively, if you’d prefer to disallow NULL for index and require the caller to always provide a valid pointer, I’m happy to change it accordingly. Many thanks, Hari