update_engine: fixed warnings from cpplint
Fixed all the cpplint warnings in update engine.
BUG=None
TEST=Unit tests still pass.
Change-Id: I285ae858eec8abe0b26ff203b99a42a200ceb71c
Reviewed-on: https://chromium-review.googlesource.com/204027
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/update_engine_client.cc b/update_engine_client.cc
index 7406b65..516895a 100644
--- a/update_engine_client.cc
+++ b/update_engine_client.cc
@@ -194,7 +194,7 @@
G_TYPE_STRING,
G_TYPE_INT64,
G_TYPE_INVALID);
- GMainLoop* loop = g_main_loop_new (NULL, TRUE);
+ GMainLoop* loop = g_main_loop_new(NULL, TRUE);
dbus_g_proxy_connect_signal(proxy,
kStatusUpdate,
G_CALLBACK(StatusUpdateSignalHandler),
@@ -393,10 +393,10 @@
}
// This is similar to watching for updates but rather than registering
-// a signal watch, activelly poll the daemon just in case it stops
+// a signal watch, actively poll the daemon just in case it stops
// sending notifications.
void CompleteUpdate() {
- GMainLoop* loop = g_main_loop_new (NULL, TRUE);
+ GMainLoop* loop = g_main_loop_new(NULL, TRUE);
g_timeout_add_seconds(5, CompleteUpdateSource, NULL);
g_main_loop_run(loop);
g_main_loop_unref(loop);
@@ -529,7 +529,7 @@
return ret;
}
-} // namespace {}
+} // namespace
int main(int argc, char** argv) {
// Boilerplate init commands.
@@ -591,9 +591,9 @@
if (rollback_partition.empty()) {
rollback_partition = "UNAVAILABLE";
can_rollback = false;
- }
- else
+ } else {
rollback_partition = "AVAILABLE: " + rollback_partition;
+ }
LOG(INFO) << "Rollback partition: " << rollback_partition;
if (!can_rollback) {
@@ -633,7 +633,7 @@
return 1;
}
- if(FLAGS_rollback) {
+ if (FLAGS_rollback) {
LOG(INFO) << "Requesting rollback.";
CHECK(Rollback(FLAGS_powerwash)) << "Request for rollback failed.";
}
@@ -654,8 +654,7 @@
// These final options are all mutually exclusive with one another.
if (FLAGS_follow + FLAGS_watch_for_updates + FLAGS_reboot +
FLAGS_status + FLAGS_is_reboot_needed +
- FLAGS_block_until_reboot_is_needed > 1)
- {
+ FLAGS_block_until_reboot_is_needed > 1) {
LOG(ERROR) << "Multiple exclusive options selected. "
<< "Select only one of --follow, --watch_for_updates, --reboot, "
<< "--is_reboot_needed, --block_until_reboot_is_needed, "