summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseannot.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:29:28 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:29:28 -0800
commite385244f8cd6ae376f6b3cf1265a0795d5d30eff (patch)
tree4bdd7c459f167ee56ae35f3b87222c2557f501f8 /fpdfsdk/src/fsdk_baseannot.cpp
parente3c7c2b54348da4a6939f6672f6c6bff126815a7 (diff)
downloadpdfium-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.cpp7
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,