dtmail: resolve 'deference before null check' errors related to if(!NULL) checks...
[oweals/cde.git] / cde / programs / dtmail / dtmailpr / message.C
index fcb98d78698fad81a2696b2293ab85b9e95bc80d..314b34de8156681e9f34729a3a05f279131cbb23 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: message.C /main/9 1998/07/24 16:08:20 mgreess $
  *
  * (c) Copyright 1996 Digital Equipment Corporation.
@@ -275,8 +297,7 @@ DmxMsg::display (void)
          strcpy(v3_cs, "DEFAULT");
          strcat(v3_cs, ".");
          strcat(v3_cs, ret);
-         if (ret)
-                free(ret);
+         free(ret);
    }
 
 // Get iconv from and to codeset and do conversion.
@@ -395,7 +416,7 @@ DmxMsg::display (void)
                        name = "(name)";
 
                printf ("[%d] \"%s\"%s, ", i, name, description);
-               printf ("%s, %d bytes\n", type, length);
+               printf ("%s, %lu bytes\n", type, length);
 
                if (attbuf != NULL)
                        delete [] attbuf;