From: Vsevolod Stakhov Date: Sun, 2 Nov 2014 18:55:24 +0000 (+0000) Subject: Fix some upstream issues. X-Git-Tag: 0.7.3~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=751d22ec96231b64d0cc282aeefb33ea7ffc47d5;p=thirdparty%2Frspamd.git Fix some upstream issues. --- diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c index 67dcc83e4c..b18e2585fb 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 */