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

Unified Diff: printing/pdf_ps_metafile_cairo.cc

Issue 1432003: Minor C++ fixes found by Clang. (Closed)
Patch Set: rebase Created 10 years, 9 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: printing/pdf_ps_metafile_cairo.cc
diff --git a/printing/pdf_ps_metafile_cairo.cc b/printing/pdf_ps_metafile_cairo.cc
index 31c1e8a3aa6d89869d7d88450ae379258b238eef..e0aec8a8497db30148a86eaeaa219676b488d394 100644
--- a/printing/pdf_ps_metafile_cairo.cc
+++ b/printing/pdf_ps_metafile_cairo.cc
@@ -358,8 +358,11 @@ bool PdfPsMetafile::SaveTo(const base::FileDescriptor& fd) const {
success = false;
}
- if (fd.auto_close)
- HANDLE_EINTR(close(fd.fd));
+ if (fd.auto_close) {
+ if (HANDLE_EINTR(close(fd.fd)) < 0)
willchan no longer on Chromium 2010/03/30 17:13:18 It's probably a good idea to PLOG here too.
+ success = false;
+ }
+
return success;
}

Powered by Google App Engine
This is Rietveld 408576698