From: Jaroslav Kysela Date: Thu, 28 May 2026 10:04:46 +0000 (+0200) Subject: error: use SND_LOG_LAST/SND_ILOG_LAST in log priority/interface bounds checks X-Git-Tag: v1.2.16~3 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=d2499b16c624ab48ab33c6c49547ca0d62a8041a;p=alsa-lib.git error: use SND_LOG_LAST/SND_ILOG_LAST in log priority/interface bounds checks Signed-off-by: Jaroslav Kysela --- diff --git a/src/error.c b/src/error.c index ad874202..e721bdc0 100644 --- a/src/error.c +++ b/src/error.c @@ -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; }