mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
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
This commit is contained in:
4
src/backend/utils/cache/relmapper.c
vendored
4
src/backend/utils/cache/relmapper.c
vendored
@@ -854,7 +854,7 @@ read_relmap_file(RelMapFile *map, char *dbpath, bool lock_held, int elevel)
|
||||
|
||||
/* verify the CRC */
|
||||
INIT_CRC32C(crc);
|
||||
COMP_CRC32C(crc, (char *) map, offsetof(RelMapFile, crc));
|
||||
COMP_CRC32C(crc, map, offsetof(RelMapFile, crc));
|
||||
FIN_CRC32C(crc);
|
||||
|
||||
if (!EQ_CRC32C(crc, map->crc))
|
||||
@@ -910,7 +910,7 @@ write_relmap_file(RelMapFile *newmap, bool write_wal, bool send_sinval,
|
||||
elog(ERROR, "attempt to write bogus relation mapping");
|
||||
|
||||
INIT_CRC32C(newmap->crc);
|
||||
COMP_CRC32C(newmap->crc, (char *) newmap, offsetof(RelMapFile, crc));
|
||||
COMP_CRC32C(newmap->crc, newmap, offsetof(RelMapFile, crc));
|
||||
FIN_CRC32C(newmap->crc);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user