rx: Statically check rx_statisticsAtomic size 14/13414/4
authorAndrew Deason <adeason@sinenomine.net>
Thu, 20 Dec 2018 20:29:47 +0000 (14:29 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Mon, 14 Jan 2019 23:50:35 +0000 (18:50 -0500)
commitb2475c11f4d430402a82cb5b018dbccdaa0dccd8
tree933ddc2238552f8c6cc56e3498a7dbc74e9e9181
parentfa3ce81178b23ee2d96f4e496484c23ed0ce7bfc
rx: Statically check rx_statisticsAtomic size

Currently, rx_GetStatistics assumes that struct rx_statistics and
rx_statisticsAtomic have the same size (we just memcpy between them).
However, this is never checked, and rx_statistics contains many 'int'
fields where rx_statisticsAtomic has rx_atomic_t fields.

If these are not the same size, our rx stats will silently break, so
add a static assert to make sure they are the same size.

Change-Id: I889867f4a85530c30dd15d32d1822144ea128a95
Reviewed-on: https://gerrit.openafs.org/13414
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/rx/rx_stats.c