Fix clang-tidy performance warnings in system/security.
* Use const reference type for parameters, local variables,
and for-loop index variables to avoid unnecessary copy.
Bug: 30407689
Bug: 30413223
Bug: 30413862
Change-Id: I3b9383f34e466ca6b5290bad802d535443fd0187
Test: build with WITH_TIDY=1
diff --git a/keystore/keystore_cli.cpp b/keystore/keystore_cli.cpp
index 34f1d9c..bf6f4a0 100644
--- a/keystore/keystore_cli.cpp
+++ b/keystore/keystore_cli.cpp
@@ -176,7 +176,7 @@
} \
} while (0)
-static int list(sp<IKeystoreService> service, const String16& name, int uid) {
+static int list(const sp<IKeystoreService>& service, const String16& name, int uid) {
Vector<String16> matches;
int32_t ret = service->list(name, uid, &matches);
if (ret < 0) {