From 2deb898bcd19022999bb1ff79da177bed7d1b58d Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Mon, 14 May 2012 19:57:42 +0000 Subject: [PATCH] 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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366409 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- pbx/dundi-parser.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c index 418a28c583..5a236a0a3c 100644 --- a/pbx/dundi-parser.c +++ b/pbx/dundi-parser.c @@ -454,15 +454,7 @@ void dundi_showframe(struct dundi_hdr *fhi, int rx, struct sockaddr_in *sin, int 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; -- 2.47.2