]> granicus.if.org Git - postgresql/commitdiff
Fix point <-> polygon code for zero-distance case.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 15 Dec 2014 19:04:27 +0000 (14:04 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 15 Dec 2014 19:04:27 +0000 (14:04 -0500)
"PG_RETURN_FLOAT8(x)" is not "return x", except perhaps by accident
on some platforms.

src/backend/utils/adt/geo_ops.c

index 946dc2893d5fa904b8711ee3d9b6eaec7da51d2e..bc56b0a54219ddff95880491e4eda5f4ab693a34 100644 (file)
@@ -2689,7 +2689,7 @@ dist_ppoly_internal(Point *pt, POLYGON *poly)
 #ifdef GEODEBUG
                printf("dist_ppoly_internal- point inside of polygon\n");
 #endif
-               PG_RETURN_FLOAT8(0.0);
+               return 0.0;
        }
 
        /* initialize distance with segment between first and last points */