summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlho Kim <ilho159.kim@samsung.com>2024-01-29 21:00:20 +0900
committerIlho Kim <ilho159.kim@samsung.com>2024-01-29 21:06:49 +0900
commit39042cd9add0608a16d706f8ecdf11c2cd6bf1e2 (patch)
treeae70cf46e4c73795feb3a8a1e75934c922c750a0
parentd97d7f7cd5672ae731bda4eb04941cb7b4762aec (diff)
downloadapp-installers-39042cd9add0608a16d706f8ecdf11c2cd6bf1e2.tar.gz
app-installers-39042cd9add0608a16d706f8ecdf11c2cd6bf1e2.tar.bz2
app-installers-39042cd9add0608a16d706f8ecdf11c2cd6bf1e2.zip
Fix static analysis issue
Use of auto that causes a copy Change-Id: Id308b78bc42bba876c4f83d85f407ed4e4a0ce1a Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
-rw-r--r--src/common/step/filesystem/step_change_ownership_and_permission.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/step/filesystem/step_change_ownership_and_permission.cc b/src/common/step/filesystem/step_change_ownership_and_permission.cc
index 48be8b61..7b8013c7 100644
--- a/src/common/step/filesystem/step_change_ownership_and_permission.cc
+++ b/src/common/step/filesystem/step_change_ownership_and_permission.cc
@@ -95,7 +95,7 @@ bool GrantDefaultPermissions(bf::path pkg_path, bool skip_symlink) {
}
for (auto& entry :
boost::make_iterator_range(bf::directory_iterator(pkg_path), {})) {
- auto path = entry.path();
+ const auto& path = entry.path();
if (skip_symlink && bf::is_symlink(symlink_status(path)))
continue;
@@ -111,7 +111,7 @@ bool GrantDefaultPermissions(bf::path pkg_path, bool skip_symlink) {
return false;
for (auto& bin_entry :
boost::make_iterator_range(bf::directory_iterator(path), {})) {
- auto bin_path = bin_entry.path();
+ const auto& bin_path = bin_entry.path();
if (bf::is_symlink(symlink_status(bin_path)))
continue;
@@ -128,7 +128,7 @@ bool GrantDefaultPermissions(bf::path pkg_path, bool skip_symlink) {
return false;
for (auto& lib_entry :
boost::make_iterator_range(bf::directory_iterator(path), {})) {
- auto lib_path = lib_entry.path();
+ const auto& lib_path = lib_entry.path();
if (bf::is_symlink(symlink_status(lib_path)))
continue;