goto out;
}
- r = sd_network_monitor_new(NULL, &m->monitor);
+ r = sd_network_monitor_new(&m->monitor, NULL);
if (r < 0) {
log_error("Could not create monitor: %s", strerror(-r));
goto out;
return (sd_network_monitor*) (unsigned long) (fd + 1);
}
-_public_ int sd_network_monitor_new(const char *category, sd_network_monitor **m) {
+_public_ int sd_network_monitor_new(sd_network_monitor **m, const char *category) {
int fd, k;
bool good = false;
assert(m);
- r = sd_network_monitor_new(NULL, &m->network_monitor);
+ r = sd_network_monitor_new(&m->network_monitor, NULL);
if (r < 0)
return r;
typedef struct sd_network_monitor sd_network_monitor;
/* Create a new monitor. Category must be NULL, "links" or "leases". */
-int sd_network_monitor_new(const char *category, sd_network_monitor **ret);
+int sd_network_monitor_new(sd_network_monitor **ret, const char *category);
/* Destroys the passed monitor. Returns NULL. */
sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *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;