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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 27 01:53:26 EDT 2011


Author: neteler
Date: 2011-09-26 22:53:26 -0700 (Mon, 26 Sep 2011)
New Revision: 48487

Modified:
   grass/branches/develbranch_6/lib/gis/rd_cellhd.c
Log:
glynn: Fix allocation bug (wrong pointer type in "sizeof") (backport from trunk, #48484); doxygen header

Modified: grass/branches/develbranch_6/lib/gis/rd_cellhd.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/rd_cellhd.c	2011-09-27 05:53:18 UTC (rev 48486)
+++ grass/branches/develbranch_6/lib/gis/rd_cellhd.c	2011-09-27 05:53:26 UTC (rev 48487)
@@ -1,11 +1,20 @@
-/* read cell header, or window.
-   returns NULL if ok, error message otherwise
-   note:  the error message can be freed using G_free ().
- */
+/*!
+  \file lib/gis/rd_cellhd.c
+  
+  \brief GIS Library - Read cell header or window
+  
+  (C) 1999-2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author USACERL and others
+*/
 
+#include <string.h>
+
 #include <grass/gis.h>
 #include <grass/glocale.h>
-#include <string.h>
 
 #define ERROR(x,line) return error(x,line)
 static int scan_item(const char *, char *, char *);
@@ -55,7 +64,7 @@
     while (G_getl(buf, sizeof(buf), fd))
 	count++;
 
-    array = (char **)G_calloc(count + 1, sizeof(char **));
+    array = (char **)G_calloc(count + 1, sizeof(char *));
 
     count = 0;
     fseek(fd, 0L, 0);



More information about the grass-commit mailing list