aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/rtree/rtproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/rtree/rtproc.c')
-rw-r--r--src/backend/access/rtree/rtproc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/backend/access/rtree/rtproc.c b/src/backend/access/rtree/rtproc.c
index 8efc697b664..778720b3a71 100644
--- a/src/backend/access/rtree/rtproc.c
+++ b/src/backend/access/rtree/rtproc.c
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.33 2002/06/20 20:29:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.34 2002/11/10 07:25:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -103,9 +103,7 @@ rt_poly_union(PG_FUNCTION_ARGS)
POLYGON *b = PG_GETARG_POLYGON_P(1);
POLYGON *p;
- p = (POLYGON *) palloc(sizeof(POLYGON));
-
- MemSet((char *) p, 0, sizeof(POLYGON)); /* zero any holes */
+ p = (POLYGON *) palloc0(sizeof(POLYGON)); /* zero any holes */
p->size = sizeof(POLYGON);
p->npts = 0;
p->boundbox.high.x = Max(a->boundbox.high.x, b->boundbox.high.x);
@@ -127,9 +125,7 @@ rt_poly_inter(PG_FUNCTION_ARGS)
POLYGON *b = PG_GETARG_POLYGON_P(1);
POLYGON *p;
- p = (POLYGON *) palloc(sizeof(POLYGON));
-
- MemSet((char *) p, 0, sizeof(POLYGON)); /* zero any holes */
+ p = (POLYGON *) palloc0(sizeof(POLYGON)); /* zero any holes */
p->size = sizeof(POLYGON);
p->npts = 0;
p->boundbox.high.x = Min(a->boundbox.high.x, b->boundbox.high.x);