diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-23 04:33:37 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-23 04:33:37 +0000 |
commit | f7ea34b378cecd3d5db639d500b4f4d8daab5730 (patch) | |
tree | 963b68d25c66f4983955107d70557c44495b2c1f /main/channel.c | |
parent | 9b4a8662902577bd8e9519105e415d3515fc81f8 (diff) |
Merged revisions 166533 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r166533 | tilghman | 2008-12-22 22:32:15 -0600 (Mon, 22 Dec 2008) | 11 lines
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/branches/1.6.0@166534 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c index 464c9faf1..b66c875b5 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2921,7 +2921,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; |