diff options
author | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:29:28 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:29:28 -0800 |
commit | e385244f8cd6ae376f6b3cf1265a0795d5d30eff (patch) | |
tree | 4bdd7c459f167ee56ae35f3b87222c2557f501f8 /fpdfsdk/src/fsdk_baseannot.cpp | |
parent | e3c7c2b54348da4a6939f6672f6c6bff126815a7 (diff) | |
download | pdfium-e385244f8cd6ae376f6b3cf1265a0795d5d30eff.tar.xz |
Get rid of most instance of 'foo == NULL'
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1520063002 .
Diffstat (limited to 'fpdfsdk/src/fsdk_baseannot.cpp')
-rw-r--r-- | fpdfsdk/src/fsdk_baseannot.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp index 734b9828ec..ef7ab0c03a 100644 --- a/fpdfsdk/src/fsdk_baseannot.cpp +++ b/fpdfsdk/src/fsdk_baseannot.cpp @@ -566,7 +566,7 @@ FX_BOOL CPDFSDK_BAAnnot::IsAppearanceValid() { FX_BOOL CPDFSDK_BAAnnot::IsAppearanceValid(CPDF_Annot::AppearanceMode mode) { CPDF_Dictionary* pAP = m_pAnnot->GetAnnotDict()->GetDict("AP"); - if (pAP == NULL) + if (!pAP) return FALSE; // Choose the right sub-ap @@ -580,10 +580,7 @@ FX_BOOL CPDFSDK_BAAnnot::IsAppearanceValid(CPDF_Annot::AppearanceMode mode) { // Get the AP stream or subdirectory CPDF_Object* psub = pAP->GetElementValue(ap_entry); - if (psub == NULL) - return FALSE; - - return TRUE; + return !!psub; } void CPDFSDK_BAAnnot::DrawBorder(CFX_RenderDevice* pDevice, |