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

Unified Diff: core/fxcodec/codec/fx_codec_png.cpp

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Git rid of comparisons against NULL Created 4 years, 7 months 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
Index: core/fxcodec/codec/fx_codec_png.cpp
diff --git a/core/fxcodec/codec/fx_codec_png.cpp b/core/fxcodec/codec/fx_codec_png.cpp
index 61d4cebdbba28aa3ab2fc363232b848e75c51fc0..0808b26620268829bf12f1d758ea8273000609aa 100644
--- a/core/fxcodec/codec/fx_codec_png.cpp
+++ b/core/fxcodec/codec/fx_codec_png.cpp
@@ -110,13 +110,13 @@ static void _png_free_func(void* p) {
};
static void _png_get_header_func(png_structp png_ptr, png_infop info_ptr) {
FXPNG_Context* p = (FXPNG_Context*)png_get_progressive_ptr(png_ptr);
- if (p == NULL) {
+ if (!p)
return;
- }
+
CCodec_PngModule* pModule = (CCodec_PngModule*)p->parent_ptr;
- if (pModule == NULL) {
+ if (!pModule)
return;
- }
+
png_uint_32 width = 0, height = 0;
int bpc = 0, color_type = 0, color_type1 = 0, pass = 0;
double gamma = 1.0;
@@ -182,9 +182,9 @@ static void _png_get_row_func(png_structp png_ptr,
png_uint_32 row_num,
int pass) {
FXPNG_Context* p = (FXPNG_Context*)png_get_progressive_ptr(png_ptr);
- if (p == NULL) {
+ if (!p)
return;
- }
+
CCodec_PngModule* pModule = (CCodec_PngModule*)p->parent_ptr;
uint8_t* src_buf = NULL;
if (!pModule->AskScanlineBufCallback(p->child_ptr, row_num, src_buf)) {

Powered by Google App Engine
This is Rietveld 408576698