blob: 74f888203a6fcb026c9a8e910b83b8a01445498a [file] [log] [blame]
Brian Silverman58899fd2019-03-24 11:03:11 -07001#include "aos/scoped/scoped_fd.h"
2
3#include "aos/logging/logging.h"
4
5namespace aos {
6
7void ScopedFD::Close() {
8 if (fd_ != -1) {
9 if (close(fd_) == -1) {
Austin Schuhf257f3c2019-10-27 21:00:43 -070010 AOS_PLOG(WARNING, "close(%d) failed", fd_);
Brian Silverman58899fd2019-03-24 11:03:11 -070011 }
12 }
13}
14
15} // namespace aos