X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fchannel.cpp;fp=src%2Fbin%2Flttng-sessiond%2Fchannel.cpp;h=fc2da6ab8ba5e94939c181c223d239ee6c75a6cc;hp=2e7ed527d39d3d9c7564cb06fbd14c441a4fe58a;hb=66cefebdc240cbae0bc79594305f509b0779fa98;hpb=ff01a57416330247403e58bf4e28d4771a46ce35 diff --git a/src/bin/lttng-sessiond/channel.cpp b/src/bin/lttng-sessiond/channel.cpp index 2e7ed527d..fc2da6ab8 100644 --- a/src/bin/lttng-sessiond/channel.cpp +++ b/src/bin/lttng-sessiond/channel.cpp @@ -145,7 +145,7 @@ int channel_kernel_disable(struct ltt_kernel_session *ksession, char *channel_na } /* Only if channel is enabled disable it. */ - if (kchan->enabled == 1) { + if (kchan->enabled) { ret = kernel_disable_channel(kchan); if (ret < 0 && ret != -EEXIST) { ret = LTTNG_ERR_KERN_CHAN_DISABLE_FAIL; @@ -170,7 +170,7 @@ enum lttng_error_code channel_kernel_enable(struct ltt_kernel_session *ksession, LTTNG_ASSERT(ksession); LTTNG_ASSERT(kchan); - if (kchan->enabled == 0) { + if (!kchan->enabled) { if (kernel_enable_channel(kchan) < 0) { ret_code = LTTNG_ERR_KERN_CHAN_ENABLE_FAIL; goto error; @@ -284,7 +284,7 @@ enum lttng_error_code channel_ust_enable(struct ltt_ust_session *usess, ret_code = LTTNG_ERR_UST_CHAN_EXIST; goto end; } else { - uchan->enabled = 1; + uchan->enabled = true; DBG2("Channel %s enabled successfully", uchan->name); } @@ -425,7 +425,7 @@ enum lttng_error_code channel_ust_create(struct ltt_ust_session *usess, goto error; } - uchan->enabled = 1; + uchan->enabled = true; if (trace_ust_is_max_id(usess->used_channel_id)) { ret_code = LTTNG_ERR_UST_CHAN_FAIL; goto error; @@ -501,12 +501,12 @@ int channel_ust_disable(struct ltt_ust_session *usess, struct ltt_ust_channel *u LTTNG_ASSERT(uchan); /* Already disabled */ - if (uchan->enabled == 0) { + if (!uchan->enabled) { DBG2("Channel UST %s already disabled", uchan->name); goto end; } - uchan->enabled = 0; + uchan->enabled = false; /* * If session is inactive we don't notify the tracer right away. We