summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
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/jbig2/JBig2_ArithIntDecoder.cpp
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/jbig2/JBig2_ArithIntDecoder.cpp')
-rw-r--r--core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
index d12ab5a2e8..c8baa158e9 100644
--- a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
@@ -9,7 +9,7 @@
#include "../../../include/fxcrt/fx_memory.h"
CJBig2_ArithIntDecoder::CJBig2_ArithIntDecoder() {
- IAx = (JBig2ArithCtx*)FX_AllocOrDie(sizeof(JBig2ArithCtx), 512);
+ IAx = FX_Alloc(JBig2ArithCtx, 512);
JBIG2_memset(IAx, 0, sizeof(JBig2ArithCtx) * 512);
}
CJBig2_ArithIntDecoder::~CJBig2_ArithIntDecoder() {
@@ -82,8 +82,7 @@ int CJBig2_ArithIntDecoder::decode(CJBig2_ArithDecoder* pArithDecoder,
}
CJBig2_ArithIaidDecoder::CJBig2_ArithIaidDecoder(unsigned char SBSYMCODELENA) {
SBSYMCODELEN = SBSYMCODELENA;
- IAID =
- (JBig2ArithCtx*)FX_AllocOrDie(sizeof(JBig2ArithCtx), (1 << SBSYMCODELEN));
+ IAID = FX_Alloc(JBig2ArithCtx, 1 << SBSYMCODELEN);
JBIG2_memset(IAID, 0, sizeof(JBig2ArithCtx) * (int)(1 << SBSYMCODELEN));
}
CJBig2_ArithIaidDecoder::~CJBig2_ArithIaidDecoder() {