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

Unified Diff: core/src/fxcodec/codec/fx_codec_flate.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.cpp ('k') | core/src/fxcodec/codec/fx_codec_icc.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_flate.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_flate.cpp b/core/src/fxcodec/codec/fx_codec_flate.cpp
index f9959589b3bc3c030caf023a65b1ecb882ecaaa3..b293781318f38e1da32bcef54960f1704930bda3 100644
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp
@@ -34,7 +34,7 @@ static void FPDFAPI_FlateCompress(unsigned char* dest_buf,
void* FPDFAPI_FlateInit(void* (*alloc_func)(void*, unsigned int, unsigned int),
void (*free_func)(void*, void*)) {
z_stream* p = (z_stream*)alloc_func(0, 1, sizeof(z_stream));
- if (p == NULL) {
+ if (!p) {
return NULL;
}
FXSYS_memset(p, 0, sizeof(z_stream));
@@ -835,7 +835,7 @@ FX_BOOL CCodec_FlateScanlineDecoder::v_Rewind() {
FPDFAPI_FlateEnd(m_pFlate);
}
m_pFlate = FPDFAPI_FlateInit(my_alloc_func, my_free_func);
- if (m_pFlate == NULL) {
+ if (!m_pFlate) {
return FALSE;
}
FPDFAPI_FlateInput(m_pFlate, m_SrcBuf, m_SrcSize);
« no previous file with comments | « core/src/fxcodec/codec/fx_codec.cpp ('k') | core/src/fxcodec/codec/fx_codec_icc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698