chiark / gitweb /
api: in constructor function calls, always put the returned object pointer first...
[elogind.git] / src / core / scope.c
index 940e40dda78076d575bea7abf9496894ee00df02..16758fed0a2c27cbc15a3913d8d23c2a8c810aca 100644 (file)
@@ -88,7 +88,7 @@ static int scope_arm_timer(Scope *s) {
                 return sd_event_source_set_enabled(s->timer_event_source, SD_EVENT_ONESHOT);
         }
 
-        return sd_event_add_monotonic(UNIT(s)->manager->event, now(CLOCK_MONOTONIC) + s->timeout_stop_usec, 0, scope_dispatch_timer, s, &s->timer_event_source);
+        return sd_event_add_monotonic(UNIT(s)->manager->event, &s->timer_event_source, now(CLOCK_MONOTONIC) + s->timeout_stop_usec, 0, scope_dispatch_timer, s);
 }
 
 static void scope_set_state(Scope *s, ScopeState state) {