This check in ibpi2str_table() function is probably not needed:
if (!ret) { snprintf(buf, buf_size, "(unknown: %u)", ibpi); ret = buf; }
It is only checked to put "unknown" word, but now it may be dead and the "UNKNOWN" state will be returned. To be safe we can replace this code with assertion.
This check in ibpi2str_table() function is probably not needed:
if (!ret) { snprintf(buf, buf_size, "(unknown: %u)", ibpi); ret = buf; }
It is only checked to put "unknown" word, but now it may be dead and the "UNKNOWN" state will be returned. To be safe we can replace this code with assertion.