From b38f664250531a541f3827e975087aa738e14e6c Mon Sep 17 00:00:00 2001 From: traud <pabstraud@compuserve.com> Date: Fri, 3 Apr 2020 19:25:37 +0200 Subject: [PATCH] chan_unistim: Avoid tautological warnings with clang. ASTERISK-28803 Change-Id: I15449621b68d0ad4d57b7c337c1167adb15135af --- channels/chan_unistim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index 0ed190b444..99cd2d11a9 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -1351,7 +1351,7 @@ static void refresh_all_favorite(struct unistimsession *pte) static int is_key_favorite(struct unistim_device *d, int fav) { - if ((fav < 0) && (fav > 5)) { + if ((fav < 0) || (fav >= FAVNUM)) { return 0; } if (d->sline[fav]) { @@ -1365,7 +1365,7 @@ static int is_key_favorite(struct unistim_device *d, int fav) static int is_key_line(struct unistim_device *d, int fav) { - if ((fav < 0) && (fav > 5)) { + if ((fav < 0) || (fav >= FAVNUM)) { return 0; } if (!d->sline[fav]) { -- GitLab