pivot-table: Tolerate nulls in pivot_value_clone().
[pspp] / src / output / journal.c
index 5ace0db2164f08206dd9daf6df96da83263e44b9..9cab78805177592a00b0ca92041ab6cf0fc99f92 100644 (file)
@@ -78,7 +78,7 @@ journal_destroy (struct output_driver *driver)
 {
   struct journal_driver *j = journal_driver_cast (driver);
 
-  if ( !j->destroyed)
+  if (!j->destroyed)
     journal_close ();
 
   j->destroyed = true;
@@ -87,7 +87,7 @@ journal_destroy (struct output_driver *driver)
 static void
 journal_output (struct journal_driver *j, const char *s)
 {
-  if ( j->file == NULL)
+  if (j->file == NULL)
     return;
 
   fprintf (j->file, "%s\n", s);
@@ -114,8 +114,7 @@ journal_submit (struct output_driver *driver, const struct output_item *item)
   else if (is_message_item (item))
     {
       const struct message_item *message_item = to_message_item (item);
-      const struct msg *msg = message_item_get_msg (message_item);
-      char *s = msg_to_string (msg, message_item->command_name);
+      char *s = msg_to_string (message_item_get_msg (message_item));
       journal_output (j, s);
       free (s);
     }