summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2017-01-16 06:07:54 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-16 06:07:54 -0800
commitdd1bfe4b1438be802eb10a7de52ed77d8b9f32ac (patch)
treedbe0e70b5adb8dc7303c89f6ed149f42539a5fc1 /core/fxcodec/codec
parent38c2705c697cd9a67b02ead1d601610d7af96524 (diff)
downloadpdfium-dd1bfe4b1438be802eb10a7de52ed77d8b9f32ac.tar.xz
Use FX_Alloc() properly in fxcodec.
It already has a sizeof() and a cast built into the macro, so we don't need to do sizeof() and cast on each usage. Review-Url: https://codereview.chromium.org/2625133009
Diffstat (limited to 'core/fxcodec/codec')
-rw-r--r--core/fxcodec/codec/fx_codec_png.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxcodec/codec/fx_codec_png.cpp b/core/fxcodec/codec/fx_codec_png.cpp
index 0b55a97dbe..579c85bf09 100644
--- a/core/fxcodec/codec/fx_codec_png.cpp
+++ b/core/fxcodec/codec/fx_codec_png.cpp
@@ -197,7 +197,7 @@ static void _png_get_row_func(png_structp png_ptr,
}
FXPNG_Context* CCodec_PngModule::Start(void* pModule) {
- FXPNG_Context* p = (FXPNG_Context*)FX_Alloc(uint8_t, sizeof(FXPNG_Context));
+ FXPNG_Context* p = FX_Alloc(FXPNG_Context, 1);
if (!p)
return nullptr;