Skip to content

Commit a73457f

Browse files
committed
Declare variables at top of function
1 parent 2193120 commit a73457f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

contrib/mapcache_detail/mapcache_detail.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ static void _destroy_json_pool() {
237237
GEOSGeometry * mapcache_extent_to_GEOSGeometry(const mapcache_extent *extent)
238238
{
239239
GEOSCoordSequence *cs = GEOSCoordSeq_create(5,2);
240+
GEOSGeometry *lr;
241+
GEOSGeometry *bb;
240242

241243
GEOSCoordSeq_setX(cs,0,extent->minx);
242244
GEOSCoordSeq_setY(cs,0,extent->miny);
@@ -249,8 +251,8 @@ GEOSGeometry * mapcache_extent_to_GEOSGeometry(const mapcache_extent *extent)
249251
GEOSCoordSeq_setX(cs,4,extent->minx);
250252
GEOSCoordSeq_setY(cs,4,extent->miny);
251253

252-
GEOSGeometry* lr = GEOSGeom_createLinearRing(cs);
253-
GEOSGeometry* bb = GEOSGeom_createPolygon(lr, NULL, 0);
254+
lr = GEOSGeom_createLinearRing(cs);
255+
bb = GEOSGeom_createPolygon(lr, NULL, 0);
254256

255257
return bb;
256258
}

0 commit comments

Comments
 (0)