Index: tools/battor_agent/battor_agent_bin.cc |
diff --git a/tools/battor_agent/battor_agent_bin.cc b/tools/battor_agent/battor_agent_bin.cc |
index 26c855c6e870107755917d4f2e70524799f53ce0..5843ae906b10f6e3f97aaf7075808cda945e38ef 100644 |
--- a/tools/battor_agent/battor_agent_bin.cc |
+++ b/tools/battor_agent/battor_agent_bin.cc |
@@ -49,7 +49,7 @@ void PrintSupportsExplicitClockSync() { |
std::string GetArg(int argnum, int argc, char* argv[]) { |
if (argnum >= argc) { |
PrintUsage(); |
- PLOG(FATAL); |
+ exit(1); |
} |
return argv[argnum]; |
@@ -58,16 +58,13 @@ std::string GetArg(int argnum, int argc, char* argv[]) { |
// Checks if an error occurred and, if it did, prints the error and exits |
// with an error code. |
void CheckError(battor::BattOrError error) { |
- if (error != battor::BATTOR_ERROR_NONE) { |
- LOG(ERROR) << "Fatal error when communicating with the BattOr: " << error; |
- PLOG(FATAL); |
Primiano Tucci (use gerrit)
2015/12/15 11:07:19
out of cusiosity why are you removing the P here?
charliea (OOO until 10-5)
2015/12/15 23:50:04
PLOG just appends the last system error to whateve
|
- } |
+ if (error != battor::BATTOR_ERROR_NONE) |
+ LOG(FATAL) << "Fatal error when communicating with the BattOr: " << error; |
} |
// Prints an error message and exits due to a required thread failing to start. |
void ExitFromThreadStartFailure(const std::string& thread_name) { |
- LOG(ERROR) << "Failed to start " << thread_name; |
- PLOG(FATAL); |
+ LOG(FATAL) << "Failed to start " << thread_name; |
} |
} // namespace |
@@ -84,9 +81,7 @@ class BattOrAgentBin : public BattOrAgent::Listener { |
file_thread_(kFileThreadName), |
ui_thread_(kUiThreadName) {} |
- ~BattOrAgentBin() { |
- DCHECK(!agent_); |
- } |
+ ~BattOrAgentBin() { DCHECK(!agent_); } |
// Runs the BattOr binary and returns the exit code. |
int Run(int argc, char* argv[]) { |