aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-23 17:44:04 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-23 17:44:04 +0000
commit71d52e806a4780d95eb0322544330e31a7a375d9 (patch)
tree15709221c847de6b85ebbb3ad020a29441b1cbfb /src/libmime
parent11021601e04634213a31df0c16aa4d1c064201ac (diff)
downloadrspamd-71d52e806a4780d95eb0322544330e31a7a375d9.tar.gz
rspamd-71d52e806a4780d95eb0322544330e31a7a375d9.zip
[Minor] Fix various style issues
Diffstat (limited to 'src/libmime')
-rw-r--r--src/libmime/archives.c1
-rw-r--r--src/libmime/email_addr.c1
-rw-r--r--src/libmime/filter.c1
-rw-r--r--src/libmime/message.c7
-rw-r--r--src/libmime/mime_expressions.c3
-rw-r--r--src/libmime/mime_headers.c4
-rw-r--r--src/libmime/mime_parser.c8
7 files changed, 4 insertions, 21 deletions
diff --git a/src/libmime/archives.c b/src/libmime/archives.c
index d714335fd..2123e1131 100644
--- a/src/libmime/archives.c
+++ b/src/libmime/archives.c
@@ -18,7 +18,6 @@
#include "message.h"
#include "task.h"
#include "archives.h"
-#include "fstring.h"
static void
rspamd_archive_dtor (gpointer p)
diff --git a/src/libmime/email_addr.c b/src/libmime/email_addr.c
index d534be53f..c857794c8 100644
--- a/src/libmime/email_addr.c
+++ b/src/libmime/email_addr.c
@@ -19,7 +19,6 @@
#include "message.h"
#include "printf.h"
#include "smtp_parsers.h"
-#include "mime_headers.h"
static void
rspamd_email_addr_dtor (struct rspamd_email_address *addr)
diff --git a/src/libmime/filter.c b/src/libmime/filter.c
index c2eeecc32..c95dfc585 100644
--- a/src/libmime/filter.c
+++ b/src/libmime/filter.c
@@ -19,7 +19,6 @@
#include "rspamd.h"
#include "message.h"
#include "lua/lua_common.h"
-#include "cryptobox.h"
#include <math.h>
#include "contrib/uthash/utlist.h"
diff --git a/src/libmime/message.c b/src/libmime/message.c
index c429892aa..d445362b2 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -17,15 +17,10 @@
#include "util.h"
#include "rspamd.h"
#include "message.h"
-#include "cfg_file.h"
-#include "libutil/regexp.h"
#include "html.h"
#include "images.h"
#include "archives.h"
-#include "email_addr.h"
-#include "utlist.h"
#include "tokenizers/tokenizers.h"
-#include "cryptobox.h"
#include "smtp_parsers.h"
#include "mime_parser.h"
#include "mime_encoding.h"
@@ -34,8 +29,6 @@
#include "libstemmer.h"
#endif
-#include <iconv.h>
-
#define GTUBE_SYMBOL "GTUBE"
#define SET_PART_RAW(part) ((part)->flags &= ~RSPAMD_MIME_TEXT_PART_FLAG_UTF)
diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c
index 71b8d4bdc..0c036a89c 100644
--- a/src/libmime/mime_expressions.c
+++ b/src/libmime/mime_expressions.c
@@ -20,7 +20,6 @@
#include "message.h"
#include "mime_expressions.h"
#include "html.h"
-#include "email_addr.h"
#include "lua/lua_common.h"
#include "utlist.h"
@@ -1172,7 +1171,7 @@ rspamd_recipients_distance (struct rspamd_task *task, GArray * args,
}
}
- if ((double)(hits * num / 2.) / (double)total >= threshold) {
+ if ((hits * num / 2.) / (double)total >= threshold) {
return TRUE;
}
diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c
index 75ec1b96d..2ea4c0dcb 100644
--- a/src/libmime/mime_headers.c
+++ b/src/libmime/mime_headers.c
@@ -17,10 +17,6 @@
#include "mime_headers.h"
#include "smtp_parsers.h"
#include "mime_encoding.h"
-#include "email_addr.h"
-#include "task.h"
-#include "cryptobox.h"
-#include "contrib/libottery/ottery.h"
static void
rspamd_mime_header_check_special (struct rspamd_task *task,
diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c
index 98eef6d98..f36b4848b 100644
--- a/src/libmime/mime_parser.c
+++ b/src/libmime/mime_parser.c
@@ -19,9 +19,7 @@
#include "mime_parser.h"
#include "mime_headers.h"
#include "message.h"
-#include "content_type.h"
#include "multipattern.h"
-#include "cryptobox.h"
#include "contrib/libottery/ottery.h"
struct rspamd_mime_parser_lib_ctx {
@@ -1009,7 +1007,7 @@ rspamd_mime_parse_message (struct rspamd_task *task,
if (hdr_pos > 0 && hdr_pos < str.len) {
- task->raw_headers_content.begin = (gchar *) (str.str);
+ task->raw_headers_content.begin = str.str;
task->raw_headers_content.len = hdr_pos;
task->raw_headers_content.body_start = str.str + body_pos;
@@ -1029,7 +1027,7 @@ rspamd_mime_parse_message (struct rspamd_task *task,
hdr_pos = rspamd_mime_parser_headers_heuristic (&str, &body_pos);
if (hdr_pos > 0 && hdr_pos <= str.len) {
- task->raw_headers_content.begin = (gchar *) (str.str);
+ task->raw_headers_content.begin = str.str;
task->raw_headers_content.len = hdr_pos;
task->raw_headers_content.body_start = str.str + body_pos;
@@ -1063,7 +1061,7 @@ rspamd_mime_parse_message (struct rspamd_task *task,
rspamd_strcase_equal, NULL, rspamd_ptr_array_free_hard);
if (hdr_pos > 0 && hdr_pos < str.len) {
- npart->raw_headers_str = (gchar *) (str.str);
+ npart->raw_headers_str = str.str;
npart->raw_headers_len = hdr_pos;
npart->raw_data.begin = str.str + body_pos;