[GRASS-SVN] r58101 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 24 05:20:46 PDT 2013


Author: mmetz
Date: 2013-10-24 05:20:46 -0700 (Thu, 24 Oct 2013)
New Revision: 58101

Modified:
   grass/trunk/lib/gis/mapset_nme.c
Log:
libgis: fix r34486

Modified: grass/trunk/lib/gis/mapset_nme.c
===================================================================
--- grass/trunk/lib/gis/mapset_nme.c	2013-10-24 06:20:13 UTC (rev 58100)
+++ grass/trunk/lib/gis/mapset_nme.c	2013-10-24 12:20:46 UTC (rev 58101)
@@ -23,7 +23,6 @@
 	int count;
 	int size;
     } path, path2;
-    int initialized;
 } state;
 
 static struct state *st = &state;
@@ -55,9 +54,13 @@
     FILE *fp;
     const char *cur;
 
-    if (G_is_initialized(&st->initialized))
+    if (st->path.count > 0)
 	return;
 
+    st->path.count = 0;
+    st->path.size = 0;
+    st->path.names = NULL;
+
     cur = G_mapset();
     new_mapset(cur);
 
@@ -77,8 +80,6 @@
 	if (strcmp(perm, cur) != 0 && G__mapset_permissions(perm) >= 0)
 	    new_mapset(perm);
     }
-
-    G_initialize_done(&st->initialized);
 }
 
 static void new_mapset(const char *name)
@@ -102,7 +103,6 @@
     st->path2.names = st->path.names;
 
     st->path.count = 0;
-    st->initialized = 0;
 }
 
 /*!



More information about the grass-commit mailing list