diff options
author | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:34:00 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:34:00 -0800 |
commit | 412e908082a361d0fd9591eab939e96a882212f1 (patch) | |
tree | 11726052ae08f13dc5a05a82cbce870758580aeb /core/src/fxcodec/codec/fx_codec_jpx_opj.cpp | |
parent | 96660d6f382204339d6b1aadc3913303d436e252 (diff) | |
download | pdfium-412e908082a361d0fd9591eab939e96a882212f1.tar.xz |
Merge to XFA: Get rid of most instance of 'foo == NULL'
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1520063002 .
(cherry picked from commit e385244f8cd6ae376f6b3cf1265a0795d5d30eff)
Review URL: https://codereview.chromium.org/1528763003 .
Diffstat (limited to 'core/src/fxcodec/codec/fx_codec_jpx_opj.cpp')
-rw-r--r-- | core/src/fxcodec/codec/fx_codec_jpx_opj.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp index cf017ca17a..21c1e441f0 100644 --- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp +++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp @@ -438,7 +438,7 @@ void color_apply_icc_profile(opj_image_t* image) { int max; cmsHPROFILE in_prof = cmsOpenProfileFromMem(image->icc_profile_buf, image->icc_profile_len); - if (in_prof == NULL) { + if (!in_prof) { return; } cmsColorSpaceSignature out_space = cmsGetColorSpace(in_prof); @@ -479,7 +479,7 @@ void color_apply_icc_profile(opj_image_t* image) { cmsCreateTransform(in_prof, in_type, out_prof, out_type, intent, 0); cmsCloseProfile(in_prof); cmsCloseProfile(out_prof); - if (transform == NULL) { + if (!transform) { image->color_space = oldspace; return; } @@ -597,7 +597,7 @@ void color_apply_conversion(opj_image_t* image) { INTENT_PERCEPTUAL, 0); cmsCloseProfile(in); cmsCloseProfile(out); - if (transform == NULL) { + if (!transform) { return; } prec0 = (double)image->comps[0].prec; @@ -708,7 +708,7 @@ FX_BOOL CJPX_Decoder::Init(const unsigned char* src_data, FX_DWORD src_size) { DecodeData srcData(const_cast<unsigned char*>(src_data), src_size); l_stream = fx_opj_stream_create_memory_stream(&srcData, OPJ_J2K_STREAM_CHUNK_SIZE, 1); - if (l_stream == NULL) { + if (!l_stream) { return FALSE; } opj_dparameters_t parameters; |