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 4e52847da80..643d11db037 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.35 2002/11/11 03:02:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.36 2002/11/13 00:39:46 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);