X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fmsglog.c;h=ef2cf6b007deef169f6481b32ef7d5c80352479c;hb=db9a44802bb9fde4d4acd1b11572493b82193ab0;hp=0d0329571045daa79b48190e3a22b1600250f9c7;hpb=d6cbbc8d634fa91f050661355139a4e4697e99ab;p=pspp diff --git a/src/output/msglog.c b/src/output/msglog.c index 0d03295710..ef2cf6b007 100644 --- a/src/output/msglog.c +++ b/src/output/msglog.c @@ -42,7 +42,6 @@ struct msglog_driver struct output_driver driver; FILE *file; struct file_handle *handle; - char *command_name; }; static const struct output_driver_class msglog_class; @@ -78,7 +77,6 @@ msglog_create (const char *file_name) ml->handle = handle; output_driver_init (&ml->driver, &msglog_class, file_name, type); ml->file = file; - ml->command_name = NULL; output_driver_register (&ml->driver); @@ -91,7 +89,6 @@ msglog_destroy (struct output_driver *driver) struct msglog_driver *ml = msglog_driver_cast (driver); fn_close (ml->handle, ml->file); - free (ml->command_name); fh_unref (ml->handle); free (ml); } @@ -101,13 +98,10 @@ msglog_submit (struct output_driver *driver, const struct output_item *item) { struct msglog_driver *ml = msglog_driver_cast (driver); - output_driver_track_current_command (item, &ml->command_name); - 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, ml->command_name); + char *s = msg_to_string (message_item_get_msg (message_item)); fprintf (ml->file, "%s\n", s); free (s); }