1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

More janitorial work: remove the explicit casting of NULL literals to a

pointer type when it is not necessary to do so.

For future reference, casting NULL to a pointer type is only necessary
when (a) invoking a function AND either (b) the function has no prototype
OR (c) the function is a varargs function.
This commit is contained in:
Neil Conway
2004-01-07 18:56:30 +00:00
parent afca5d50dc
commit 192ad63bd7
71 changed files with 424 additions and 436 deletions

View File

@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.270 2004/01/06 18:07:31 neilc Exp $
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.271 2004/01/07 18:56:25 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@ -958,7 +958,7 @@ full_vacuum_rel(Relation onerel, VacuumStmt *vacstmt)
vacrelstats->hasindex = true;
/* Clean/scan index relation(s) */
if (Irel != (Relation *) NULL)
if (Irel != NULL)
{
if (vacuum_pages.num_pages > 0)
{
@ -1257,7 +1257,7 @@ scan_heap(VRelStats *vacrelstats, Relation onerel,
* removal of dead tuples. But note we are NOT changing
* the real page yet...
*/
if (tempPage == (Page) NULL)
if (tempPage == NULL)
{
Size pageSize;
@ -1284,7 +1284,7 @@ scan_heap(VRelStats *vacrelstats, Relation onerel,
}
} /* scan along page */
if (tempPage != (Page) NULL)
if (tempPage != NULL)
{
/* Some tuples are removable; figure free space after removal */
PageRepairFragmentation(tempPage, NULL);
@ -2406,7 +2406,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
if (Nvacpagelist.num_pages > 0)
{
/* vacuum indexes again if needed */
if (Irel != (Relation *) NULL)
if (Irel != NULL)
{
VacPage *vpleft,
*vpright,
@ -3057,7 +3057,7 @@ vac_open_indexes(Relation relation, int *nindexes, Relation **Irel)
void
vac_close_indexes(int nindexes, Relation *Irel)
{
if (Irel == (Relation *) NULL)
if (Irel == NULL)
return;
while (nindexes--)