[asterisk-commits] mmichelson: branch 1.8 r366409 - /branches/1.8/pbx/dundi-parser.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 14 14:57:51 CDT 2012


Author: mmichelson
Date: Mon May 14 14:57:42 2012
New Revision: 366409

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=366409
Log:
Fix two more coverity constant expression result findings.

These correspond to findings 0 and 1 in the core findings of
ASTERISK-19649.

After contacting Mark Spencer, he was unsure of what the intent
behind these lines of code were, so they are being axed.

For Asterisk 1.8 and 10, the output of debugging DUNDi frames
will not be changed, but for trunk the "Retry" portion will
be omitted since it does not properly distinguish retransmissions
from initial frames.

(closes issue ASTERISK-19649)
Reported by Matthew Jordan


Modified:
    branches/1.8/pbx/dundi-parser.c

Modified: branches/1.8/pbx/dundi-parser.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/pbx/dundi-parser.c?view=diff&rev=366409&r1=366408&r2=366409
==============================================================================
--- branches/1.8/pbx/dundi-parser.c (original)
+++ branches/1.8/pbx/dundi-parser.c Mon May 14 14:57:42 2012
@@ -454,15 +454,7 @@
 	char subclass2[20];
 	char *subclass;
 	char tmp[256];
-	char retries[20];
-	if (ntohs(fhi->dtrans) & DUNDI_FLAG_RETRANS)
-		strcpy(retries, "Yes");
-	else
-		strcpy(retries, "No");
-	if ((ntohs(fhi->strans) & DUNDI_FLAG_RESERVED)) {
-		/* Ignore frames with high bit set to 1 */
-		return;
-	}
+	const char *retries = "Yes";
 	if ((fhi->cmdresp & 0x3f) > (int)sizeof(commands)/(int)sizeof(char *)) {
 		snprintf(class2, (int)sizeof(class2), "(%d?)", fhi->cmdresp);
 		class = class2;




More information about the asterisk-commits mailing list