From 412e908082a361d0fd9591eab939e96a882212f1 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 14 Dec 2015 18:34:00 -0800 Subject: Merge to XFA: Get rid of most instance of 'foo == NULL' TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1520063002 . (cherry picked from commit e385244f8cd6ae376f6b3cf1265a0795d5d30eff) Review URL: https://codereview.chromium.org/1528763003 . --- core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp') diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp index 5f9d038626..118f1cd5a3 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp @@ -207,7 +207,7 @@ FX_BOOL CPDF_PSProc::Parse(CPDF_SimpleParser& parser) { } i++; } - if (_PDF_PSOpNames[i].name == NULL) { + if (!_PDF_PSOpNames[i].name) { FX_FLOAT* pd = FX_Alloc(FX_FLOAT, 1); *pd = FX_atof(word); m_Operators.Add((void*)PSOP_CONST); @@ -683,7 +683,7 @@ CPDF_ExpIntFunc::~CPDF_ExpIntFunc() { } FX_BOOL CPDF_ExpIntFunc::v_Init(CPDF_Object* pObj) { CPDF_Dictionary* pDict = pObj->GetDict(); - if (pDict == NULL) { + if (!pDict) { return FALSE; } CPDF_Array* pArray0 = pDict->GetArray("C0"); @@ -813,7 +813,7 @@ FX_BOOL CPDF_StitchFunc::v_Call(FX_FLOAT* inputs, FX_FLOAT* outputs) const { if (input < m_pBounds[i + 1]) { break; } - if (m_pSubFunctions[i] == NULL) { + if (!m_pSubFunctions[i]) { return FALSE; } input = PDF_Interpolate(input, m_pBounds[i], m_pBounds[i + 1], @@ -823,7 +823,7 @@ FX_BOOL CPDF_StitchFunc::v_Call(FX_FLOAT* inputs, FX_FLOAT* outputs) const { return TRUE; } CPDF_Function* CPDF_Function::Load(CPDF_Object* pFuncObj) { - if (pFuncObj == NULL) { + if (!pFuncObj) { return NULL; } CPDF_Function* pFunc = NULL; -- cgit v1.2.3