[GRASS-SVN] r39003 - grass/branches/develbranch_6/lib/sites

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


Author: neteler
Date: 2009-09-05 14:17:29 -0400 (Sat, 05 Sep 2009)
New Revision: 39003

Modified:
   grass/branches/develbranch_6/lib/sites/sites.c
Log:
Use '\0' for NUL, not (char)NULL (merge from trunk, r39002)

Modified: grass/branches/develbranch_6/lib/sites/sites.c
===================================================================
--- grass/branches/develbranch_6/lib/sites/sites.c	2009-09-05 18:13:59 UTC (rev 39002)
+++ grass/branches/develbranch_6/lib/sites/sites.c	2009-09-05 18:17:29 UTC (rev 39003)
@@ -30,7 +30,7 @@
 #define PIPE '|'
 
 #define ispipe(c) (c==PIPE)
-#define isnull(c) (c==(char)NULL)
+#define isnull(c) (c=='\0')
 #define isquote(c) (c==DQUOTE)
 #define isbslash(c) (c==BSLASH)
 
@@ -670,7 +670,7 @@
 	    return EOF;
 
     if (buf[strlen(buf) - 1] == '\n')
-	buf[strlen(buf) - 1] = (char)NULL;
+	buf[strlen(buf) - 1] = '\0';
 
     if (sscanf(buf, "%[^|]|%[^|]|%*[^\n]", ebuf, nbuf) < 2) {
 	fprintf(stderr, "ERROR: ebuf %s nbuf %s\n", ebuf, nbuf);



More information about the grass-commit mailing list