From 192ad63bd765d448e91389c6ff1d75f8b18bb268 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Wed, 7 Jan 2004 18:56:30 +0000 Subject: 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. --- src/backend/executor/execQual.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/executor/execQual.c') diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c index 0377f9f410..bbed6f014b 100644 --- a/src/backend/executor/execQual.c +++ b/src/backend/executor/execQual.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.152 2003/12/18 22:23:42 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.153 2004/01/07 18:56:26 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -548,7 +548,7 @@ GetAttributeByNum(TupleTableSlot *slot, if (!AttributeNumberIsValid(attrno)) elog(ERROR, "invalid attribute number %d", attrno); - if (isNull == (bool *) NULL) + if (isNull == NULL) elog(ERROR, "a NULL isNull pointer was passed"); if (TupIsNull(slot)) @@ -579,7 +579,7 @@ GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull) if (attname == NULL) elog(ERROR, "invalid attribute name"); - if (isNull == (bool *) NULL) + if (isNull == NULL) elog(ERROR, "a NULL isNull pointer was passed"); if (TupIsNull(slot)) @@ -3116,7 +3116,7 @@ ExecProject(ProjectionInfo *projInfo, ExprDoneCond *isDone) * sanity checks */ if (projInfo == NULL) - return (TupleTableSlot *) NULL; + return NULL; /* * get the projection info we want -- cgit v1.2.1