figure out frequency table structure
[pspp] / src / output / msglog.c
index f91c7e61176bece6167d5c0ab9a983df916388f2..20cfe3a3b2a74384b9073a64bf8ea3daf9881189 100644 (file)
@@ -57,7 +57,6 @@ struct output_driver *
 msglog_create (const char *file_name)
 {
   enum settings_output_devices type;
-  struct msglog_driver *ml;
   FILE *file;
 
   struct file_handle *handle = fh_create_file  (NULL, file_name, NULL, fh_default_properties ());
@@ -73,7 +72,7 @@ msglog_create (const char *file_name)
           ? SETTINGS_DEVICE_TERMINAL
           : SETTINGS_DEVICE_UNFILTERED);
 
-  ml = xzalloc (sizeof *ml);
+  struct msglog_driver *ml = XZALLOC (struct msglog_driver);
   ml->handle = handle;
   output_driver_init (&ml->driver, &msglog_class, file_name, type);
   ml->file = file;
@@ -108,8 +107,7 @@ msglog_submit (struct output_driver *driver, const struct output_item *item)
 
 static const struct output_driver_class msglog_class =
   {
-    "msglog",
-    msglog_destroy,
-    msglog_submit,
-    NULL
+    .name = "msglog",
+    .destroy = msglog_destroy,
+    .submit = msglog_submit,
   };