blob: 846736d17fc76f2c5349862f72a770a2bb1283cb [file] [log] [blame]
Brian Silverman58899fd2019-03-24 11:03:11 -07001#include "aos/scoped/scoped_fd.h"
2
Alex Perrycb7da4b2019-08-28 19:35:56 -07003#include "glog/logging.h"
Brian Silverman58899fd2019-03-24 11:03:11 -07004
5namespace aos {
6
7void ScopedFD::Close() {
8 if (fd_ != -1) {
9 if (close(fd_) == -1) {
Alex Perrycb7da4b2019-08-28 19:35:56 -070010 PLOG(WARNING) << "close(" << fd_ << ") failed";
Brian Silverman58899fd2019-03-24 11:03:11 -070011 }
12 }
13}
14
15} // namespace aos