Index: fpdfsdk/src/fsdk_baseannot.cpp |
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp |
index 734b9828ece6d06484534b0f7439b2958f88e849..ef7ab0c03a68f771875c8fa655fc8d395dc0bd98 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, |