clang-tidy: apply suggested fixes
[lttng-tools.git] / src / common / compat / directory-handle.cpp
index 157e9d4c24e0abd0b656d564d9623a2bad9f2f7f..afa6c9f09f2ac0ded8a7a6ab722580b5d424d59a 100644 (file)
@@ -318,7 +318,7 @@ static DIR *lttng_directory_handle_opendir(const struct lttng_directory_handle *
                                           const char *path)
 {
        DIR *dir_stream = nullptr;
-       int fd = openat(handle->dirfd, path, O_RDONLY);
+       const int fd = openat(handle->dirfd, path, O_RDONLY);
 
        if (fd < 0) {
                goto end;
@@ -343,7 +343,7 @@ end:
 static int lttng_directory_handle_rmdir(const struct lttng_directory_handle *handle,
                                        const char *name)
 {
-       int ret = unlinkat(handle->dirfd, name, AT_REMOVEDIR);
+       const int ret = unlinkat(handle->dirfd, name, AT_REMOVEDIR);
        if (ret) {
                PERROR("Failed to remove directory `%s`", name);
        }
This page took 0.025579 seconds and 4 git commands to generate.