struct lttng_bytecode *filter)
{
struct ltt_kernel_event *ev;
- int found = 0;
+ bool found = false;
LTTNG_ASSERT(name);
LTTNG_ASSERT(channel);
continue;
}
}
- found = 1;
+
+ found = true;
break;
}
+
if (found) {
DBG("Found event %s for channel %s", name, channel->channel->name);
return ev;
enum lttng_event_type type)
{
struct ltt_kernel_event *ev;
- int found = 0;
+ bool found = false;
LTTNG_ASSERT(name);
LTTNG_ASSERT(channel);
if (strcmp(name, ev->event->name) != 0) {
continue;
}
- found = 1;
+
+ found = true;
break;
}
+
if (found) {
DBG("Found event %s for channel %s", name, channel->channel->name);
return ev;
const char *leftover = nullptr;
struct lttng_session *sessions = nullptr;
int count;
- int found;
+ bool found;
pc = poptGetContext(nullptr, argc, argv, long_options, 0);
poptReadDefaultConfig(pc, 0);
}
} else {
/* Find the corresponding lttng_session struct */
- found = 0;
+ found = false;
for (i = 0; i < count; i++) {
if (strncmp(sessions[i].name, session_name, NAME_MAX) == 0) {
- found = 1;
+ found = true;
command_ret = clear_session(&sessions[i]);
if (command_ret) {
ERR("%s", lttng_strerror(command_ret));
struct lttng_session *sessions = nullptr;
int count;
- int found;
+ bool found;
pc = poptGetContext(nullptr, argc, argv, long_options, 0);
poptReadDefaultConfig(pc, 0);
}
/* Find the corresponding lttng_session struct */
- found = 0;
+ found = false;
for (i = 0; i < count; i++) {
if (strncmp(sessions[i].name, session_name, NAME_MAX) == 0) {
- found = 1;
+ found = true;
command_ret = destroy_session(&sessions[i]);
if (command_ret) {
success = 0;
const char *arg_cmd_name;
static poptContext pc;
const struct cmd_struct *cmd;
- int found = 0;
+ bool found = false;
const char *cmd_argv[2];
pc = poptGetContext(nullptr, argc, argv, long_options, 0);
while (cmd->name != nullptr) {
if (strcmp(cmd->name, arg_cmd_name) == 0) {
- found = 1;
+ found = true;
break;
}