aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-02-20 19:49:27 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-02-20 19:49:27 +0100
commit3e4d868615408370fe6c2977c32f45a47c372b00 (patch)
treead4dd9cb02d58fb938f2f8e1a8c352bcd9bfe314 /src/common
parentab84d0ff806dd791ea9da5f1ca302daf3cf42980 (diff)
downloadpostgresql-3e4d868615408370fe6c2977c32f45a47c372b00.tar.gz
postgresql-3e4d868615408370fe6c2977c32f45a47c372b00.zip
Remove various unnecessary (char *) casts
Remove a number of (char *) casts that are unnecessary. Or in some cases, rewrite the code to make the purpose of the cast clearer. Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Discussion: https://www.postgresql.org/message-id/flat/fd1fcedb-3492-4fc8-9e3e-74b97f2db6c7%40eisentraut.org
Diffstat (limited to 'src/common')
-rw-r--r--src/common/controldata_utils.c4
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);