From: Richard Mudgett Date: Tue, 31 Mar 2015 16:47:42 +0000 (+0000) Subject: chan_sip: Fix expression in unit test /channels/chan_sip/test_sip_rtpqos. X-Git-Tag: 11.18.0-rc1~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e159080c45916ee55ab379905b6fcfbef40b344e;p=thirdparty%2Fasterisk.git chan_sip: Fix expression in unit test /channels/chan_sip/test_sip_rtpqos. Fix misplaced parentheses in original fabs() expression. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@433816 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/sip/dialplan_functions.c b/channels/sip/dialplan_functions.c index 4f6ece6ca4..f0bcfea6d1 100644 --- a/channels/sip/dialplan_functions.c +++ b/channels/sip/dialplan_functions.c @@ -384,7 +384,7 @@ AST_TEST_DEFINE(test_sip_rtpqos_1) for (j = 1.0; j < 10.0; j += 0.3) { *lookup[i].d8 = j; ast_str_substitute_variables(&buffer, 0, chan, ast_str_buffer(varstr)); - if (sscanf(ast_str_buffer(buffer), "%lf", &cmpdbl) != 1 || abs(j - cmpdbl > .05)) { + if (sscanf(ast_str_buffer(buffer), "%lf", &cmpdbl) != 1 || fabs(j - cmpdbl) > .05) { res = AST_TEST_FAIL; ast_test_status_update(test, "%s != %f != %s\n", ast_str_buffer(varstr), j, ast_str_buffer(buffer)); break;