[GRASS-SVN] r39004 - grass/branches/releasebranch_6_4/lib/sites

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


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

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

Modified: grass/branches/releasebranch_6_4/lib/sites/sites.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/sites/sites.c	2009-09-05 18:17:29 UTC (rev 39003)
+++ grass/branches/releasebranch_6_4/lib/sites/sites.c	2009-09-05 18:17:40 UTC (rev 39004)
@@ -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