1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +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

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.160 2004/01/05 20:36:04 neilc Exp $
* $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.161 2004/01/07 18:56:24 neilc Exp $
*
*
* INTERFACE ROUTINES
@ -124,7 +124,7 @@ heapgettup(Relation relation,
int linesleft;
ItemPointer tid;
tid = (tuple->t_data == NULL) ? (ItemPointer) NULL : &(tuple->t_self);
tid = (tuple->t_data == NULL) ? NULL : &(tuple->t_self);
/*
* debugging stuff
@ -919,7 +919,7 @@ heap_fetch(Relation relation,
* check time qualification of tuple, then release lock
*/
HeapTupleSatisfies(tuple, relation, buffer, dp,
snapshot, 0, (ScanKey) NULL, valid);
snapshot, 0, NULL, valid);
LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
@ -1026,7 +1026,7 @@ heap_get_latest_tid(Relation relation,
*/
HeapTupleSatisfies(&tp, relation, buffer, dp,
snapshot, 0, (ScanKey) NULL, valid);
snapshot, 0, NULL, valid);
linkend = true;
if ((t_data->t_infomask & HEAP_XMIN_COMMITTED) != 0 &&
@ -1946,7 +1946,7 @@ heap_restrpos(HeapScanDesc scan)
&(scan->rs_cbuf),
scan->rs_snapshot,
0,
(ScanKey) NULL);
NULL);
}
}