mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +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:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/hash/hash.c,v 1.69 2003/11/29 19:51:40 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/hash/hash.c,v 1.70 2004/01/07 18:56:23 neilc Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains only the public interface routines.
|
||||
@@ -180,7 +180,7 @@ hashinsert(PG_FUNCTION_ARGS)
|
||||
if (IndexTupleHasNulls(itup))
|
||||
{
|
||||
pfree(itup);
|
||||
PG_RETURN_POINTER((InsertIndexResult) NULL);
|
||||
PG_RETURN_POINTER(NULL);
|
||||
}
|
||||
|
||||
hitem = _hash_formitem(itup);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/hash/hashscan.c,v 1.32 2003/11/29 19:51:40 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/hash/hashscan.c,v 1.33 2004/01/07 18:56:23 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -26,7 +26,7 @@ typedef struct HashScanListData
|
||||
|
||||
typedef HashScanListData *HashScanList;
|
||||
|
||||
static HashScanList HashScans = (HashScanList) NULL;
|
||||
static HashScanList HashScans = NULL;
|
||||
|
||||
|
||||
/*
|
||||
@@ -73,16 +73,16 @@ _hash_dropscan(IndexScanDesc scan)
|
||||
HashScanList chk,
|
||||
last;
|
||||
|
||||
last = (HashScanList) NULL;
|
||||
last = NULL;
|
||||
for (chk = HashScans;
|
||||
chk != (HashScanList) NULL && chk->hashsl_scan != scan;
|
||||
chk != NULL && chk->hashsl_scan != scan;
|
||||
chk = chk->hashsl_next)
|
||||
last = chk;
|
||||
|
||||
if (chk == (HashScanList) NULL)
|
||||
if (chk == NULL)
|
||||
elog(ERROR, "hash scan list trashed; can't find 0x%p", (void *) scan);
|
||||
|
||||
if (last == (HashScanList) NULL)
|
||||
if (last == NULL)
|
||||
HashScans = chk->hashsl_next;
|
||||
else
|
||||
last->hashsl_next = chk->hashsl_next;
|
||||
|
||||
Reference in New Issue
Block a user