X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=tests%2Funit%2Ftest_payload.cpp;h=419fc893d23796609aac808dc153c78f2e8551a2;hb=refs%2Fheads%2Fmaster;hp=2d1e016964461f9c800c574c697ca83e90c6e9c3;hpb=cd9adb8b829564212158943a0d279bb35322ab30;p=lttng-tools.git diff --git a/tests/unit/test_payload.cpp b/tests/unit/test_payload.cpp index 2d1e01696..9b9f77046 100644 --- a/tests/unit/test_payload.cpp +++ b/tests/unit/test_payload.cpp @@ -5,10 +5,10 @@ * */ -#include #include #include +#include #include #include @@ -29,7 +29,7 @@ static void test_fd_push_pop_order() diag("Validating fd push/pop order"); for (i = 0; i < 3; i++) { - int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0); + const int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0); struct fd_handle *handle; LTTNG_ASSERT(fd >= 0); @@ -77,7 +77,7 @@ static void test_fd_push_pop_imbalance() diag("Validating fd pop imbalance"); for (i = 0; i < 10; i++) { struct fd_handle *handle; - int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0); + const int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0); LTTNG_ASSERT(fd >= 0); @@ -118,7 +118,7 @@ fail: static void test_fd_pop_fd_root_views() { int ret, i; - int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0); + const int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0); struct fd_handle *handle; struct lttng_payload payload; const char *const test_description =