From: Jeff Peeler Date: Mon, 27 Jul 2009 01:18:31 +0000 (+0000) Subject: Fix logic errors from 208746 X-Git-Tag: 1.4.26.2~4^2~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f622e06bbef6ae76d51dd23b5c84e5745cd51de3;p=thirdparty%2Fasterisk.git Fix logic errors from 208746 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208923 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index a7f008f2b6..0bdc40176f 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -3722,7 +3722,7 @@ static enum ast_bridge_result iax2_bridge(struct ast_channel *c0, struct ast_cha return AST_BRIDGE_FAILED; } /* Put them in native bridge mode */ - if ((!flags) & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1)) { + if (!(flags & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1))) { iaxs[callno0]->bridgecallno = callno1; iaxs[callno1]->bridgecallno = callno0; } diff --git a/main/translate.c b/main/translate.c index e801e0e448..5c92dee572 100644 --- a/main/translate.c +++ b/main/translate.c @@ -920,7 +920,7 @@ unsigned int ast_translate_available_formats(unsigned int dest, unsigned int src destination format. */ for (x = 1; src_audio && x < AST_FORMAT_MAX_AUDIO; x <<= 1) { /* if this is not a desired format, nothing to do */ - if ((!dest) & x) + if (!(dest & x)) continue; /* if the source is supplying this format, then @@ -946,7 +946,7 @@ unsigned int ast_translate_available_formats(unsigned int dest, unsigned int src destination format. */ for (; src_video && x < AST_FORMAT_MAX_VIDEO; x <<= 1) { /* if this is not a desired format, nothing to do */ - if ((!dest) & x) + if (!(dest & x)) continue; /* if the source is supplying this format, then