Brian Silverman | 58899fd | 2019-03-24 11:03:11 -0700 | [diff] [blame] | 1 | #include "aos/scoped/scoped_fd.h" |
2 | |||||
3 | #include "aos/logging/logging.h" | ||||
4 | |||||
5 | namespace aos { | ||||
6 | |||||
7 | void ScopedFD::Close() { | ||||
8 | if (fd_ != -1) { | ||||
9 | if (close(fd_) == -1) { | ||||
10 | PLOG(WARNING, "close(%d) failed", fd_); | ||||
11 | } | ||||
12 | } | ||||
13 | } | ||||
14 | |||||
15 | } // namespace aos |