error: use SND_LOG_LAST/SND_ILOG_LAST in log priority/interface bounds checks

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2026-05-28 12:04:46 +02:00
parent 3c060c978a
commit d2499b16c6

View file

@ -124,7 +124,7 @@ static const char *snd_ilog_interface_names[SND_ILOG_LAST + 1] = {
*/
const char *snd_lib_log_priority(int prio)
{
if (prio >= 0 && prio <= SND_LOG_TRACE)
if (prio >= 0 && prio <= SND_LOG_LAST)
return snd_log_prio_names[prio];
return NULL;
}
@ -136,7 +136,7 @@ const char *snd_lib_log_priority(int prio)
*/
const char *snd_lib_log_interface(int interface)
{
if (interface >= 0 && interface <= SND_ILOG_TOPOLOGY)
if (interface >= 0 && interface <= SND_ILOG_LAST)
return snd_ilog_interface_names[interface];
return NULL;
}