From: Vsevolod Stakhov Date: Tue, 23 Jun 2015 13:55:40 +0000 (+0100) Subject: Fix abs/fabs misuse. X-Git-Tag: 0.9.7~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb44d4ceaebe2dbc8f037d249d26501359199ac5;p=thirdparty%2Frspamd.git Fix abs/fabs misuse. --- diff --git a/src/libserver/symbols_cache.c b/src/libserver/symbols_cache.c index fec045e190..f8944d86b2 100644 --- a/src/libserver/symbols_cache.c +++ b/src/libserver/symbols_cache.c @@ -71,14 +71,14 @@ cache_logic_cmp (const void *p1, const void *p2) weight2 = i2->metric_weight == 0 ? i2->s->weight : i2->metric_weight; t1 = i1->s->avg_time / 1000000.0; t2 = i2->s->avg_time / 1000000.0; - w1 = SCORE_FUN (abs (weight1), f1, t1); - w2 = SCORE_FUN (abs (weight2), f2, t2); + w1 = SCORE_FUN (fabs (weight1), f1, t1); + w2 = SCORE_FUN (fabs (weight2), f2, t2); msg_debug ("%s -> %.2f, %s -> %.2f", i1->s->symbol, w1, i2->s->symbol, w2); } else { /* Strict sorting */ - w1 = abs (i1->priority); - w2 = abs (i2->priority); + w1 = fabs (i1->priority); + w2 = fabs (i2->priority); } return (gint)w2 - w1;