X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Funit%2Ftest_utils_compat_poll.c;h=2581f57dda1480bb04bc16238049b9f2750c3dd4;hb=a0377dfefe40662ba7d68617bce6ff467114136c;hp=436af5f6f24e1c57ef77fbbc973205cb86d9441c;hpb=efeeaae1cb3adc782fcd9b9908195f6305ee1f00;p=lttng-tools.git diff --git a/tests/unit/test_utils_compat_poll.c b/tests/unit/test_utils_compat_poll.c index 436af5f6f..2581f57dd 100644 --- a/tests/unit/test_utils_compat_poll.c +++ b/tests/unit/test_utils_compat_poll.c @@ -9,7 +9,6 @@ * */ -#include #include #include #include @@ -238,16 +237,18 @@ static int run_active_set_combination(unsigned int fd_count, /* Write one byte for all active fds that should be active. */ for (i = 0; i < fd_count; i++) { - struct lttng_pipe *pipe; + struct lttng_pipe *borrowed_pipe; /* Should this fd be made active? */ if (!(active_fds_mask & (1 << i))) { continue; } - pipe = lttng_dynamic_pointer_array_get_pointer(&pipes, i); + borrowed_pipe = lttng_dynamic_pointer_array_get_pointer( + &pipes, i); - ret = lttng_pipe_write(pipe, &(char) {'a'}, sizeof(char)); + ret = lttng_pipe_write( + borrowed_pipe, &(char){'a'}, sizeof(char)); if (ret != sizeof(char)) { diag("Failed to write to pipe"); ret = -1; @@ -278,7 +279,7 @@ static void test_active_set_combinations(unsigned int fd_count) unsigned int i, all_active_mask = 0; /* Do you really want to test more than 4,294,967,295 combinations? */ - assert(fd_count <= 32); + LTTNG_ASSERT(fd_count <= 32); for (i = 0; i < fd_count; i++) { all_active_mask |= (1 << i);