diff options
author | Neil Conway <neilc@samurai.com> | 2004-01-07 18:56:30 +0000 |
---|---|---|
committer | Neil Conway <neilc@samurai.com> | 2004-01-07 18:56:30 +0000 |
commit | 192ad63bd765d448e91389c6ff1d75f8b18bb268 (patch) | |
tree | 85873642a16b5ac877dc443a681fe9249c210693 /src/backend/access/rtree/rtree.c | |
parent | afca5d50dc296580925b560fff0eb75bb48f0cbe (diff) |
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.
Diffstat (limited to 'src/backend/access/rtree/rtree.c')
-rw-r--r-- | src/backend/access/rtree/rtree.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/access/rtree/rtree.c b/src/backend/access/rtree/rtree.c index 221fff2092a..9414e314289 100644 --- a/src/backend/access/rtree/rtree.c +++ b/src/backend/access/rtree/rtree.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/rtree/rtree.c,v 1.81 2003/11/29 19:51:40 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/access/rtree/rtree.c,v 1.82 2004/01/07 18:56:24 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -244,7 +244,7 @@ rtinsert(PG_FUNCTION_ARGS) if (IndexTupleHasNulls(itup)) { pfree(itup); - PG_RETURN_POINTER((InsertIndexResult) NULL); + PG_RETURN_POINTER(NULL); } initRtstate(&rtState, r); @@ -275,7 +275,7 @@ rtdoinsert(Relation r, IndexTuple itup, RTSTATE *rtstate) blk = P_ROOT; buffer = InvalidBuffer; - stack = (RTSTACK *) NULL; + stack = NULL; do { @@ -360,7 +360,7 @@ rttighten(Relation r, newd_size; Buffer b; - if (stk == (RTSTACK *) NULL) + if (stk == NULL) return; b = ReadBuffer(r, stk->rts_blk); @@ -622,7 +622,7 @@ rtintinsert(Relation r, newdatum; InsertIndexResult res; - if (stk == (RTSTACK *) NULL) + if (stk == NULL) { rtnewroot(r, ltup, rtup); return; @@ -912,7 +912,7 @@ rtpicksplit(Relation r, */ /* to keep compiler quiet */ - cost_vector = (SPLITCOST *) NULL; + cost_vector = NULL; if (num_tuples_without_seeds > 0) { @@ -1172,7 +1172,7 @@ freestack(RTSTACK *s) { RTSTACK *p; - while (s != (RTSTACK *) NULL) + while (s != NULL) { p = s->rts_parent; pfree(s); @@ -1213,7 +1213,7 @@ rtbulkdelete(PG_FUNCTION_ARGS) */ /* walk through the entire index */ - iscan = index_beginscan(NULL, rel, SnapshotAny, 0, (ScanKey) NULL); + iscan = index_beginscan(NULL, rel, SnapshotAny, 0, NULL); /* including killed tuples */ iscan->ignore_killed_tuples = false; |