dtcm: Resolve CID 87408
[oweals/cde.git] / cde / programs / dtcm / dtcm / blist.c
index 044ba8556ac264f55103013bc34c62ad28503b86..37bcd9031d8074a04a0d710f7160224cd6cd4d3c 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
+ */
 /*******************************************************************************
 **
 **  blist.c
@@ -226,7 +248,7 @@ blist_name_append(Calendar *c, char *name, BlistTag t) {
         bd = (BlistData *)ckalloc(sizeof(BlistData));
         bd->name = cm_strdup(name);
         bd->tag = t;
-        bd->cal_handle = NULL;
+        bd->cal_handle = 0;
         CmDataListAdd(bl->blist_data, (void *)bd, location);
  
         return location;
@@ -268,7 +290,7 @@ blist_addname(Widget widget, XtPointer client_data, XtPointer cbs) {
               ((*(end_ptr - 1) == ' ') || (*(end_ptr - 1) == '\t')))
                end_ptr--;
 
-       *end_ptr = NULL;
+       *end_ptr = '\0';
 
 
        if (blank_buf(new_name)) {
@@ -431,7 +453,7 @@ blist_init_names(Calendar *c) {
        blist_name_append(c, get_char_prop(p, CP_DEFAULTCAL), BLIST_ACTIVE);
 
         namelist = cm_strdup(get_char_prop(p, CP_DAYCALLIST));
-        if (namelist == NULL || *namelist == NULL )
+        if (namelist == NULL || *namelist == '\0' )
                return;
 
        name = strtok(namelist, " ");
@@ -474,7 +496,7 @@ blist_clean(Browselist *bl, Boolean clean_all) {
        cnt = bl->blist_data->count;
        for (i = 1; i <= cnt; i++) {
                bd = (BlistData *)CmDataListGetData(bl->blist_data, left_cnt);
-               if (bd && bd->cal_handle == NULL &&
+               if (bd && bd->cal_handle == 0 &&
                    (clean_all || bd->tag != BLIST_ACTIVE)) {
                        if (bd->name)
                                free(bd->name);