瀏覽代碼

Use '\0' for NUL, not (char)NULL

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39002 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 15 年之前
父節點
當前提交
a1e1e556ef
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/sites/sites.c

+ 2 - 2
lib/sites/sites.c

@@ -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 @@ int G__oldsite_get(FILE * ptr, Site * s, int fmt)
 	    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);