mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-05-30 21:38:11 -04:00
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:
parent
3c060c978a
commit
d2499b16c6
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue