diff options
author | sangwan.kwon <sangwan.kwon@samsung.com> | 2016-05-30 14:27:13 +0900 |
---|---|---|
committer | sangwan.kwon <sangwan.kwon@samsung.com> | 2016-05-30 14:35:25 +0900 |
commit | b8ffd7662428b4baff92a0c8271e84c2b55ce47b (patch) | |
tree | cdeecf4ba84a2fb7c852fa6c538a304f2a458196 /src/common/eventfd.cpp | |
parent | 30177b747ab42a7cedc5228803e057d05583b1a6 (diff) | |
download | cert-checker-b8ffd7662428b4baff92a0c8271e84c2b55ce47b.tar.gz cert-checker-b8ffd7662428b4baff92a0c8271e84c2b55ce47b.tar.bz2 cert-checker-b8ffd7662428b4baff92a0c8271e84c2b55ce47b.zip |
Apply tizen coding rule
* It depends on cpp rule checker(version 160520)
Change-Id: Ica308e1296be4f3567725fdb004f3bae8a456a0c
Diffstat (limited to 'src/common/eventfd.cpp')
-rw-r--r-- | src/common/eventfd.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/eventfd.cpp b/src/common/eventfd.cpp index 1828b1f..a3dba42 100644 --- a/src/common/eventfd.cpp +++ b/src/common/eventfd.cpp @@ -33,6 +33,7 @@ namespace CCHECKER { EventFD::EventFD(unsigned int initval, int flags) { fd = ::eventfd(initval, flags); + if (fd == -1) { throw std::logic_error("EventFd from constructor is failed!!"); } @@ -48,6 +49,7 @@ EventFD::~EventFD() void EventFD::send() { const std::uint64_t val = 1; + if (::write(fd, &val, sizeof(val)) == -1) { throw std::logic_error("EventFd send to fd is failed!!"); } @@ -56,6 +58,7 @@ void EventFD::send() void EventFD::receive() { std::uint64_t val; + if (::read(fd, &val, sizeof(val)) == -1) { throw std::logic_error("EventFd read to fd is failed!!"); } |