[GRASS-SVN] r69387 - grass/branches/releasebranch_7_2/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 6 06:17:04 PDT 2016


Author: mmetz
Date: 2016-09-06 06:17:04 -0700 (Tue, 06 Sep 2016)
New Revision: 69387

Modified:
   grass/branches/releasebranch_7_2/lib/gis/gisinit.c
Log:
libgis: set valid ZLIB compression level (sync to trunk)

Modified: grass/branches/releasebranch_7_2/lib/gis/gisinit.c
===================================================================
--- grass/branches/releasebranch_7_2/lib/gis/gisinit.c	2016-09-06 12:48:13 UTC (rev 69386)
+++ grass/branches/releasebranch_7_2/lib/gis/gisinit.c	2016-09-06 13:17:04 UTC (rev 69387)
@@ -119,7 +119,9 @@
     G__.little_endian = G_is_little_endian();
 
     zlib = getenv("GRASS_ZLIB_LEVEL");
-    G__.compression_level = (zlib && *zlib && isdigit(*zlib)) ? atoi(zlib) : -2;
+    G__.compression_level = (zlib && *zlib && isdigit(*zlib)) ? atoi(zlib) : 1;
+    if (G__.compression_level < -1 || G__.compression_level > 9)
+	G__.compression_level = 1;
 
     initialized = 1;
 



More information about the grass-commit mailing list