From 717a4fc857d66017cecc4c8f8285713135b9dc68 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 24 Feb 2017 14:07:17 -0800 Subject: Remove some pointless checks and assignments. Change-Id: I6f9fd67cdac581e8f91f829a5934b763bb229d21 Reviewed-on: https://pdfium-review.googlesource.com/2838 Commit-Queue: dsinclair Reviewed-by: dsinclair --- core/fpdfapi/parser/cpdf_data_avail.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'core/fpdfapi/parser') diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp index c6ecae9b1d..64eaf2a43b 100644 --- a/core/fpdfapi/parser/cpdf_data_avail.cpp +++ b/core/fpdfapi/parser/cpdf_data_avail.cpp @@ -1124,13 +1124,8 @@ bool CPDF_DataAvail::CheckArrayPageNode(uint32_t dwPageNo, return false; } - if (!pPages) { - if (m_docStatus == PDF_DATAAVAIL_ERROR) { - m_docStatus = PDF_DATAAVAIL_ERROR; - return false; - } + if (!pPages) return false; - } CPDF_Array* pArray = pPages->AsArray(); if (!pArray) { @@ -1161,11 +1156,8 @@ bool CPDF_DataAvail::CheckUnknownPageNode(uint32_t dwPageNo, return false; } - if (!pPage) { - if (m_docStatus == PDF_DATAAVAIL_ERROR) - m_docStatus = PDF_DATAAVAIL_ERROR; + if (!pPage) return false; - } if (pPage->IsArray()) { pPageNode->m_dwPageNo = dwPageNo; -- cgit v1.2.3