aboutsummaryrefslogtreecommitdiffstats
path: root/src/cfg_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-10-11 18:39:56 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-10-11 18:39:56 +0400
commitdbee2f63ee747b5d4247038f27566bc5aebfe3b7 (patch)
treec2d60701691ab106e593be24a6974ab7dc0e6fa1 /src/cfg_utils.c
parentb0ce5fefb9e694083846af1e45b09f4baa4b0446 (diff)
downloadrspamd-dbee2f63ee747b5d4247038f27566bc5aebfe3b7.tar.gz
rspamd-dbee2f63ee747b5d4247038f27566bc5aebfe3b7.zip
Fixes bugs found with clang-static analyser.
Strictly follow c99 standart. Turn on pedantic c99 checks.
Diffstat (limited to 'src/cfg_utils.c')
-rw-r--r--src/cfg_utils.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/cfg_utils.c b/src/cfg_utils.c
index 7e8bb3abc..27af7911a 100644
--- a/src/cfg_utils.c
+++ b/src/cfg_utils.c
@@ -718,21 +718,17 @@ internal_normalizer_func (struct config_file *cfg, long double score, void *data
long double max = *(double *)data;
if (score < 0) {
- return score;
+ return score;
}
- else {
#ifdef HAVE_TANHL
- return max * tanhl (score / max);
+ return max * tanhl (score / max);
#else
- /*
- * As some implementations of libm does not support tanhl, try to use
- * tanh
- */
- return max * tanh ((double) (score / max));
+ /*
+ * As some implementations of libm does not support tanhl, try to use
+ * tanh
+ */
+ return max * tanh ((double) (score / max));
#endif
- }
-
- return score;
}
static gboolean