intel / ledmon

Enclosure LED Utilities
GNU General Public License v2.0
73 stars 47 forks source link

Remove not needed check in ibpi2str function #198

Closed ktanska closed 5 months ago

ktanska commented 9 months ago

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.