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

Unified Diff: fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp

Issue 2448943003: Fix some return FALSE in functions that return pointers (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | xfa/fxfa/parser/cxfa_simple_parser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 13b79baf9bba2924eafe75eda8cc226c28c2c9cb..2a2bb3c48daadb994a2e903e8dcd907c7f43f9e0 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -709,16 +709,16 @@ IFX_SeekableReadStream* CPDFXFA_DocEnvironment::OpenLinkedFile(
const CFX_WideString& wsLink) {
CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pDocument->GetFormFillEnv();
if (!pFormFillEnv)
- return FALSE;
+ return nullptr;
CFX_ByteString bs = wsLink.UTF16LE_Encode();
int len = bs.GetLength();
FPDF_FILEHANDLER* pFileHandler =
pFormFillEnv->OpenFile(0, (FPDF_WIDESTRING)bs.GetBuffer(len), "rb");
bs.ReleaseBuffer(len);
-
if (!pFileHandler)
return nullptr;
+
return new CFPDF_FileStream(pFileHandler);
}
« no previous file with comments | « no previous file | xfa/fxfa/parser/cxfa_simple_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698