Clean-up: replace uses of `int found` as bool by `bool found`
[lttng-tools.git] / src / bin / lttng / commands / clear.cpp
index f26e6e5b998445a0c973a60dc3eb5eed2f5997f1..1637cf240360da58c3a66f0de0291523631fc78b 100644 (file)
@@ -156,7 +156,7 @@ int cmd_clear(int argc, const char **argv)
        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);
@@ -251,10 +251,10 @@ int cmd_clear(int argc, const char **argv)
                }
        } 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));
This page took 0.023097 seconds and 4 git commands to generate.