Use compiler-agnostic defines to silence warning
[lttng-tools.git] / tests / unit / test_relayd_backward_compat_group_by_session.cpp
index 11ba8b032ed5207cbc8f0d58812a1e68c282a27d..7c63da872e212f6ef026822fb2720a7fc9c1b901 100644 (file)
@@ -175,7 +175,7 @@ end:
 int main()
 {
        int i;
-       int num_test = sizeof(tests) / sizeof(struct test);
+       const int num_test = sizeof(tests) / sizeof(struct test);
        const time_t test_time = time(nullptr);
 
        plan_tests(NUM_TESTS_PER_TEST * num_test);
@@ -201,7 +201,7 @@ int main()
                if (!result && tests[i].is_valid) {
                        fprintf(stderr, "Failed to get result\n");
                        goto loop;
-               } else if (!result && tests[i].is_valid == false) {
+               } else if (!result && !tests[i].is_valid) {
                        pass("Returned null as expected");
                        goto loop;
                }
This page took 0.023605 seconds and 4 git commands to generate.