]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tevent: Move the code below the trigger check
authorPavel Filipenský <pfilipen@redhat.com>
Wed, 30 Mar 2022 13:59:51 +0000 (15:59 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 11 Apr 2022 16:56:35 +0000 (16:56 +0000)
This makes the next commit smaller.

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/tevent/tevent_queue.c

index 9c3973b731e5afc9f94962af5ae28e8482ce92e9..070329b878cad0f93a8806899a49a20e7387e531 100644 (file)
@@ -164,12 +164,6 @@ static struct tevent_queue_entry *tevent_queue_add_internal(
                return NULL;
        }
 
-       e->queue = queue;
-       e->req = req;
-       e->ev = ev;
-       e->trigger = trigger;
-       e->private_data = private_data;
-
        /*
         * if there is no trigger, it is just a blocker
         */
@@ -177,6 +171,12 @@ static struct tevent_queue_entry *tevent_queue_add_internal(
                e->triggered = true;
        }
 
+       e->queue = queue;
+       e->req = req;
+       e->ev = ev;
+       e->trigger = trigger;
+       e->private_data = private_data;
+
        if (queue->length > 0) {
                /*
                 * if there are already entries in the