dthelp: Change to ANSI function definitions
[oweals/cde.git] / cde / programs / dtmail / dtmail / AntiCheckBoxUiItem.C
index 0b3c8e5a70816e3c1469d6401559390ef150c899..f13697df533e5c75070283268725877b66b47951 100644 (file)
@@ -16,7 +16,7 @@
  * details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * License along with these libraries and programs; if not, write
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
@@ -94,13 +94,12 @@ void AntiCheckBoxUiItem::writeFromSourceToUi()
   //
   // This assumes that a non-null value means that the 
   // value is set and that a non-null means turn on the CB
-  if (strcmp(value, "f") == 0)
+  if (value && strcmp(value, "f") == 0)
     options_checkbox_set_value(w, TRUE, this->dirty_bit);
   else if (value == NULL || strcmp(value, "") == 0)
     options_checkbox_set_value(w, FALSE, this->dirty_bit);
   
-  if (NULL != NULL)
-    free((void*) value);
+  free(value);
 }