diff options
Diffstat (limited to 'src/common/controldata_utils.c')
-rw-r--r-- | src/common/controldata_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/controldata_utils.c b/src/common/controldata_utils.c index 27ce27d7647..34d8a3a4e31 100644 --- a/src/common/controldata_utils.c +++ b/src/common/controldata_utils.c @@ -135,7 +135,7 @@ retry: /* Check the CRC. */ INIT_CRC32C(crc); COMP_CRC32C(crc, - (char *) ControlFile, + ControlFile, offsetof(ControlFileData, crc)); FIN_CRC32C(crc); @@ -199,7 +199,7 @@ update_controlfile(const char *DataDir, /* Recalculate CRC of control file */ INIT_CRC32C(ControlFile->crc); COMP_CRC32C(ControlFile->crc, - (char *) ControlFile, + ControlFile, offsetof(ControlFileData, crc)); FIN_CRC32C(ControlFile->crc); |