Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: core/src/fxcodec/codec/fx_codec_jpx_opj.cpp

Issue 1520063002: Get rid of most instance of 'foo == NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@bstr_isnull
Patch Set: rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_jpeg.cpp ('k') | core/src/fxcrt/fx_basic_array.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index cf017ca17afbf06d07634617bc98badcced46ec3..21c1e441f0f4aa58cd930a1096ae1c6fde8fca8b 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;
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_jpeg.cpp ('k') | core/src/fxcrt/fx_basic_array.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698