This cl implements CommandSection and use it to add procrank.proto Section
Bug: 63863444
Test: manual - create gtests for CommandSection and Procrank Parser following
instructions in the README.md of incidentd and incident_helper on how to
run them.
Change-Id: I099808fd13bf9ed9a564b122f1126b1691a83291
diff --git a/cmds/incidentd/src/FdBuffer.h b/cmds/incidentd/src/FdBuffer.h
index 7888442..03a6d18 100644
--- a/cmds/incidentd/src/FdBuffer.h
+++ b/cmds/incidentd/src/FdBuffer.h
@@ -98,7 +98,7 @@
bool close() { return !(::close(mFds[0]) || ::close(mFds[1])); }
~Fpipe() { close(); }
- inline status_t init() { return pipe(mFds); }
+ inline bool init() { return pipe(mFds) != -1; }
inline int readFd() const { return mFds[0]; }
inline int writeFd() const { return mFds[1]; }