aboutsummaryrefslogtreecommitdiffstats
path: root/src/statfile.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-08 20:07:07 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-08 20:07:07 +0400
commit3d1c40c972d68623f88875ec03ae7c8bafbadad5 (patch)
tree75a34069f368ebb52b47e8c3f605dcde1de3e9cd /src/statfile.c
parent75bf13b9bda0d1eb98671b68064becd4f6946c14 (diff)
downloadrspamd-3d1c40c972d68623f88875ec03ae7c8bafbadad5.tar.gz
rspamd-3d1c40c972d68623f88875ec03ae7c8bafbadad5.zip
* Make DNS resolver working
* Many improvements to rspamd test suite: now it CAN be used for testing rspamd functionality * Write DNS resolver tests * Fix issues with memory_pool mutexes and with creating of statfiles
Diffstat (limited to 'src/statfile.c')
-rw-r--r--src/statfile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/statfile.c b/src/statfile.c
index 08b271065..662a70e74 100644
--- a/src/statfile.c
+++ b/src/statfile.c
@@ -130,7 +130,7 @@ statfile_pool_check (stat_file_t * file)
}
if (file->len < sizeof (struct stat_file)) {
- msg_info ("file %s is too short to be stat file: %zd", file->filename, file->len);
+ msg_info ("file %s is too short to be stat file: %z", file->filename, file->len);
return -1;
}
@@ -304,14 +304,14 @@ statfile_pool_open (statfile_pool_t * pool, char *filename, size_t size, gboolea
}
if (!forced && st.st_size > pool->max) {
- msg_info ("cannot attach file to pool, too large: %zd", (size_t) st.st_size);
+ msg_info ("cannot attach file to pool, too large: %z", (size_t) st.st_size);
return NULL;
}
memory_pool_lock_mutex (pool->lock);
if (!forced && abs (st.st_size - size) > sizeof (struct stat_file)) {
memory_pool_unlock_mutex (pool->lock);
- msg_warn ("need to reindex statfile old size: %zd, new size: %zd", st.st_size, size);
+ msg_warn ("need to reindex statfile old size: %z, new size: %z", st.st_size, size);
return statfile_pool_reindex (pool, filename, st.st_size, size);
}
memory_pool_unlock_mutex (pool->lock);
@@ -454,7 +454,7 @@ statfile_pool_create (statfile_pool_t * pool, char *filename, size_t size)
/* Buffer for write 256 blocks at once */
if (nblocks > 256) {
- buflen = MIN (nblocks / 256 * sizeof (block), sizeof (block) * 256);
+ buflen = sizeof (block) * 256;
buf = g_malloc0 (buflen);
}