[GRASS-SVN] r33061 - grass/trunk/lib/proj

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 25 10:23:37 EDT 2008


Author: glynn
Date: 2008-08-25 10:23:37 -0400 (Mon, 25 Aug 2008)
New Revision: 33061

Modified:
   grass/trunk/lib/proj/datum.c
Log:
Use sprintf() instead of G_asprintf()


Modified: grass/trunk/lib/proj/datum.c
===================================================================
--- grass/trunk/lib/proj/datum.c	2008-08-25 14:14:50 UTC (rev 33060)
+++ grass/trunk/lib/proj/datum.c	2008-08-25 14:23:37 UTC (rev 33061)
@@ -231,7 +231,7 @@
 								 *inputname)
 {
     FILE *fd;
-    char *file;
+    char file[GPATH_MAX];
     char buf[1024];
     int line;
     struct gpj_datum_transform_list *current = NULL, *outputlist = NULL;
@@ -264,7 +264,7 @@
 
     /* Now check for additional parameters in datumtransform.table */
 
-    G_asprintf(&file, "%s%s", G_gisbase(), DATUMTRANSFORMTABLE);
+    sprintf(file, "%s%s", G_gisbase(), DATUMTRANSFORMTABLE);
 
     fd = fopen(file, "r");
     if (!fd) {
@@ -323,13 +323,13 @@
 struct datum_list *read_datum_table(void)
 {
     FILE *fd;
-    char *file;
+    char file[GPATH_MAX];
     char buf[4096];
     int line;
     struct datum_list *current = NULL, *outputlist = NULL;
     int count = 0;
 
-    G_asprintf(&file, "%s%s", G_gisbase(), DATUMTABLE);
+    sprintf(file, "%s%s", G_gisbase(), DATUMTABLE);
 
     fd = fopen(file, "r");
     if (!fd) {



More information about the grass-commit mailing list