From 6aca3e209ff6148f1d77b86b8b97d3bdf18e3eba Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 11 Sep 2015 13:13:31 -0700 Subject: Cleanup casting of FX_Alloc() return values. Also convert some FX_AllocOrDie() calls to FX_Alloc(). R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1332173002 . --- core/src/fxcodec/codec/fx_codec_jpeg.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/src/fxcodec/codec/fx_codec_jpeg.cpp') diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp index 7e95bd358f..efd83f88ae 100644 --- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp @@ -601,8 +601,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; -- cgit v1.2.3