]> git.cworth.org Git - fips/commit
Fix for an implementation with non-contiguous group ID values.
authorCarl Worth <cworth@cworth.org>
Wed, 23 Oct 2013 01:47:40 +0000 (18:47 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 23 Oct 2013 01:47:40 +0000 (18:47 -0700)
commitf8ff428db9bedbbee44177fb8c476e4bf8742958
tree9f1980792bf7cd9a19fa2c43c245ab2c7ac54a35
parentcc60267c8ddfcc6681106193294da2d8221160cf
Fix for an implementation with non-contiguous group ID values.

It seems crazy to me that group IDs (being integers) can be anything
other than [0 .. num_groups - 1], but the specification is written
with full generality here.

The code was already querying the group ID values originally, and
assigning those to each group->id slot in the metric_group_info_t
structure. But after that, the code had been assuming it could just
use values from 0 .. num_groups-1.

Fix this by carefully using group_index values ([0..num_groups-1])
when indexing into the various arrays and group->id values when
passing ID values to the various performance-monitor API functions.
metrics.c