liblttng-ust: exit loop early on event enabler match
[lttng-ust.git] / liblttng-ust / lttng-events.c
index 7afee7fc4043ac58a1be6a46df6852a93e10882c..9ee91ae355e442f7b06bcac54d82018ac1d637db 100644 (file)
@@ -764,8 +764,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.027651 seconds and 4 git commands to generate.