]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_unistim: Avoid tautological warnings with clang.
authortraud <pabstraud@compuserve.com>
Fri, 3 Apr 2020 17:25:37 +0000 (19:25 +0200)
committerJoshua Colp <jcolp@sangoma.com>
Wed, 8 Apr 2020 13:32:34 +0000 (08:32 -0500)
ASTERISK-28803

Change-Id: I15449621b68d0ad4d57b7c337c1167adb15135af

channels/chan_unistim.c

index 3b70cf9643afd6ae61b56beaf9fffd7fd2996fff..a08769e62562596052b72af62018c1cc2f9fccac 100644 (file)
@@ -1353,7 +1353,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]) {
@@ -1367,7 +1367,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]) {