[GRASS-SVN] r52177 - grass/trunk/raster/r.mapcalc

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 21 02:15:19 PDT 2012


Author: glynn
Date: 2012-06-21 02:15:17 -0700 (Thu, 21 Jun 2012)
New Revision: 52177

Modified:
   grass/trunk/raster/r.mapcalc/map.c
Log:
Don't open maps twice


Modified: grass/trunk/raster/r.mapcalc/map.c
===================================================================
--- grass/trunk/raster/r.mapcalc/map.c	2012-06-21 04:22:40 UTC (rev 52176)
+++ grass/trunk/raster/r.mapcalc/map.c	2012-06-21 09:15:17 UTC (rev 52177)
@@ -490,7 +490,6 @@
     int use_cats = 0;
     int use_colors = 0;
     struct map *m;
-    int fd;
 
     if (row < min_row)
 	min_row = row;
@@ -505,8 +504,6 @@
     if (!mapset)
 	G_fatal_error(_("Raster map <%s> not found"), name);
 
-    fd = Rast_open_old(name, mapset);
-
     switch (mod) {
     case 'M':
 	break;
@@ -561,7 +558,7 @@
     m->use_rowio = 0;
     m->min_row = row;
     m->max_row = row;
-    m->fd = fd;
+    m->fd = -1;
 
     if (use_cats)
 	init_cats(m);



More information about the grass-commit mailing list