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.h b/common_service.h
index a74c46b..6c742a5 100644
--- a/common_service.h
+++ b/common_service.h
@@ -109,7 +109,8 @@
   // Sets the current "cohort hint" value to |in_cohort_hint|. The cohort hint
   // is sent back to Omaha on every request and can be used as a hint of what
   // cohort should we be put on.
-  bool SetCohortHint(brillo::ErrorPtr* error, std::string in_cohort_hint);
+  bool SetCohortHint(brillo::ErrorPtr* error,
+                     const std::string& in_cohort_hint);
 
   // Return the current cohort hint. This value can be set with SetCohortHint()
   // and can also be updated from Omaha on every update check request.