Revert "lttng-ctl: Hide symbol introduced by fix"
[lttng-tools.git] / tests / unit / test_fd_tracker.cpp
index 9e40c83c2ab5499893a8139f74468b4b014d4730..b9924e3bcebd8a6868d25910c54e0b712a175d66 100644 (file)
@@ -167,8 +167,8 @@ static void untrack_std_fds(struct fd_tracker *tracker)
        };
 
        for (i = 0; i < sizeof(files) / sizeof(*files); i++) {
-               int fd = files[i].fd;
-               int ret = fd_tracker_close_unsuspendable_fd(
+               const int fd = files[i].fd;
+               const int ret = fd_tracker_close_unsuspendable_fd(
                        tracker, &files[i].fd, 1, noop_close, nullptr);
 
                ok(ret == 0, "Untrack unsuspendable fd %d (%s)", fd, files[i].name);
@@ -299,7 +299,7 @@ static int open_pipes(void *data __attribute__((unused)), int *out_fds)
        const unsigned int pipe_count = TRACKER_FD_LIMIT / 2;
 
        for (i = 0; i < pipe_count; i++) {
-               int ret = pipe(&out_fds[i * 2]);
+               const int ret = pipe(&out_fds[i * 2]);
 
                if (ret) {
                        return -errno;
@@ -314,7 +314,7 @@ static int close_pipes(void *data __attribute__((unused)), int *fds)
        int *pipes = fds;
 
        for (i = 0; i < TRACKER_FD_LIMIT; i++) {
-               int ret = close(pipes[i]);
+               const int ret = close(pipes[i]);
 
                if (ret) {
                        return -errno;
@@ -704,7 +704,7 @@ skip_write:
                        break;
                }
 
-               if (strcmp(file_contents, read_buf)) {
+               if (strcmp(file_contents, read_buf) != 0) {
                        content_ok = false;
                        diag("File content doesn't match the expectated string");
                        (void) close(fd);
This page took 0.038541 seconds and 4 git commands to generate.