[GRASS-SVN] r39018 - grass/branches/releasebranch_6_4/gem

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 5 14:40:24 EDT 2009


Author: neteler
Date: 2009-09-05 14:40:23 -0400 (Sat, 05 Sep 2009)
New Revision: 39018

Modified:
   grass/branches/releasebranch_6_4/gem/tools.c
Log:
Fix undefined comparison of pointer to string literal (merge from trunk, r39014)

Modified: grass/branches/releasebranch_6_4/gem/tools.c
===================================================================
--- grass/branches/releasebranch_6_4/gem/tools.c	2009-09-05 18:40:16 UTC (rev 39017)
+++ grass/branches/releasebranch_6_4/gem/tools.c	2009-09-05 18:40:23 UTC (rev 39018)
@@ -53,7 +53,7 @@
 	if ((backup != NULL) && (element != NULL)) {
 	    free(backup);
 	}
-	if ((element != NULL) && (element != "")) {
+	if ((element != NULL) && (*element != '\0')) {
 	    backup = strdup(element);
 	}
     }



More information about the grass-commit mailing list