[postgis-tickets] r15668 - Remove PARANOIA blocks from lwgeom_api.c entirely

Paul Ramsey pramsey at cleverelephant.ca
Fri Sep 8 14:34:35 PDT 2017


Author: pramsey
Date: 2017-09-08 14:34:35 -0700 (Fri, 08 Sep 2017)
New Revision: 15668

Modified:
   trunk/liblwgeom/lwgeom_api.c
Log:
Remove PARANOIA blocks from lwgeom_api.c entirely


Modified: trunk/liblwgeom/lwgeom_api.c
===================================================================
--- trunk/liblwgeom/lwgeom_api.c	2017-09-08 21:09:53 UTC (rev 15667)
+++ trunk/liblwgeom/lwgeom_api.c	2017-09-08 21:34:35 UTC (rev 15668)
@@ -245,7 +245,6 @@
 	uint8_t *ptr;
 	int zmflag;
 
-#if PARANOIA_LEVEL > 0
 	if ( ! pa ) 
 	{
 		lwerror("%s [%d] NULL POINTARRAY input", __FILE__, __LINE__);
@@ -254,10 +253,9 @@
 
 	if ( (n<0) || (n>=pa->npoints))
 	{
-		lwerror("%s [%d] called with n=%d and npoints=%d", __FILE__, __LINE__, n, pa->npoints);
+		lwnotice("%s [%d] called with n=%d and npoints=%d", __FILE__, __LINE__, n, pa->npoints);
 		return 0;
 	}
-#endif
 
 	LWDEBUG(4, "getPoint4d_p called.");
 
@@ -338,7 +336,6 @@
 {
 	uint8_t *ptr;
 
-#if PARANOIA_LEVEL > 0
 	if ( ! pa ) 
 	{
 		lwerror("%s [%d] NULL POINTARRAY input", __FILE__, __LINE__);
@@ -347,10 +344,9 @@
 
 	if ( (n<0) || (n>=pa->npoints))
 	{
-		lwerror("%s [%d] called with n=%d and npoints=%d", __FILE__, __LINE__, n, pa->npoints);
+		lwnotice("%s [%d] called with n=%d and npoints=%d", __FILE__, __LINE__, n, pa->npoints);
 		return 0;
 	}
-#endif
 
 	LWDEBUGF(2, "getPoint3dz_p called on array of %d-dimensions / %u pts",
 	         FLAGS_NDIMS(pa->flags), pa->npoints);
@@ -393,7 +389,6 @@
 	uint8_t *ptr;
 	int zmflag;
 
-#if PARANOIA_LEVEL > 0
 	if ( ! pa ) 
 	{
 		lwerror("%s [%d] NULL POINTARRAY input", __FILE__, __LINE__);
@@ -402,10 +397,9 @@
 
 	if ( (n<0) || (n>=pa->npoints))
 	{
-		lwerror("%s [%d] called with n=%d and npoints=%d", __FILE__, __LINE__, n, pa->npoints);
+		lwnotice("%s [%d] called with n=%d and npoints=%d", __FILE__, __LINE__, n, pa->npoints);
 		return 0;
 	}
-#endif
 
 	LWDEBUGF(2, "getPoint3dm_p(%d) called on array of %d-dimensions / %u pts",
 	         n, FLAGS_NDIMS(pa->flags), pa->npoints);
@@ -473,7 +467,6 @@
 int
 getPoint2d_p(const POINTARRAY *pa, int n, POINT2D *point)
 {
-#if PARANOIA_LEVEL > 0
 	if ( ! pa ) 
 	{
 		lwerror("%s [%d] NULL POINTARRAY input", __FILE__, __LINE__);
@@ -482,10 +475,9 @@
 
 	if ( (n<0) || (n>=pa->npoints))
 	{
-		lwerror("%s [%d] called with n=%d and npoints=%d", __FILE__, __LINE__, n, pa->npoints);
+		lwnotice("%s [%d] called with n=%d and npoints=%d", __FILE__, __LINE__, n, pa->npoints);
 		return 0;
 	}
-#endif
 
 	/* this does x,y */
 	memcpy(point, getPoint_internal(pa, n), sizeof(POINT2D));



More information about the postgis-tickets mailing list