aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/upstream.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-02 18:55:24 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-02 18:55:24 +0000
commit751d22ec96231b64d0cc282aeefb33ea7ffc47d5 (patch)
treef6a89036bb5f6b5590c7250b360eda5605422749 /src/libutil/upstream.c
parent89442fca488c0371f4ba62eed091dedc89d8a720 (diff)
downloadrspamd-751d22ec96231b64d0cc282aeefb33ea7ffc47d5.tar.gz
rspamd-751d22ec96231b64d0cc282aeefb33ea7ffc47d5.zip
Fix some upstream issues.
Diffstat (limited to 'src/libutil/upstream.c')
-rw-r--r--src/libutil/upstream.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c
index 67dcc83e4..b18e2585f 100644
--- a/src/libutil/upstream.c
+++ b/src/libutil/upstream.c
@@ -368,9 +368,9 @@ rspamd_upstreams_parse_line (struct upstream_list *ups,
ret = TRUE;
}
}
- p += len + 1;
+ p += len;
/* Skip separators */
- p += strspn (p, separators) + 1;
+ p += strspn (p, separators);
}
return ret;
@@ -451,7 +451,7 @@ static struct upstream*
rspamd_upstream_get_round_robin (struct upstream_list *ups, gboolean use_cur)
{
guint max_weight = 0;
- struct upstream *up, *selected;
+ struct upstream *up, *selected = NULL;
guint i;
/* Select upstream with the maximum cur_weight */