update_engine: Fix issues reported by clang-tidy
Fix uninitialized variables and some other minor issues reported by
clang-tidy.
BUG=chromium:982837
TEST=cros_workon_make update_engine --test
Change-Id: I305dedb058c9b0787ba2f68feff42afe6810a276
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2122683
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Tested-by: Andrew Lassalle <andrewlassalle@chromium.org>
Commit-Queue: Andrew Lassalle <andrewlassalle@chromium.org>
diff --git a/common_service.cc b/common_service.cc
index b94e734..347833b 100644
--- a/common_service.cc
+++ b/common_service.cc
@@ -217,7 +217,7 @@
}
bool UpdateEngineService::SetCohortHint(ErrorPtr* error,
- string in_cohort_hint) {
+ const string& in_cohort_hint) {
PrefsInterface* prefs = system_state_->prefs();
// It is ok to override the cohort hint with an invalid value since it is