[GRASS-SVN] r39002 - grass/trunk/lib/sites

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 5 14:13:59 EDT 2009


Author: glynn
Date: 2009-09-05 14:13:59 -0400 (Sat, 05 Sep 2009)
New Revision: 39002

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


Modified: grass/trunk/lib/sites/sites.c
===================================================================
--- grass/trunk/lib/sites/sites.c	2009-09-05 18:11:56 UTC (rev 39001)
+++ grass/trunk/lib/sites/sites.c	2009-09-05 18:13:59 UTC (rev 39002)
@@ -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)
 
@@ -618,7 +618,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