[Asterisk-code-review] chan_unistim: Avoid tautological warnings with clang. (asterisk[17])
Friendly Automation
asteriskteam at digium.com
Tue Apr 7 18:15:00 CDT 2020
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14108 )
Change subject: chan_unistim: Avoid tautological warnings with clang.
......................................................................
chan_unistim: Avoid tautological warnings with clang.
ASTERISK-28803
Change-Id: I15449621b68d0ad4d57b7c337c1167adb15135af
---
M channels/chan_unistim.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
George Joseph: Looks good to me, but someone else must approve
Friendly Automation: Approved for Submit
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index 0ed190b..99cd2d1 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -1351,7 +1351,7 @@
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_line(struct unistim_device *d, int fav)
{
- if ((fav < 0) && (fav > 5)) {
+ if ((fav < 0) || (fav >= FAVNUM)) {
return 0;
}
if (!d->sline[fav]) {
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14108
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 17
Gerrit-Change-Id: I15449621b68d0ad4d57b7c337c1167adb15135af
Gerrit-Change-Number: 14108
Gerrit-PatchSet: 3
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200407/99972290/attachment-0001.html>
More information about the asterisk-code-review
mailing list