CLEANUP: stats: Avoid computation with uninitialized bits.
authorAndreas Seltenreich <andreas.seltenreich@credativ.de>
Thu, 3 Mar 2016 18:32:25 +0000 (19:32 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 Mar 2016 11:55:06 +0000 (12:55 +0100)
commit9727cf482cc4f761a2649fd04149f17bb3143600
treee05405262ea6e21d741e3f3041498cf6a93df317
parent23d19d669b263ef3878eb7c03a26c6c1dc45ec9e
CLEANUP: stats: Avoid computation with uninitialized bits.

stats_map_lookup() sets bit SMP_F_CONST in the uninitialized member
flags of a stack-allocated sample, leaving the other bits
uninitialized.  All code paths that can access the struct only ever
check for this specific flag, so there is no risk of unintended
behavior.

Nevertheless fix it as it triggers warnings in static code analysis
tools and might become a problem on future revisions of the code.

Problem found in version 1.5.
src/dumpstats.c