mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Remove useless casts to (void *)
Many of them just seem to have been copied around for no real reason. Their presence causes (small) risks of hiding actual type mismatches or silently discarding qualifiers Discussion: https://www.postgresql.org/message-id/flat/461ea37c-8b58-43b4-9736-52884e862820@eisentraut.org
This commit is contained in:
@@ -137,7 +137,7 @@ InitArchiveFmt_Custom(ArchiveHandle *AH)
|
||||
|
||||
/* Set up a private area. */
|
||||
ctx = (lclContext *) pg_malloc0(sizeof(lclContext));
|
||||
AH->formatData = (void *) ctx;
|
||||
AH->formatData = ctx;
|
||||
|
||||
/*
|
||||
* Now open the file
|
||||
@@ -205,7 +205,7 @@ _ArchiveEntry(ArchiveHandle *AH, TocEntry *te)
|
||||
else
|
||||
ctx->dataState = K_OFFSET_NO_DATA;
|
||||
|
||||
te->formatData = (void *) ctx;
|
||||
te->formatData = ctx;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -241,7 +241,7 @@ _ReadExtraToc(ArchiveHandle *AH, TocEntry *te)
|
||||
if (ctx == NULL)
|
||||
{
|
||||
ctx = (lclTocEntry *) pg_malloc0(sizeof(lclTocEntry));
|
||||
te->formatData = (void *) ctx;
|
||||
te->formatData = ctx;
|
||||
}
|
||||
|
||||
ctx->dataState = ReadOffset(AH, &(ctx->dataPos));
|
||||
|
||||
Reference in New Issue
Block a user