[svn-commits] tilghman: trunk r166533 - in /trunk: ./ main/channel.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Dec 22 22:32:16 CST 2008


Author: tilghman
Date: Mon Dec 22 22:32:15 2008
New Revision: 166533

URL: http://svn.digium.com/view/asterisk?view=rev&rev=166533
Log:
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
........

Modified:
    trunk/   (props changed)
    trunk/main/channel.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=166533&r1=166532&r2=166533
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Mon Dec 22 22:32:15 2008
@@ -2923,7 +2923,10 @@
 	/* 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;




More information about the svn-commits mailing list