summaryrefslogtreecommitdiffstats
path: root/src/statfile_sync.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-08-04 20:31:24 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-08-04 20:31:24 +0400
commit3f96e6a7a317e70b85b32de4aa06681c11d79006 (patch)
tree70343e3fb1a43d29d9c4f454fa47b2dcad6249ad /src/statfile_sync.c
parent6b86782ce21caad081d41f54ef10233a8e757189 (diff)
downloadrspamd-3f96e6a7a317e70b85b32de4aa06681c11d79006.tar.gz
rspamd-3f96e6a7a317e70b85b32de4aa06681c11d79006.zip
Fix signness in arithmetic operations.
Diffstat (limited to 'src/statfile_sync.c')
-rw-r--r--src/statfile_sync.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/statfile_sync.c b/src/statfile_sync.c
index 44e34454b..e96555c15 100644
--- a/src/statfile_sync.c
+++ b/src/statfile_sync.c
@@ -83,7 +83,7 @@ log_next_sync (const gchar *symbol, time_t delay)
static gboolean
parse_revision_line (struct rspamd_sync_ctx *ctx, f_str_t *in)
{
- gint i, state = 0;
+ guint i, state = 0;
gchar *p, *c, numbuf[sizeof("18446744073709551615")];
guint64 *val;
@@ -111,7 +111,7 @@ parse_revision_line (struct rspamd_sync_ctx *ctx, f_str_t *in)
/* One more character */
p ++;
}
- rspamd_strlcpy (numbuf, c, MIN (p - c + 1, sizeof (numbuf)));
+ rspamd_strlcpy (numbuf, c, MIN (p - c + 1, (gint)sizeof (numbuf)));
errno = 0;
*val = strtoull (numbuf, NULL, 10);
if (errno != 0) {
@@ -147,7 +147,7 @@ static gboolean
read_blocks (struct rspamd_sync_ctx *ctx, f_str_t *in)
{
struct rspamd_binlog_element *elt;
- gint i;
+ guint i;
statfile_pool_lock_file (ctx->pool, ctx->real_statfile);
elt = (struct rspamd_binlog_element *)in->begin;