dtcm: Resolve CID 87822
[oweals/cde.git] / cde / programs / dtcm / server / lexit.c
index 54e94705eeebae30e5a6ced8f55f8041ea6c3533..5c79ed52175236cfd0ce1dad62735d8a9c28a1fc 100644 (file)
@@ -1,3 +1,25 @@
+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with these librararies and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
 /* $TOG: lexit.c /main/5 1998/04/06 13:13:30 mgreess $ */
 /*
  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
@@ -90,7 +112,7 @@ static u_int  sendit_value[255];
 #define TVAL(a,b) { #a,-1, -1, &externTag.tag,b,TAGSVAL }
 #define SVAL(a,b) { #a,-1, -1, &externPrivacy,b,PRIVACYVAL}
 
-#define EMP(a,b) {#a,-1, -1, NULL,NULL,b}
+#define EMP(a,b) {#a,-1, -1, 0, 0,b}
 
 token_data_t tokens[] = {
   PVAL(single, single_4),
@@ -283,7 +305,7 @@ yyylex()
 
       unput_char();
 
-      *ptr = NULL;
+      *ptr = '\0';
 
       externNumberVal=atoi((char *)parse_buffer); 
       return(NUMBER);
@@ -298,7 +320,7 @@ yyylex()
 
        unput_char();
 
-       *ptr = NULL;
+       *ptr = '\0';
 
        if ((bucket = tokens[hash_string((char *) parse_buffer)].first_token)
            == -1) {