diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2025-02-20 19:49:27 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2025-02-20 19:49:27 +0100 |
commit | 3e4d868615408370fe6c2977c32f45a47c372b00 (patch) | |
tree | ad4dd9cb02d58fb938f2f8e1a8c352bcd9bfe314 /src/backend/access/transam/xlog.c | |
parent | ab84d0ff806dd791ea9da5f1ca302daf3cf42980 (diff) | |
download | postgresql-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/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index f9bf5ba7509..d10704360a6 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -4287,7 +4287,7 @@ WriteControlFile(void) /* Contents are protected with a CRC */ INIT_CRC32C(ControlFile->crc); COMP_CRC32C(ControlFile->crc, - (char *) ControlFile, + ControlFile, offsetof(ControlFileData, crc)); FIN_CRC32C(ControlFile->crc); @@ -4405,7 +4405,7 @@ ReadControlFile(void) /* Now check the CRC. */ INIT_CRC32C(crc); COMP_CRC32C(crc, - (char *) ControlFile, + ControlFile, offsetof(ControlFileData, crc)); FIN_CRC32C(crc); |