liblttng-ust: exit loop early on event enabler match
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 6 Dec 2019 22:49:35 +0000 (17:49 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 13 Feb 2020 17:17:52 +0000 (12:17 -0500)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I0fa3215f7cd6a2d32ac00d66cf5fc184abd14612

liblttng-ust/lttng-events.c

index 255c4b953f9055141e72fae3449c37da5e56cb6b..19fba81c0f6020fffa3291f4154d36320e40e57a 100644 (file)
@@ -766,8 +766,10 @@ void lttng_create_event_if_missing(struct lttng_enabler *enabler)
                        head = &session->events_ht.table[hash & (LTTNG_UST_EVENT_HT_SIZE - 1)];
                        cds_hlist_for_each_entry(event, node, head, hlist) {
                                if (event->desc == desc
-                                               && event->chan == enabler->chan)
+                                               && event->chan == enabler->chan) {
                                        found = 1;
+                                       break;
+                               }
                        }
                        if (found)
                                continue;
This page took 0.025835 seconds and 4 git commands to generate.