Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Unified Diff: xfa/fxfa/app/xfa_checksum.cpp

Issue 2095653002: Remove NULL in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/theme/cfwl_widgettp.cpp ('k') | xfa/fxfa/app/xfa_ffapp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_checksum.cpp
diff --git a/xfa/fxfa/app/xfa_checksum.cpp b/xfa/fxfa/app/xfa_checksum.cpp
index 9313ad7ea2cc1d6d5144d3bb41fb3050e6fa09ad..419f15bc348afae31b0501fbd8a83383883425c8 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;
}
}
« no previous file with comments | « xfa/fwl/theme/cfwl_widgettp.cpp ('k') | xfa/fxfa/app/xfa_ffapp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698