[GRASS-SVN] r39017 - grass/branches/develbranch_6/gem

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


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

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

Modified: grass/branches/develbranch_6/gem/tools.c
===================================================================
--- grass/branches/develbranch_6/gem/tools.c	2009-09-05 18:38:35 UTC (rev 39016)
+++ grass/branches/develbranch_6/gem/tools.c	2009-09-05 18:40:16 UTC (rev 39017)
@@ -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