commit | a1b644e88cfe5319e9ada7ad24e6cd215a7ea402 | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Tue Dec 11 11:09:20 2018 -0800 |
committer | Chih-hung Hsieh <chh@google.com> | Mon Dec 17 20:00:55 2018 +0000 |
tree | e4b24972d2c59b6512cd981b3edf78b03f7c1add | |
parent | d0c404cb21de6e86329b5ceb79d1459dd8f2f4cb [diff] [blame] |
Fix performance-for-range-copy warnings Bug: 30413223 Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance* Change-Id: Ie481e88025a7a1f3abde8ff63420d5ccd8577e52
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index 01105ba..2e6b1b9 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -414,7 +414,7 @@ } endmntent(fp); - for (auto path : toUnmount) { + for (const auto& path : toUnmount) { if (umount2(path.c_str(), MNT_DETACH)) { ALOGW("Failed to unmount %s: %s", path.c_str(), strerror(errno)); }