summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_checksum.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-23 12:40:16 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-23 12:40:16 -0700
commit85d1f2c2f9f1e746bedb1b6f03576613f54fbc27 (patch)
treeff5b393fb9b89f006327bee7bc8c955522defb67 /xfa/fxfa/app/xfa_checksum.cpp
parent6e12478cb298c3a8277493ee79ae0b73d6df8554 (diff)
downloadpdfium-85d1f2c2f9f1e746bedb1b6f03576613f54fbc27.tar.xz
Remove NULL in xfa/
This CL converts all NULL's to nullptr. All instances of comparison to nullptr have been removed. Review-Url: https://codereview.chromium.org/2095653002
Diffstat (limited to 'xfa/fxfa/app/xfa_checksum.cpp')
-rw-r--r--xfa/fxfa/app/xfa_checksum.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fxfa/app/xfa_checksum.cpp b/xfa/fxfa/app/xfa_checksum.cpp
index 9313ad7ea2..419f15bc34 100644
--- a/xfa/fxfa/app/xfa_checksum.cpp
+++ b/xfa/fxfa/app/xfa_checksum.cpp
@@ -54,11 +54,11 @@ void Base64EncodePiece(const FX_BASE64DATA& src,
}
int32_t Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst) {
- ASSERT(pSrc != NULL);
+ ASSERT(pSrc);
if (iSrcLen < 1) {
return 0;
}
- if (pDst == NULL) {
+ if (!pDst) {
int32_t iDstLen = iSrcLen / 3 * 4;
if ((iSrcLen % 3) != 0) {
iDstLen += 4;
@@ -103,7 +103,7 @@ CXFA_SAXContext* CXFA_SAXReaderHandler::OnTagEnter(
UpdateChecksum(TRUE);
if (eType != CFX_SAXItem::Type::Tag &&
eType != CFX_SAXItem::Type::Instruction) {
- return NULL;
+ return nullptr;
}
m_SAXContext.m_eNode = eType;
CFX_ByteTextBuf& textBuf = m_SAXContext.m_TextBuf;
@@ -242,7 +242,7 @@ FX_BOOL CXFA_ChecksumContext::UpdateChecksum(IFX_FileRead* pSrcFile,
CFX_SaxParseMode_NotConvert_sharp) < 0) {
return FALSE;
}
- return m_pSAXReader->ContinueParse(NULL) > 99;
+ return m_pSAXReader->ContinueParse(nullptr) > 99;
}
void CXFA_ChecksumContext::FinishChecksum() {
@@ -252,12 +252,12 @@ void CXFA_ChecksumContext::FinishChecksum() {
uint8_t digest[20];
FXSYS_memset(digest, 0, 20);
CRYPT_SHA1Finish(m_pByteContext, digest);
- int32_t nLen = Base64EncodeA(digest, 20, NULL);
+ int32_t nLen = Base64EncodeA(digest, 20, nullptr);
FX_CHAR* pBuffer = m_bsChecksum.GetBuffer(nLen);
Base64EncodeA(digest, 20, pBuffer);
m_bsChecksum.ReleaseBuffer(nLen);
FX_Free(m_pByteContext);
- m_pByteContext = NULL;
+ m_pByteContext = nullptr;
}
}