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

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

Issue 1720043003: Remove foo != NULL outside of xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 10 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
« no previous file with comments | « core/src/fpdfdoc/doc_tagged.cpp ('k') | core/src/fxcodec/codec/fx_codec_gif.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_bmp.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_bmp.cpp b/core/src/fxcodec/codec/fx_codec_bmp.cpp
index 4e5fef0d1df8b053d5847dd1e26b459e1cbaebe5..042392c0d1dff72639e0b9ab84ee751ceec30ebf 100644
--- a/core/src/fxcodec/codec/fx_codec_bmp.cpp
+++ b/core/src/fxcodec/codec/fx_codec_bmp.cpp
@@ -21,9 +21,7 @@ static void* _bmp_alloc_func(unsigned int size) {
return FX_Alloc(char, size);
}
static void _bmp_free_func(void* p) {
- if (p != NULL) {
- FX_Free(p);
- }
+ FX_Free(p);
}
};
static void _bmp_error_data(bmp_decompress_struct_p bmp_ptr,
@@ -72,7 +70,7 @@ void* CCodec_BmpModule::Start(void* pModule) {
}
void CCodec_BmpModule::Finish(void* pContext) {
FXBMP_Context* p = (FXBMP_Context*)pContext;
- if (p != NULL) {
+ if (p) {
_bmp_destroy_decompress(&p->bmp_ptr);
p->m_FreeFunc(p);
}
« no previous file with comments | « core/src/fpdfdoc/doc_tagged.cpp ('k') | core/src/fxcodec/codec/fx_codec_gif.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698