update_engine: Use portable string format functions.

Replace usage of %zu by PRIuS or calls to std::to_string when possible.
This patch includes other minor linter fixes.

BUG=None
TEST=emerge-link update_engine

Change-Id: I9ff2b3677ed4218a140f9e91a2389cc756941b03
Reviewed-on: https://chromium-review.googlesource.com/293629
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/utils.cc b/utils.cc
index 7777fca..1366a39 100644
--- a/utils.cc
+++ b/utils.cc
@@ -29,6 +29,7 @@
 #include <base/files/file_path.h>
 #include <base/files/file_util.h>
 #include <base/files/scoped_file.h>
+#include <base/format_macros.h>
 #include <base/location.h>
 #include <base/logging.h>
 #include <base/posix/eintr_wrapper.h>
@@ -1518,7 +1519,7 @@
 
 string CalculateP2PFileId(const string& payload_hash, size_t payload_size) {
   string encoded_hash = chromeos::data_encoding::Base64Encode(payload_hash);
-  return base::StringPrintf("cros_update_size_%zu_hash_%s",
+  return base::StringPrintf("cros_update_size_%" PRIuS "_hash_%s",
                             payload_size,
                             encoded_hash.c_str());
 }