mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-04 18:39:37 +00:00
BUILD: stick-tables: silence an uninitialized variable warning
Commit 819fc6f
("MEDIUM: threads/stick-tables: handle multithreads on
stick tables") introduced a valid warning about an uninitialized return
value in stksess_kill_if_expired(). It just happens that this result is
never used, so let's turn the function back to void as previously.
This commit is contained in:
parent
99aad9295b
commit
a5e0590b80
@ -139,21 +139,17 @@ static inline int __stksess_kill_if_expired(struct stktable *t, struct stksess *
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int stksess_kill_if_expired(struct stktable *t, struct stksess *ts, int decrefcnt)
|
static inline void stksess_kill_if_expired(struct stktable *t, struct stksess *ts, int decrefcnt)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
SPIN_LOCK(STK_TABLE_LOCK, &t->lock);
|
SPIN_LOCK(STK_TABLE_LOCK, &t->lock);
|
||||||
|
|
||||||
if (decrefcnt)
|
if (decrefcnt)
|
||||||
ts->ref_cnt--;
|
ts->ref_cnt--;
|
||||||
|
|
||||||
if (t->expire != TICK_ETERNITY && tick_is_expired(ts->expire, now_ms))
|
if (t->expire != TICK_ETERNITY && tick_is_expired(ts->expire, now_ms))
|
||||||
ret = __stksess_kill_if_expired(t, ts);
|
__stksess_kill_if_expired(t, ts);
|
||||||
|
|
||||||
SPIN_UNLOCK(STK_TABLE_LOCK, &t->lock);
|
SPIN_UNLOCK(STK_TABLE_LOCK, &t->lock);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sets the stick counter's entry pointer */
|
/* sets the stick counter's entry pointer */
|
||||||
|
Loading…
Reference in New Issue
Block a user