dtcm: Resolve CID 87408
[oweals/cde.git] / cde / programs / dtcm / dtcm / dtcm_editor.c
index aff27270f17050d32d50983a9667e0d020357216..5e6b7465481c629f24f196b9a9716e7f9484b30c 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: dtcm_editor.c /main/14 1999/09/20 10:32:17 mgreess $ */
 /*
  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
@@ -222,22 +244,22 @@ GetIcon(DTCM_editor *de)
         Window          window = XtWindow(calendar->frame);
         unsigned char  *bitmapData, *bitmapMask;
  
-        if (de->drag_bitmap == NULL) {
+        if (de->drag_bitmap == 0) {
                 de->drag_bitmap = XCreateBitmapFromData(display,
                         window, (char *) drag_xbm_bits,
                         drag_xbm_width, drag_xbm_height);
-                if (de->drag_bitmap == NULL) {
+                if (de->drag_bitmap == 0) {
 
-                        printf(catgets(calendar->DT_catd, 1, 237, "XCreateBitmapFromData() failed for bitmap.\n"));
+                        printf("%s", catgets(calendar->DT_catd, 1, 237, "XCreateBitmapFromData() failed for bitmap.\n"));
                         return;
                 }
         }
-        if (de->drag_mask == NULL) {
+        if (de->drag_mask == 0) {
                 de->drag_mask = XCreateBitmapFromData(display,
                         window, (char *) drag_mask_xbm_bits,
                         drag_mask_xbm_width, drag_mask_xbm_height);
-                if (de->drag_mask == NULL) {
-                        printf(catgets(calendar->DT_catd, 1, 238, "XCreateBitmapFromData() failed for mask.\n"));
+                if (de->drag_mask == 0) {
+                        printf("%s", catgets(calendar->DT_catd, 1, 238, "XCreateBitmapFromData() failed for mask.\n"));
                         return;
                 }
         }
@@ -372,7 +394,7 @@ StandaloneApptDragStart(
                NULL)
             == NULL) {
  
-                printf(catgets(c->DT_catd, 1, 239, "DragStart returned NULL.\n"));
+                printf("%s", catgets(c->DT_catd, 1, 239, "DragStart returned NULL.\n"));
         }
 }