mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Remove unnecessary (char *) casts [mem]
Remove (char *) casts around memory functions such as memcmp(),
memcpy(), or memset() where the cast is useless. Since these
functions don't take char * arguments anyway, these casts are at best
complicated casts to (void *), about which see commit 7f798aca1d.
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:
@@ -2089,7 +2089,7 @@ AdvanceXLInsertBuffer(XLogRecPtr upto, TimeLineID tli, bool opportunistic)
|
||||
* Be sure to re-zero the buffer so that bytes beyond what we've
|
||||
* written will look like zeroes and not valid XLOG records...
|
||||
*/
|
||||
MemSet((char *) NewPage, 0, XLOG_BLCKSZ);
|
||||
MemSet(NewPage, 0, XLOG_BLCKSZ);
|
||||
|
||||
/*
|
||||
* Fill the new page's header
|
||||
|
||||
@@ -794,7 +794,7 @@ restart:
|
||||
readOff = ReadPageInternal(state, targetPagePtr,
|
||||
pageHeaderSize + len);
|
||||
|
||||
memcpy(buffer, (char *) contdata, len);
|
||||
memcpy(buffer, contdata, len);
|
||||
buffer += len;
|
||||
gotlen += len;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user