chiark / gitweb /
api: in constructor function calls, always put the returned object pointer first...
[elogind.git] / src / login / logind-button.c
index e29f2c4c5f072f3af5740b1de50135af2d4b2f93..80236c40c1e8bd36f04cac5b04f366414d34da81 100644 (file)
@@ -222,7 +222,7 @@ int button_open(Button *b) {
                 goto fail;
         }
 
-        r = sd_event_add_io(b->manager->event, b->fd, EPOLLIN, button_dispatch, b, &b->event_source);
+        r = sd_event_add_io(b->manager->event, &b->event_source, b->fd, EPOLLIN, button_dispatch, b);
         if (r < 0) {
                 log_error("Failed to add button event: %s", strerror(-r));
                 goto fail;