diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-05-19 14:48:00 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-05-19 14:48:00 -0700 |
commit | eb6527763171cdb4b0fbfea5a20d691f4d67b660 (patch) | |
tree | 7781d0fb716b95696b9f411037508244f4cfc28a /core/src/fxcodec/codec/fx_codec_fax.cpp | |
parent | 59f4b44d1fbb259967ea518e0bf5fa76b0cc9767 (diff) | |
download | pdfium-eb6527763171cdb4b0fbfea5a20d691f4d67b660.tar.xz |
Remove FX_Alloc() null checks now that it can't return NULL.
This permits some functions to become void's since
they, in turn, can't fail.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1142713005
Diffstat (limited to 'core/src/fxcodec/codec/fx_codec_fax.cpp')
-rw-r--r-- | core/src/fxcodec/codec/fx_codec_fax.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_fax.cpp b/core/src/fxcodec/codec/fx_codec_fax.cpp index 33e89e4f92..dc2ee2aacd 100644 --- a/core/src/fxcodec/codec/fx_codec_fax.cpp +++ b/core/src/fxcodec/codec/fx_codec_fax.cpp @@ -622,13 +622,7 @@ FX_BOOL CCodec_FaxDecoder::Create(FX_LPCBYTE src_buf, FX_DWORD src_size, int wid m_OutputWidth = m_OrigWidth; m_OutputHeight = m_OrigHeight; m_pScanlineBuf = FX_Alloc(FX_BYTE, m_Pitch); - if (m_pScanlineBuf == NULL) { - return FALSE; - } m_pRefBuf = FX_Alloc(FX_BYTE, m_Pitch); - if (m_pRefBuf == NULL) { - return FALSE; - } m_pSrcBuf = src_buf; m_SrcSize = src_size; m_nComps = 1; @@ -705,9 +699,6 @@ extern "C" { pitch = (width + 7) / 8; } FX_LPBYTE ref_buf = FX_Alloc(FX_BYTE, pitch); - if (ref_buf == NULL) { - return; - } FXSYS_memset8(ref_buf, 0xff, pitch); int bitpos = *pbitpos; for (int iRow = 0; iRow < height; iRow ++) { @@ -945,9 +936,6 @@ CCodec_FaxEncoder::CCodec_FaxEncoder(FX_LPCBYTE src_buf, int width, int height, m_Rows = height; m_Pitch = pitch; m_pRefLine = FX_Alloc(FX_BYTE, m_Pitch); - if (m_pRefLine == NULL) { - return; - } FXSYS_memset8(m_pRefLine, 0xff, m_Pitch); m_pLineBuf = FX_Alloc2D(FX_BYTE, m_Pitch, 8); m_DestBuf.EstimateSize(0, 10240); |