[GRASS-SVN] r65666 - grass/branches/releasebranch_7_0/lib/manage
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jul 19 12:28:02 PDT 2015
Author: wenzeslaus
Date: 2015-07-19 12:28:02 -0700 (Sun, 19 Jul 2015)
New Revision: 65666
Modified:
grass/branches/releasebranch_7_0/lib/manage/do_remove.c
Log:
backport r65524 and r65525 (use GPATH_MAX instead of a small magic number)
Modified: grass/branches/releasebranch_7_0/lib/manage/do_remove.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/manage/do_remove.c 2015-07-19 19:25:42 UTC (rev 65665)
+++ grass/branches/releasebranch_7_0/lib/manage/do_remove.c 2015-07-19 19:28:02 UTC (rev 65666)
@@ -97,9 +97,9 @@
}
if (G_strcasecmp(list[n].element[0], "cell") == 0) {
- char colr2[50];
+ char colr2[GPATH_MAX];
- sprintf(colr2, "colr2/%s", G_mapset());
+ G_snprintf(colr2, GPATH_MAX, "colr2/%s", G_mapset());
switch (G_remove(colr2, old)) {
case -1:
G_warning(_("Unable to remove %s"), colr2);
More information about the grass-commit
mailing list