[GRASS-SVN] r33694 - grass/branches/develbranch_6/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 6 05:52:25 EDT 2008


Author: neteler
Date: 2008-10-06 05:52:25 -0400 (Mon, 06 Oct 2008)
New Revision: 33694

Modified:
   grass/branches/develbranch_6/lib/gis/opencell.c
Log:
glynn: Zero fileinfo structures upon allocation(merge from trunk, r33631)

Modified: grass/branches/develbranch_6/lib/gis/opencell.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/opencell.c	2008-10-06 09:51:20 UTC (rev 33693)
+++ grass/branches/develbranch_6/lib/gis/opencell.c	2008-10-06 09:52:25 UTC (rev 33694)
@@ -42,8 +42,10 @@
     G__.fileinfo = G_realloc(G__.fileinfo, newsize * sizeof(struct fileinfo));
 
     /* Mark all cell files as closed */
-    for (i = oldsize; i < newsize; i++)
+    for (i = oldsize; i < newsize; i++) {
+	memset(&G__.fileinfo[i], 0, sizeof(struct fileinfo));
 	G__.fileinfo[i].open_mode = -1;
+    }
 
     G__.fileinfo_count = newsize;
 



More information about the grass-commit mailing list