chiark / gitweb /
sd-network: fix parameter order for sd_network_monitor_new()
[elogind.git] / src / timesync / timesyncd.c
index 78ef5f72a1910f22f563f54a459b3a4ad9935281..732f5bf6c2843e4724063e819fc6afd76fe62f2f 100644 (file)
@@ -1095,27 +1095,10 @@ int config_parse_servers(
 }
 
 static int manager_parse_config_file(Manager *m) {
-        static const char fn[] = "/etc/systemd/timesyncd.conf";
-        _cleanup_fclose_ FILE *f = NULL;
-        int r;
-
-        assert(m);
-
-        f = fopen(fn, "re");
-        if (!f) {
-                if (errno == ENOENT)
-                        return 0;
-
-                log_warning("Failed to open configuration file %s: %m", fn);
-                return -errno;
-        }
-
-        r = config_parse(NULL, fn, f, "Time\0", config_item_perf_lookup,
-                         (void*) timesyncd_gperf_lookup, false, false, m);
-        if (r < 0)
-                log_warning("Failed to parse configuration file: %s", strerror(-r));
-
-        return r;
+        return config_parse(NULL, "/etc/systemd/timesyncd.conf", NULL,
+                            "Time\0",
+                            config_item_perf_lookup, timesyncd_gperf_lookup,
+                            false, false, true, m);
 }
 
 static bool network_is_online(void) {
@@ -1169,7 +1152,7 @@ static int manager_network_monitor_listen(Manager *m) {
         _cleanup_network_monitor_unref_ sd_network_monitor *monitor = NULL;
         int r, fd, events;
 
-        r = sd_network_monitor_new(NULL, &monitor);
+        r = sd_network_monitor_new(&monitor, NULL);
         if (r < 0)
                 return r;