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/p2p_manager_unittest.cc b/p2p_manager_unittest.cc
index 3223724..262031f 100644
--- a/p2p_manager_unittest.cc
+++ b/p2p_manager_unittest.cc
@@ -35,7 +35,7 @@
// temporary p2p dir) for P2PManager and cleans up when the test is
// done.
class P2PManagerTest : public testing::Test {
-protected:
+ protected:
P2PManagerTest() {}
virtual ~P2PManagerTest() {}
@@ -100,7 +100,7 @@
scoped_ptr<policy::MockDevicePolicy> device_policy(
new policy::MockDevicePolicy());
EXPECT_CALL(*device_policy, GetAuP2PEnabled(testing::_)).WillRepeatedly(
- DoAll(testing::SetArgumentPointee<0>(bool(true)),
+ DoAll(testing::SetArgumentPointee<0>(true),
testing::Return(true)));
manager->SetDevicePolicy(device_policy.get());
EXPECT_TRUE(manager->IsP2PEnabled());
@@ -126,7 +126,7 @@
scoped_ptr<policy::MockDevicePolicy> device_policy(
new policy::MockDevicePolicy());
EXPECT_CALL(*device_policy, GetAuP2PEnabled(testing::_)).WillRepeatedly(
- DoAll(testing::SetArgumentPointee<0>(bool(false)),
+ DoAll(testing::SetArgumentPointee<0>(false),
testing::Return(true)));
manager->SetDevicePolicy(device_policy.get());
EXPECT_FALSE(manager->IsP2PEnabled());
@@ -243,7 +243,7 @@
return false;
}
char* endp = NULL;
- long long int val = strtoll(ea_value, &endp, 0);
+ long long int val = strtoll(ea_value, &endp, 0); // NOLINT(runtime/int)
if (endp == NULL || *endp != '\0') {
LOG(ERROR) << "Error parsing xattr '" << ea_value
<< "' as an integer";
@@ -477,4 +477,4 @@
g_main_loop_unref(loop);
}
-} // namespace chromeos_update_engine
+} // namespace chromeos_update_engine