chan_sip: Fix expression in unit test /channels/chan_sip/test_sip_rtpqos.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 31 Mar 2015 17:04:18 +0000 (17:04 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 31 Mar 2015 17:04:18 +0000 (17:04 +0000)
Fix misplaced parentheses in original fabs() expression.
........

Merged revisions 433816 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 433817 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433818 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/sip/dialplan_functions.c

index 1793ee6..ee34249 100644 (file)
@@ -386,7 +386,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;