liblttng-ust: exit loop early on event enabler match
[lttng-ust.git] / liblttng-ust / lttng-events.c
index 047759b796a8a91ddac3f83a46148273ff829581..f68ce323690ae2eba56bed6fae375e7490cc926d 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.023092 seconds and 4 git commands to generate.