aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kvstorage
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-03-01 16:45:38 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-03-01 16:45:38 +0400
commit7dcf9f9bade26ca02b8706a2e4cb2066f6ba7b00 (patch)
treef69121ee5c1a0e43fe987db8ed2c9e5cc66c79f0 /lib/kvstorage
parentc93cca709b13da41b8d5bcd08874d75669e125f0 (diff)
downloadrspamd-7dcf9f9bade26ca02b8706a2e4cb2066f6ba7b00.tar.gz
rspamd-7dcf9f9bade26ca02b8706a2e4cb2066f6ba7b00.zip
Use DB_HASH access method for bdb backend.
Fix signed and unsigned comparasion while I'm here.
Diffstat (limited to 'lib/kvstorage')
-rw-r--r--lib/kvstorage/libkvstorageclient.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/kvstorage/libkvstorageclient.c b/lib/kvstorage/libkvstorageclient.c
index d05e8b5e0..10e9be8a4 100644
--- a/lib/kvstorage/libkvstorageclient.c
+++ b/lib/kvstorage/libkvstorageclient.c
@@ -182,10 +182,10 @@ rspamd_kvstorage_buf_drainline (struct kvstorage_buf *buf)
p = buf->data + buf->pos;
/* Skip \r and \n characters */
- while (p - buf->data < buf->len && (*p == '\r' || *p == '\n')) {
+ while (p - buf->data < (gint)buf->len && (*p == '\r' || *p == '\n')) {
p ++;
}
- if (p - buf->data == buf->len) {
+ if (p - buf->data == (gint)buf->len) {
/* Do not move anything */
buf->pos = 0;
return;
@@ -207,9 +207,9 @@ rspamd_kvstorage_parse_reply_error (struct kvstorage_buf *buf)
/* Get one word */
p = buf->data;
- while (p - buf->data < buf->pos) {
+ while (p - buf->data < (gint)buf->pos) {
if (g_ascii_isspace (*p)) {
- while (p - buf->data < buf->pos && g_ascii_isspace (*p)) {
+ while (p - buf->data < (gint)buf->pos && g_ascii_isspace (*p)) {
p ++;
}
break;
@@ -262,7 +262,7 @@ rspamd_kvstorage_parse_get_line (struct kvstorage_buf *buf, guint *len, guint *f
while (p < end) {
if (g_ascii_isspace (*p)) {
error = FALSE;
- while (p - buf->data < buf->pos && g_ascii_isspace (*p)) {
+ while (p - buf->data < (gint)buf->pos && g_ascii_isspace (*p)) {
p ++;
}
break;
@@ -302,7 +302,7 @@ rspamd_kvstorage_parse_get_line (struct kvstorage_buf *buf, guint *len, guint *f
if (g_ascii_isspace (*p)) {
error = FALSE;
/* Skip spaces after flags */
- while (p - buf->data < buf->pos && g_ascii_isspace (*p)) {
+ while (p - buf->data < (gint)buf->pos && g_ascii_isspace (*p)) {
p ++;
}
break;