diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-22 17:39:46 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-22 17:39:46 +0000 |
commit | a93fbccaea8bcec71180add91cf9957dda2a1954 (patch) | |
tree | 7cbff1e474bf41d03def8536340d1610bad97bf2 /src/libstat | |
parent | 89956e513656feed88e7bbb05348dcea3fc1d615 (diff) | |
download | rspamd-a93fbccaea8bcec71180add91cf9957dda2a1954.tar.gz rspamd-a93fbccaea8bcec71180add91cf9957dda2a1954.zip |
[Fix] Fix various warnings and issues
Diffstat (limited to 'src/libstat')
-rw-r--r-- | src/libstat/backends/mmaped_file.c | 6 | ||||
-rw-r--r-- | src/libstat/stat_process.c | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/libstat/backends/mmaped_file.c b/src/libstat/backends/mmaped_file.c index 582818f27..50a635432 100644 --- a/src/libstat/backends/mmaped_file.c +++ b/src/libstat/backends/mmaped_file.c @@ -564,10 +564,6 @@ rspamd_mmaped_file_open (rspamd_mempool_t *pool, { struct stat st; rspamd_mmaped_file_t *new_file; - struct timespec sleep_ts = { - .tv_sec = 0, - .tv_nsec = 1000000 - }; gchar *lock; gint lock_fd; @@ -576,7 +572,7 @@ rspamd_mmaped_file_open (rspamd_mempool_t *pool, if (lock_fd == -1) { msg_info_pool ("cannot open file %s, it is locked by another process", - filename, strerror (errno), errno); + filename); return NULL; } diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c index 6bd1c4e2a..09f7b8a36 100644 --- a/src/libstat/stat_process.c +++ b/src/libstat/stat_process.c @@ -135,7 +135,7 @@ rspamd_stat_tokenize_parts_metadata (struct rspamd_stat_ctx *st_ctx, if (part->content && part->content->len > 1) { rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "mime%d:%dlog", - (gint)log2 (part->content->len)); + i, (gint)log2 (part->content->len)); elt.begin = rspamd_mempool_strdup (task->task_pool, tmpbuf); elt.len = strlen (elt.begin); g_array_append_val (ar, elt); |