summaryrefslogtreecommitdiff
path: root/core/src/fxcodec
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:10:25 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:10:25 -0800
commite3c7c2b54348da4a6939f6672f6c6bff126815a7 (patch)
tree68cc9bebdd5f4f055bfa7de116862091709b4054 /core/src/fxcodec
parentba41a35553573ab718026e8508e1e32107db6595 (diff)
downloadpdfium-e3c7c2b54348da4a6939f6672f6c6bff126815a7.tar.xz
Get rid of most instance of 'foo != NULL'
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 .
Diffstat (limited to 'core/src/fxcodec')
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpeg.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index 1bee5e774a..730872363c 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -282,10 +282,10 @@ static FX_BOOL _JpegLoadInfo(const uint8_t* src_buf,
color_transform =
cinfo.jpeg_color_space == JCS_YCbCr || cinfo.jpeg_color_space == JCS_YCCK;
bits_per_components = cinfo.data_precision;
- if (icc_buf_ptr != NULL) {
+ if (icc_buf_ptr) {
*icc_buf_ptr = NULL;
}
- if (icc_length != NULL) {
+ if (icc_length) {
*icc_length = 0;
}
jpeg_destroy_decompress(&cinfo);
@@ -531,7 +531,7 @@ FX_BOOL CCodec_JpegModule::Encode(const CFX_DIBSource* pSource,
int quality,
const uint8_t* icc_buf,
FX_DWORD icc_length) {
- if (pSource->GetBPP() < 8 || pSource->GetPalette() != NULL) {
+ if (pSource->GetBPP() < 8 || pSource->GetPalette()) {
ASSERT(pSource->GetBPP() >= 8 && pSource->GetPalette() == NULL);
return FALSE;
}
@@ -655,7 +655,7 @@ FX_BOOL CCodec_JpegModule::ReadScanline(void* pContext,
}
FX_DWORD CCodec_JpegModule::GetAvailInput(void* pContext,
uint8_t** avail_buf_ptr) {
- if (avail_buf_ptr != NULL) {
+ if (avail_buf_ptr) {
*avail_buf_ptr = NULL;
if (((FXJPEG_Context*)pContext)->m_SrcMgr.bytes_in_buffer > 0) {
*avail_buf_ptr =