From f3585bb8b0ecc2dc710c9958484748afad38fec6 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 11 Nov 2015 18:00:43 +0000 Subject: Fix format issues found by static analysis --- src/libmime/images.c | 8 ++++---- src/libmime/mime_expressions.c | 2 +- src/libmime/smtp_utils.c | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src/libmime') diff --git a/src/libmime/images.c b/src/libmime/images.c index f55e47d7a..1fdb38151 100644 --- a/src/libmime/images.c +++ b/src/libmime/images.c @@ -90,7 +90,7 @@ process_png_image (struct rspamd_task *task, GByteArray *data) guint8 *p; if (data->len < 24) { - msg_info_task ("bad png detected (maybe striped): <%s>", task->message_id); + msg_info_task ("bad png detected (maybe striped)"); return NULL; } @@ -98,7 +98,7 @@ process_png_image (struct rspamd_task *task, GByteArray *data) /* Skip signature and read header section */ p = data->data + 12; if (memcmp (p, "IHDR", 4) != 0) { - msg_info_task ("png doesn't begins with IHDR section", task->message_id); + msg_info_task ("png doesn't begins with IHDR section"); return NULL; } @@ -154,7 +154,7 @@ process_gif_image (struct rspamd_task *task, GByteArray *data) guint16 t; if (data->len < 10) { - msg_info_task ("bad gif detected (maybe striped): <%s>", task->message_id); + msg_info_task ("bad gif detected (maybe striped)"); return NULL; } @@ -179,7 +179,7 @@ process_bmp_image (struct rspamd_task *task, GByteArray *data) guint8 *p; if (data->len < 28) { - msg_info_task ("bad bmp detected (maybe striped): <%s>", task->message_id); + msg_info_task ("bad bmp detected (maybe striped)"); return NULL; } diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c index d5b38437d..89def6af7 100644 --- a/src/libmime/mime_expressions.c +++ b/src/libmime/mime_expressions.c @@ -778,7 +778,7 @@ tree_url_callback (gpointer key, gpointer value, void *data) if (G_UNLIKELY (param->re->is_test)) { msg_info_task ("process test regexp %s for url %s returned FALSE", - struri (url)); + param->re->regexp_text, struri (url)); } } diff --git a/src/libmime/smtp_utils.c b/src/libmime/smtp_utils.c index 32b23bfd7..0f8a84cc2 100644 --- a/src/libmime/smtp_utils.c +++ b/src/libmime/smtp_utils.c @@ -225,9 +225,8 @@ make_smtp_tempfile (struct smtp_session *session) session->temp_name = rspamd_mempool_alloc (session->pool, r); rspamd_snprintf (session->temp_name, r, - "%s%crspamd-XXXXXX", - session->cfg->temp_dir, - G_DIR_SEPARATOR); + "%s/rspamd-XXXXXX", + session->cfg->temp_dir); #ifdef HAVE_MKSTEMP /* Umask is set before */ session->temp_fd = mkstemp (session->temp_name); -- cgit v1.2.3