diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-10 17:17:09 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-10 17:17:09 +0100 |
commit | 6e31344466e2558a99cd46bb29abaa37e1faffc6 (patch) | |
tree | ae51cd2a56c252d6f0df6755b76719fe121e81e3 /src/libutil/util.c | |
parent | c4d3eb4af41a17cf28cb4fbb171d9b70d98259b5 (diff) | |
download | rspamd-6e31344466e2558a99cd46bb29abaa37e1faffc6.tar.gz rspamd-6e31344466e2558a99cd46bb29abaa37e1faffc6.zip |
[Minor] Fix compile warnings
Diffstat (limited to 'src/libutil/util.c')
-rw-r--r-- | src/libutil/util.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c index f528a321e..55696c212 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -786,7 +786,7 @@ rspamd_pass_signal (GHashTable * workers, gint signo) #ifndef HAVE_SETPROCTITLE #ifdef LINUX -static gchar *title_buffer = 0; +static gchar *title_buffer = NULL; static size_t title_buffer_size = 0; static gchar *title_progname, *title_progname_full; #endif @@ -1076,7 +1076,6 @@ setproctitle (const gchar *fmt, ...) ssize_t written; if (fmt) { - ssize_t written2; va_list ap; written = rspamd_snprintf (title_buffer, @@ -1087,13 +1086,11 @@ setproctitle (const gchar *fmt, ...) return -1; va_start (ap, fmt); - written2 = rspamd_vsnprintf (title_buffer + written, + rspamd_vsnprintf (title_buffer + written, title_buffer_size - written, fmt, ap); va_end (ap); - if (written2 < 0 || (size_t) written2 >= title_buffer_size - written) - return -1; } else { written = rspamd_snprintf (title_buffer, |