output: Modernize how drivers are initialized.
[pspp] / src / output / journal.c
index a07fd4a094fdc1f213e82c67f965f14eb570973a..f708e6d787cb40b9090af06e552a6b79c9892dbd 100644 (file)
@@ -140,16 +140,16 @@ static const struct output_driver_class journal_class =
 void
 journal_init (void)
 {
-  /* Create journal driver. */
-  output_driver_init (&journal.driver, &journal_class, "journal",
-                     SETTINGS_DEVICE_UNFILTERED);
-  journal.file = NULL;
+  journal = (struct journal_driver) {
+    .driver = {
+      .class = &journal_class,
+      .name = xstrdup ("journal"),
+      .device_type = SETTINGS_DEVICE_UNFILTERED,
+    }
+  };
 
-  /* Register journal driver. */
   output_driver_register (&journal.driver);
-
   journal_enable ();
-  journal.destroyed = false;
 }
 
 /* Disables journaling. */