X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-events.c;h=9b2d3c649ac1b695e8d1136af11e12797b5053bc;hb=43eeccf8257eb07301bab9814f2c9fadbfd9b2ff;hp=7afee7fc4043ac58a1be6a46df6852a93e10882c;hpb=8306baea3da8b1f429e14218b1ef7413ee56ed19;p=lttng-ust.git diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index 7afee7fc..9b2d3c64 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -744,7 +744,8 @@ void lttng_create_event_if_missing(struct lttng_enabler *enabler) */ cds_list_for_each_entry(probe_desc, probe_list, head) { for (i = 0; i < probe_desc->nr_events; i++) { - int found = 0, ret; + int ret; + bool found = false; struct cds_hlist_head *head; struct cds_hlist_node *node; const char *event_name; @@ -764,8 +765,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) - found = 1; + && event->chan == enabler->chan) { + found = true; + break; + } } if (found) continue;