dtcm: Resolve CID 87408
[oweals/cde.git] / cde / programs / dtcm / dtcm / todo.c
index 150abc89cb5dbe935a6af473f52302927acad4c9..05eb0aec07e833af188da89396bfd4ad63eca75c 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: todo.c /main/12 1999/07/01 09:24:05 mgreess $ */
 /*
  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
@@ -2202,7 +2224,7 @@ build_todo_view(ToDo *t, Glance glance, Boolean redisplay) {
                                XmNvalueChangedCallback, t_view_change_proc, t);
 
                        step->next = NULL;
-                       step->appt = NULL;
+                       step->appt = 0;
                        if (last) {
                                XtVaSetValues(step->view_item_number,
                                        XmNtopAttachment, XmATTACH_WIDGET,
@@ -2219,7 +2241,7 @@ build_todo_view(ToDo *t, Glance glance, Boolean redisplay) {
                        XtManageChild(step->view_item_number);
                        XtManageChild(step->view_item_toggle);
                }
-               if (step->appt != NULL)
+               if (step->appt != 0)
                        csa_free((CSA_buffer) step->appt);
                step->appt = entry_list[cnt - 1];
                step->modified = False;
@@ -2272,7 +2294,7 @@ build_todo_view(ToDo *t, Glance glance, Boolean redisplay) {
        **  possibly filled with old stuff -- unmanage these widgets.
        */
        while (step) {
-               if (step->appt != NULL)
+               if (step->appt != 0)
                        csa_free((CSA_buffer) step->appt);
                XtUnmanageChild(step->view_item_number);
                XtUnmanageChild(step->view_item_toggle);
@@ -2461,7 +2483,7 @@ todo_insert(Dtcm_appointment *appt, CSA_entry_handle *new_a, Calendar *c) {
                 * occurred.
                 */
                _DtTurnOffHourGlass(t->frame);
-               return;
+               return 0;
        case 4:
        default:
                /*
@@ -2479,7 +2501,7 @@ todo_insert(Dtcm_appointment *appt, CSA_entry_handle *new_a, Calendar *c) {
 
        if (stat != CSA_SUCCESS) {
                _DtTurnOffHourGlass(t->frame);
-               return;
+               return 0;
        }
        csa_free((CSA_buffer) new_a);