summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec/fx_codec_icc.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-05-19 15:19:32 -0700
committerTom Sepez <tsepez@chromium.org>2015-05-19 15:19:32 -0700
commit981a3468319eb24e696bb64ba84d9631fd26f1f7 (patch)
treec1136b807975ccc80199ff6593e69475261c1670 /core/src/fxcodec/codec/fx_codec_icc.cpp
parentbf4aa2cc93a67826247e887b2ba26a1b965eb616 (diff)
downloadpdfium-981a3468319eb24e696bb64ba84d9631fd26f1f7.tar.xz
Re-land: Remove FX_Alloc() null checks now that it can't return NULL.
Fixes the ordering of some assignments broken when converting to checked numerics in CFX_PathData::AddPointCount(). Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1135893008
Diffstat (limited to 'core/src/fxcodec/codec/fx_codec_icc.cpp')
-rw-r--r--core/src/fxcodec/codec/fx_codec_icc.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_icc.cpp b/core/src/fxcodec/codec/fx_codec_icc.cpp
index a984fecc30..26b4c1adfc 100644
--- a/core/src/fxcodec/codec/fx_codec_icc.cpp
+++ b/core/src/fxcodec/codec/fx_codec_icc.cpp
@@ -285,9 +285,6 @@ ICodec_IccModule::IccCS CCodec_IccModule::GetProfileCS(IFX_FileRead* pFile)
ICodec_IccModule::IccCS cs;
FX_DWORD dwSize = (FX_DWORD)pFile->GetSize();
FX_LPBYTE pBuf = FX_Alloc(FX_BYTE, dwSize);
- if (pBuf == NULL) {
- return IccCS_Unknown;
- }
pFile->ReadBlock(pBuf, 0, dwSize);
cs = GetProfileCS(pBuf, dwSize);
FX_Free(pBuf);
@@ -491,9 +488,6 @@ FX_LPVOID CCodec_IccModule::CreateTransform(ICodec_IccModule::IccParam* pInputPa
CFX_IccTransformCache* pTransformCache;
if (!m_MapTranform.Lookup(TransformKey, (FX_LPVOID&)pTransformCache)) {
pCmm = FX_Alloc(CLcmsCmm, 1);
- if (pCmm == NULL) {
- return NULL;
- }
pCmm->m_nSrcComponents = T_CHANNELS(dwInputProfileType);
pCmm->m_nDstComponents = T_CHANNELS(dwOutputProfileType);
pCmm->m_bLab = T_COLORSPACE(pInputParam->dwFormat) == PT_Lab;