From d2499b16c624ab48ab33c6c49547ca0d62a8041a Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 28 May 2026 12:04:46 +0200 Subject: [PATCH] error: use SND_LOG_LAST/SND_ILOG_LAST in log priority/interface bounds checks Signed-off-by: Jaroslav Kysela --- src/error.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.52.0