Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2752)

Unified Diff: base/file_util.h

Issue 2805026: Clang: Do not ignore result of HANDLE_EINTR. (Closed)
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/file_util.h
diff --git a/base/file_util.h b/base/file_util.h
index a16c5c72bc3b7fb2d666c6febece2d4bacd67240..48f431f189bccb504b3ef30cc53e67b94ec9941d 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -35,6 +35,7 @@
#if defined(OS_POSIX)
#include "base/eintr_wrapper.h"
#include "base/file_descriptor_posix.h"
+#include "base/logging.h"
#endif
namespace base {
@@ -377,7 +378,8 @@ class ScopedFDClose {
public:
inline void operator()(int* x) const {
if (x && *x >= 0) {
- HANDLE_EINTR(close(*x));
+ if (HANDLE_EINTR(close(*x)) < 0)
+ PLOG(ERROR) << "close";
}
}
};

Powered by Google App Engine
This is Rietveld 408576698