mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-29 22:11:18 +01:00
BUG/MINOR: debug: fix get_tainted() to properly read an atomic value
get_tainted() was using an atomic store from the atomic value to a local one instead of using an atomic load. In practice it has no effect given the relatively rare updates of this field and the fact that it's read only when dumping "show info" output, but better fix it. There's probably no need to backport this.
This commit is contained in:
parent
c72d2c7e5b
commit
9b4a0e6bac
@ -1456,9 +1456,7 @@ void mark_tainted(const enum tainted_flags flag)
|
||||
|
||||
unsigned int get_tainted()
|
||||
{
|
||||
int tainted_state;
|
||||
HA_ATOMIC_STORE(&tainted_state, tainted);
|
||||
return tainted_state;
|
||||
return HA_ATOMIC_LOAD(&tainted);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user