mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +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:
@@ -910,7 +910,7 @@ InitFileAccess(void)
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of memory")));
|
||||
|
||||
MemSet((char *) &(VfdCache[0]), 0, sizeof(Vfd));
|
||||
MemSet(&(VfdCache[0]), 0, sizeof(Vfd));
|
||||
VfdCache->fd = VFD_CLOSED;
|
||||
|
||||
SizeVfdCache = 1;
|
||||
@@ -1447,7 +1447,7 @@ AllocateVfd(void)
|
||||
*/
|
||||
for (i = SizeVfdCache; i < newCacheSize; i++)
|
||||
{
|
||||
MemSet((char *) &(VfdCache[i]), 0, sizeof(Vfd));
|
||||
MemSet(&(VfdCache[i]), 0, sizeof(Vfd));
|
||||
VfdCache[i].nextFree = i + 1;
|
||||
VfdCache[i].fd = VFD_CLOSED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user