diff options
author | bsalomon <bsalomon@google.com> | 2014-09-05 13:34:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-05 13:34:00 -0700 |
commit | 49f085dddff10473b6ebf832a974288300224e60 (patch) | |
tree | 308a3cac5e1fb053c9e27e7d07213d72eaa05409 /src/images | |
parent | 7260d7292bde966f038b8e166f3fe41ddd8f2099 (diff) |
"NULL !=" = NULL
R=reed@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/544233002
Diffstat (limited to 'src/images')
-rw-r--r-- | src/images/SkImageDecoder.cpp | 2 | ||||
-rw-r--r-- | src/images/SkImageDecoder_ktx.cpp | 2 | ||||
-rw-r--r-- | src/images/SkImageDecoder_libgif.cpp | 2 | ||||
-rw-r--r-- | src/images/SkImageDecoder_libpng.cpp | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp index 4a5e734628..b25e7dbbab 100644 --- a/src/images/SkImageDecoder.cpp +++ b/src/images/SkImageDecoder.cpp @@ -271,7 +271,7 @@ bool SkImageDecoder::DecodeStream(SkStreamRewindable* stream, SkBitmap* bm, SkCo bool success = false; SkImageDecoder* codec = SkImageDecoder::Factory(stream); - if (NULL != codec) { + if (codec) { success = codec->decode(stream, bm, pref, mode); if (success && format) { *format = codec->getFormat(); diff --git a/src/images/SkImageDecoder_ktx.cpp b/src/images/SkImageDecoder_ktx.cpp index 64a37d9e9b..20c8bbc00b 100644 --- a/src/images/SkImageDecoder_ktx.cpp +++ b/src/images/SkImageDecoder_ktx.cpp @@ -272,7 +272,7 @@ bool SkKTXImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bitmap, int) SkAutoDataUnref data(bitmap.pixelRef()->refEncodedData()); // Is this even encoded data? - if (NULL != data) { + if (data) { const uint8_t *bytes = data->bytes(); if (etc1_pkm_is_valid(bytes)) { return this->encodePKM(stream, data); diff --git a/src/images/SkImageDecoder_libgif.cpp b/src/images/SkImageDecoder_libgif.cpp index 0c8461f893..745f4e11f1 100644 --- a/src/images/SkImageDecoder_libgif.cpp +++ b/src/images/SkImageDecoder_libgif.cpp @@ -194,7 +194,7 @@ static bool skip_src_rows(GifFileType* gif, uint8_t* dst, int width, int rowsToS static void sanitize_indexed_bitmap(SkBitmap* bm) { if ((kIndex_8_SkColorType == bm->colorType()) && !(bm->empty())) { SkAutoLockPixels alp(*bm); - if (NULL != bm->getPixels()) { + if (bm->getPixels()) { SkColorTable* ct = bm->getColorTable(); // Index8 must have it. SkASSERT(ct != NULL); uint32_t count = ct->count(); diff --git a/src/images/SkImageDecoder_libpng.cpp b/src/images/SkImageDecoder_libpng.cpp index b69f87996c..dd1d1c8a98 100644 --- a/src/images/SkImageDecoder_libpng.cpp +++ b/src/images/SkImageDecoder_libpng.cpp @@ -62,7 +62,7 @@ public: stream->ref(); } ~SkPNGImageIndex() { - if (NULL != fPng_ptr) { + if (fPng_ptr) { png_destroy_read_struct(&fPng_ptr, &fInfo_ptr, png_infopp_NULL); } } @@ -1161,7 +1161,7 @@ bool SkPNGImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bitmap, int // we must do this after we have locked the pixels SkColorTable* ctable = bitmap.getColorTable(); - if (NULL != ctable) { + if (ctable) { if (ctable->count() == 0) { return false; } |