aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-23 04:32:15 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-23 04:32:15 +0000
commit93c311127bd2a5d6fa986e209e570f1cd217f8d5 (patch)
tree90c958c3236bf2d27da5654b5b17499fd1e7c6f8 /main/channel.c
parent835a0318ee5d0c2393d6a3483c58e381824d9203 (diff)
Merged revisions 166509 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r166509 | tilghman | 2008-12-22 22:05:25 -0600 (Mon, 22 Dec 2008) | 4 lines Use the integer form of condition for integer comparisons. (closes issue #14127) Reported by: andrew ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@166533 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index ea1305411..78c1caf60 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2923,7 +2923,10 @@ int ast_indicate_data(struct ast_channel *chan, int _condition,
/* The channel driver does not support this indication, let's fake
* it by doing our own tone generation if applicable. */
- if (condition < 0) {
+ /*!\note If we compare the enumeration type, which does not have any
+ * negative constants, the compiler may optimize this code away.
+ * Therefore, we must perform an integer comparison here. */
+ if (_condition < 0) {
/* Stop any tones that are playing */
ast_playtones_stop(chan);
return 0;