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

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp

Issue 1520063002: Get rid of most instance of 'foo == NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@bstr_isnull
Patch Set: rebase Created 5 years 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: core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
index f61036aef6493fbc808ae1f55a234110de3f7923..df7b7a33cbf32c3522001fe417fce3b51c54c5eb 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
@@ -30,7 +30,7 @@ CFDF_Document* CFDF_Document::ParseFile(IFX_FileRead* pFile, FX_BOOL bOwnFile) {
}
CFDF_Document* pDoc = new CFDF_Document;
pDoc->ParseStream(pFile, bOwnFile);
- if (pDoc->m_pRootDict == NULL) {
+ if (!pDoc->m_pRootDict) {
delete pDoc;
return NULL;
}
@@ -59,7 +59,7 @@ void CFDF_Document::ParseStream(IFX_FileRead* pFile, FX_BOOL bOwnFile) {
break;
}
CPDF_Object* pObj = parser.GetObject(this, objnum, 0, 0);
- if (pObj == NULL) {
+ if (!pObj) {
break;
}
InsertIndirectObject(objnum, pObj);
@@ -81,7 +81,7 @@ void CFDF_Document::ParseStream(IFX_FileRead* pFile, FX_BOOL bOwnFile) {
}
}
FX_BOOL CFDF_Document::WriteBuf(CFX_ByteTextBuf& buf) const {
- if (m_pRootDict == NULL) {
+ if (!m_pRootDict) {
return FALSE;
}
buf << "%FDF-1.2\r\n";
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698