summaryrefslogtreecommitdiff
path: root/src/backend/access/rtree
diff options
context:
space:
mode:
authorTom Lane2000-06-14 05:24:50 +0000
committerTom Lane2000-06-14 05:24:50 +0000
commitff7b9f55410bbfbd017af331d23371ab61b63d5e (patch)
tree6a055be48dd161470503eb2f1a0376bc048ab73b /src/backend/access/rtree
parent69cd08d9f79818c8ff8b7b74c7ecfe8dcdb0202c (diff)
I had overlooked the fact that some fmgr-callable functions return void
--- ie, they're only called for side-effects. Add a PG_RETURN_VOID() macro and use it where appropriate. This probably doesn't change the machine code by a single bit ... it's just for documentation.
Diffstat (limited to 'src/backend/access/rtree')
-rw-r--r--src/backend/access/rtree/rtproc.c7
-rw-r--r--src/backend/access/rtree/rtree.c6
-rw-r--r--src/backend/access/rtree/rtscan.c10
3 files changed, 11 insertions, 12 deletions
diff --git a/src/backend/access/rtree/rtproc.c b/src/backend/access/rtree/rtproc.c
index df410045c2d..f69e9977332 100644
--- a/src/backend/access/rtree/rtproc.c
+++ b/src/backend/access/rtree/rtproc.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.26 2000/06/13 07:34:49 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.27 2000/06/14 05:24:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,8 +18,7 @@
#include "utils/builtins.h"
-BOX
- *
+BOX *
rt_box_union(BOX *a, BOX *b)
{
BOX *n;
@@ -123,7 +122,7 @@ rt_poly_size(PG_FUNCTION_ARGS)
*size = (float) (xdim * ydim);
}
- PG_RETURN_POINTER(NULL); /* no real return value */
+ PG_RETURN_VOID();
}
POLYGON *
diff --git a/src/backend/access/rtree/rtree.c b/src/backend/access/rtree/rtree.c
index 358d307d0b5..513fcd8798b 100644
--- a/src/backend/access/rtree/rtree.c
+++ b/src/backend/access/rtree/rtree.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.48 2000/06/13 07:34:49 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.49 2000/06/14 05:24:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -281,7 +281,7 @@ rtbuild(PG_FUNCTION_ARGS)
pfree(nulls);
pfree(d);
- PG_RETURN_POINTER(NULL); /* no real return value */
+ PG_RETURN_VOID();
}
/*
@@ -1025,7 +1025,7 @@ rtdelete(PG_FUNCTION_ARGS)
WriteBuffer(buf);
- PG_RETURN_POINTER(NULL); /* no real return value */
+ PG_RETURN_VOID();
}
static void
diff --git a/src/backend/access/rtree/rtscan.c b/src/backend/access/rtree/rtscan.c
index 97a71a00588..3cd6d3dae3f 100644
--- a/src/backend/access/rtree/rtscan.c
+++ b/src/backend/access/rtree/rtscan.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.33 2000/06/13 07:34:49 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.34 2000/06/14 05:24:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -156,7 +156,7 @@ rtrescan(PG_FUNCTION_ARGS)
}
}
- PG_RETURN_POINTER(NULL); /* no real return value */
+ PG_RETURN_VOID();
}
Datum
@@ -192,7 +192,7 @@ rtmarkpos(PG_FUNCTION_ARGS)
freestack(p->s_markstk);
p->s_markstk = o;
- PG_RETURN_POINTER(NULL); /* no real return value */
+ PG_RETURN_VOID();
}
Datum
@@ -228,7 +228,7 @@ rtrestrpos(PG_FUNCTION_ARGS)
freestack(p->s_stack);
p->s_stack = o;
- PG_RETURN_POINTER(NULL); /* no real return value */
+ PG_RETURN_VOID();
}
Datum
@@ -249,7 +249,7 @@ rtendscan(PG_FUNCTION_ARGS)
rtdropscan(s);
/* XXX don't unset read lock -- two-phase locking */
- PG_RETURN_POINTER(NULL); /* no real return value */
+ PG_RETURN_VOID();
}
static void