[GRASS-SVN] r59318 - grass/trunk/lib/db/dbmi_base

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Mar 24 12:39:12 PDT 2014


Author: martinl
Date: 2014-03-24 12:39:11 -0700 (Mon, 24 Mar 2014)
New Revision: 59318

Modified:
   grass/trunk/lib/db/dbmi_base/login.c
Log:
dbmilib: use G_config_path() in db_set_login()

Modified: grass/trunk/lib/db/dbmi_base/login.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/login.c	2014-03-24 19:38:32 UTC (rev 59317)
+++ grass/trunk/lib/db/dbmi_base/login.c	2014-03-24 19:39:11 UTC (rev 59318)
@@ -42,8 +42,8 @@
     static char *file;
 
     if (!file) {
-	file = (char *)malloc(1000);
-	sprintf(file, "%s/%s/dblogin", G_home(), CONFIG_DIR);
+	file = (char *)db_malloc(GPATH_MAX);
+	sprintf(file, "%s/dblogin", G_config_path());
     }
     return file;
 }



More information about the grass-commit mailing list