summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-09-15 16:24:58 -0700
committerLei Zhang <thestig@chromium.org>2015-09-15 16:24:58 -0700
commit2ccfcae630227d50edb844aefac53ebe450ea15a (patch)
tree04308f348b11aef52f58d19076bd20eb04c579c1 /core/src/fxcodec/codec
parent7d0fcbf8198f04a5a5bd15482fdbdae919fb1891 (diff)
downloadpdfium-2ccfcae630227d50edb844aefac53ebe450ea15a.tar.xz
Merge to XFA: Cleanup casting of FX_Alloc() return values.
Also convert some FX_AllocOrDie() calls to FX_Alloc(). TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1332173002 . (cherry picked from commit 6aca3e209ff6148f1d77b86b8b97d3bdf18e3eba) Review URL: https://codereview.chromium.org/1344233002 .
Diffstat (limited to 'core/src/fxcodec/codec')
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpeg.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index 17e2bcf356..db0c2eae4b 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -676,8 +676,7 @@ void* CCodec_JpegModule::Start() {
if (m_pExtProvider) {
return m_pExtProvider->Start();
}
- FXJPEG_Context* p =
- (FXJPEG_Context*)FX_Alloc(uint8_t, sizeof(FXJPEG_Context));
+ FXJPEG_Context* p = FX_Alloc(FXJPEG_Context, 1);
p->m_AllocFunc = jpeg_alloc_func;
p->m_FreeFunc = jpeg_free_func;
p->m_ErrMgr.error_exit = _error_fatal1;