summaryrefslogtreecommitdiff
path: root/channels/sip
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2015-03-30 02:45:29 +0000
committerMatthew Jordan <mjordan@digium.com>2015-03-30 02:45:29 +0000
commit7bc2345fb16fb0ae616d4573cef6f08db54a2ba3 (patch)
treee53f2520ece32972d9d09f5746b9f6b495df3a8f /channels/sip
parentce59fabd5c01a48b8f4fcd1d7522aef9f3fbe66d (diff)
clang compiler warnings: Fix -Wabsolute-value warnings
This patch fixes several warnings caught by clang - in this case, usage of the abs function on non-integer values. This patch uses labs and fabs, as appropriate, in the various affected files. Review: https://reviewboard.asterisk.org/r/4525 ASTERISK-24917 Reported by: dkdegroot patches: rb4525.patch submitted by dkdegroot (License 6600) ........ Merged revisions 433749 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 433750 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sip')
-rw-r--r--channels/sip/dialplan_functions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/sip/dialplan_functions.c b/channels/sip/dialplan_functions.c
index 03441aa72..1793ee61a 100644
--- a/channels/sip/dialplan_functions.c
+++ b/channels/sip/dialplan_functions.c
@@ -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 || fabs(j - cmpdbl > .05)) {
+ if (sscanf(ast_str_buffer(buffer), "%lf", &cmpdbl) != 1 || abs(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;