diff --git a/zconf/chp/chpstat/chpstat.c b/zconf/chp/chpstat/chpstat.c index 1b0cf8c4..09d1e94c 100644 --- a/zconf/chp/chpstat/chpstat.c +++ b/zconf/chp/chpstat/chpstat.c @@ -719,7 +719,7 @@ static bool read_cmcb(int chpid, cmcb_t *cmcb) free(path); path = get_chpid_path(chpid, "measurement_chars"); /* Partial CMCB contains data starting at word 3. */ - read_bin(path, &cmcb[PARTIAL_CMCB_OFFSET], + read_bin(path, (char *)cmcb + PARTIAL_CMCB_OFFSET, PARTIAL_CMCB_SIZE, false); } free(path); diff --git a/zconf/chp/chpstat/cmg.h b/zconf/chp/chpstat/cmg.h index a0cff894..e2f610f6 100644 --- a/zconf/chp/chpstat/cmg.h +++ b/zconf/chp/chpstat/cmg.h @@ -17,8 +17,8 @@ #include "column.h" #define CMCB_SIZE (8 * sizeof(u32)) -#define PARTIAL_CMCB_OFFSET 3 -#define PARTIAL_CMCB_SIZE (CMCB_SIZE - PARTIAL_CMCB_OFFSET * sizeof(u32)) +#define PARTIAL_CMCB_OFFSET (3 * sizeof(u32)) +#define PARTIAL_CMCB_SIZE (CMCB_SIZE - PARTIAL_CMCB_OFFSET) #define CUE_SIZE (8 * sizeof(u32)) #define EXT_CUE_SIZE (16 * sizeof(u32)) #define METRICS_SIZE (18 * sizeof(double))