diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-08-04 20:31:24 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-08-04 20:31:24 +0400 |
commit | 3f96e6a7a317e70b85b32de4aa06681c11d79006 (patch) | |
tree | 70343e3fb1a43d29d9c4f454fa47b2dcad6249ad /src/map.c | |
parent | 6b86782ce21caad081d41f54ef10233a8e757189 (diff) | |
download | rspamd-3f96e6a7a317e70b85b32de4aa06681c11d79006.tar.gz rspamd-3f96e6a7a317e70b85b32de4aa06681c11d79006.zip |
Fix signness in arithmetic operations.
Diffstat (limited to 'src/map.c')
-rw-r--r-- | src/map.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -103,7 +103,7 @@ write_http_request (struct rspamd_map *map, struct http_map_data *data, gint soc * FSM for parsing HTTP reply */ static gchar * -parse_http_reply (gchar * chunk, size_t len, struct http_reply *reply) +parse_http_reply (gchar * chunk, gint len, struct http_reply *reply) { gchar *s, *p, *err_str, *tmp; p = chunk; @@ -194,7 +194,7 @@ parse_http_reply (gchar * chunk, size_t len, struct http_reply *reply) * Read and parse chunked header */ static gint -read_chunk_header (gchar * buf, size_t len, struct http_map_data *data) +read_chunk_header (gchar * buf, gint len, struct http_map_data *data) { gchar chunkbuf[32], *p, *c, *err_str; gint skip = 0; @@ -202,7 +202,7 @@ read_chunk_header (gchar * buf, size_t len, struct http_map_data *data) p = chunkbuf; c = buf; /* Find hex digits */ - while (g_ascii_isxdigit (*c) && p - chunkbuf < sizeof (chunkbuf) - 1 && skip < len) { + while (g_ascii_isxdigit (*c) && p - chunkbuf < (gint)(sizeof (chunkbuf) - 1) && skip < len) { *p++ = *c++; skip++; } @@ -517,7 +517,7 @@ add_map (const gchar *map_line, map_cb_t read_callback, map_fin_cb_t fin_callbac hostend = p; i = 0; p++; - while (g_ascii_isdigit (*p) && i < sizeof (portbuf) - 1) { + while (g_ascii_isdigit (*p) && i < (gint)sizeof (portbuf) - 1) { portbuf[i++] = *p++; } if (*p != '/') { @@ -573,7 +573,7 @@ add_map (const gchar *map_line, map_cb_t read_callback, map_fin_cb_t fin_callbac * FSM for parsing lists */ gchar * -abstract_parse_kv_list (memory_pool_t * pool, gchar * chunk, size_t len, struct map_cb_data *data, insert_func func) +abstract_parse_kv_list (memory_pool_t * pool, gchar * chunk, gint len, struct map_cb_data *data, insert_func func) { gchar *c, *p, *key = NULL, *value = NULL; @@ -665,7 +665,7 @@ abstract_parse_kv_list (memory_pool_t * pool, gchar * chunk, size_t len, struct } gchar * -abstract_parse_list (memory_pool_t * pool, gchar * chunk, size_t len, struct map_cb_data *data, insert_func func) +abstract_parse_list (memory_pool_t * pool, gchar * chunk, gint len, struct map_cb_data *data, insert_func func) { gchar *s, *p, *str, *start; @@ -804,7 +804,7 @@ radix_tree_insert_helper (gpointer st, gconstpointer key, gpointer value) /* Helpers */ gchar * -read_host_list (memory_pool_t * pool, gchar * chunk, size_t len, struct map_cb_data *data) +read_host_list (memory_pool_t * pool, gchar * chunk, gint len, struct map_cb_data *data) { if (data->cur_data == NULL) { data->cur_data = g_hash_table_new (rspamd_strcase_hash, rspamd_strcase_equal); @@ -821,7 +821,7 @@ fin_host_list (memory_pool_t * pool, struct map_cb_data *data) } gchar * -read_kv_list (memory_pool_t * pool, gchar * chunk, size_t len, struct map_cb_data *data) +read_kv_list (memory_pool_t * pool, gchar * chunk, gint len, struct map_cb_data *data) { if (data->cur_data == NULL) { data->cur_data = g_hash_table_new (rspamd_strcase_hash, rspamd_strcase_equal); @@ -838,7 +838,7 @@ fin_kv_list (memory_pool_t * pool, struct map_cb_data *data) } gchar * -read_radix_list (memory_pool_t * pool, gchar * chunk, size_t len, struct map_cb_data *data) +read_radix_list (memory_pool_t * pool, gchar * chunk, gint len, struct map_cb_data *data) { if (data->cur_data == NULL) { data->cur_data = radix_tree_create (); |