};
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);
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;
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;
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);