aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/logger
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-25 12:19:39 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-25 12:19:39 +0100
commit85b5b1b4c50376a67be0a9adc03f04598626ec01 (patch)
tree6641a2d6e7eaa353fa3f236675dff801e30f4ad7 /src/libserver/logger
parent7721a1a19baa139b460ec6126987a4943b4facb6 (diff)
downloadrspamd-85b5b1b4c50376a67be0a9adc03f04598626ec01.tar.gz
rspamd-85b5b1b4c50376a67be0a9adc03f04598626ec01.zip
[Minor] Remove unreachable code
Diffstat (limited to 'src/libserver/logger')
-rw-r--r--src/libserver/logger/logger.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/libserver/logger/logger.c b/src/libserver/logger/logger.c
index 07625bb91..4fdfd3cba 100644
--- a/src/libserver/logger/logger.c
+++ b/src/libserver/logger/logger.c
@@ -449,18 +449,6 @@ rspamd_common_logv (rspamd_logger_t *rspamd_log, gint level_flags,
/* Just fprintf message to stderr */
if (level >= G_LOG_LEVEL_INFO) {
end = rspamd_vsnprintf (logbuf, sizeof (logbuf), fmt, args);
-
- if (!(rspamd_log->flags & RSPAMD_LOG_FLAG_RSPAMADM)) {
- if ((nescaped = rspamd_log_line_need_escape (logbuf, end - logbuf)) != 0) {
- gsize unsecaped_len = end - logbuf;
- gchar *logbuf_escaped = g_alloca (unsecaped_len + nescaped * 4);
- log_line = logbuf_escaped;
-
- end = rspamd_log_line_hex_escape (logbuf, unsecaped_len,
- logbuf_escaped, unsecaped_len + nescaped * 4);
- }
- }
-
rspamd_fprintf (stderr, "%*s\n", (gint)(end - log_line),
log_line);
}
@@ -859,13 +847,13 @@ RSPAMD_DESTRUCTOR (rspamd_debug_modules_dtor)
}
}
-guint
+gint
rspamd_logger_add_debug_module (const gchar *mname)
{
struct rspamd_log_module *m;
if (mname == NULL) {
- return (guint)-1;
+ return -1;
}
if (log_modules == NULL) {