"NULL !=" = NULL

R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
diff --git a/tests/BBoxHierarchyTest.cpp b/tests/BBoxHierarchyTest.cpp
index b9cbbc4..71b9699 100644
--- a/tests/BBoxHierarchyTest.cpp
+++ b/tests/BBoxHierarchyTest.cpp
@@ -86,7 +86,7 @@
                            skiatest::Reporter* reporter) {
     DataRect rects[NUM_RECTS];
     SkRandom rand;
-    REPORTER_ASSERT(reporter, NULL != tree);
+    REPORTER_ASSERT(reporter, tree);
 
     int expectedDepthMin = -1;
     int expectedDepthMax = -1;
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index 82789a1..92e9d78 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -63,8 +63,8 @@
     if (b1.isNull() || b1.empty()) {
         return;
     }
-    REPORTER_ASSERT(reporter, NULL != b1.getPixels());
-    REPORTER_ASSERT(reporter, NULL != b2.getPixels());
+    REPORTER_ASSERT(reporter, b1.getPixels());
+    REPORTER_ASSERT(reporter, b2.getPixels());
     if ((!(b1.getPixels())) || (!(b2.getPixels()))) {
         return;
     }
@@ -122,7 +122,7 @@
         REPORTER_ASSERT(reporter, NULL == lazy.getPixels());
         {
             SkAutoLockPixels autoLockPixels(lazy);  // now pixels are good.
-            REPORTER_ASSERT(reporter, NULL != lazy.getPixels());
+            REPORTER_ASSERT(reporter, lazy.getPixels());
             if (NULL == lazy.getPixels()) {
                 continue;
             }
@@ -131,7 +131,7 @@
         REPORTER_ASSERT(reporter, NULL == lazy.getPixels());
         {
             SkAutoLockPixels autoLockPixels(lazy);  // now pixels are good.
-            REPORTER_ASSERT(reporter, NULL != lazy.getPixels());
+            REPORTER_ASSERT(reporter, lazy.getPixels());
             if (NULL == lazy.getPixels()) {
                 continue;
             }
@@ -184,7 +184,7 @@
 
 protected:
     virtual bool onGetInfo(SkImageInfo* info) SK_OVERRIDE {
-        REPORTER_ASSERT(fReporter, NULL != info);
+        REPORTER_ASSERT(fReporter, info);
         if ((NULL == info) || (kFailGetInfo_TestType == fType)) {
             return false;
         }
@@ -223,7 +223,7 @@
     REPORTER_ASSERT(reporter, TestImageGenerator::Width() == bm.width());
     REPORTER_ASSERT(reporter, TestImageGenerator::Height() == bm.height());
     SkAutoLockPixels autoLockPixels(bm);
-    REPORTER_ASSERT(reporter, NULL != bm.getPixels());
+    REPORTER_ASSERT(reporter, bm.getPixels());
     if (NULL == bm.getPixels()) {
         return;
     }
diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp
index 787f9af..8364a4b 100644
--- a/tests/CanvasStateTest.cpp
+++ b/tests/CanvasStateTest.cpp
@@ -270,7 +270,7 @@
     SkCanvas* tmpCanvas = SkCanvasStateUtils::CreateFromCanvasState(state);
     REPORTER_ASSERT(reporter, tmpCanvas);
 
-    REPORTER_ASSERT(reporter, NULL != canvas.getDrawFilter());
+    REPORTER_ASSERT(reporter, canvas.getDrawFilter());
     REPORTER_ASSERT(reporter, NULL == tmpCanvas->getDrawFilter());
 
     tmpCanvas->unref();
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp
index 0620df9..662e680 100644
--- a/tests/ClipStackTest.cpp
+++ b/tests/ClipStackTest.cpp
@@ -980,12 +980,12 @@
             // whether the result is bounded or not, the whole plane should start outside the clip.
             reducedStack.clipEmpty();
         }
-        for (ElementList::Iter iter = reducedClips.headIter(); NULL != iter.get(); iter.next()) {
+        for (ElementList::Iter iter = reducedClips.headIter(); iter.get(); iter.next()) {
             add_elem_to_stack(*iter.get(), &reducedStack);
         }
 
         // GrReducedClipStack assumes that the final result is clipped to the returned bounds
-        if (NULL != tightBounds) {
+        if (tightBounds) {
             reducedStack.clipDevRect(*tightBounds, SkRegion::kIntersect_Op);
         }
 
@@ -1191,7 +1191,7 @@
     SkRect answer;
     answer.iset(25, 25, 75, 75);
 
-    REPORTER_ASSERT(reporter, NULL != element);
+    REPORTER_ASSERT(reporter, element);
     REPORTER_ASSERT(reporter, SkClipStack::Element::kRect_Type == element->getType());
     REPORTER_ASSERT(reporter, SkRegion::kIntersect_Op == element->getOp());
     REPORTER_ASSERT(reporter, element->getRect() == answer);
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp
index b8b82b2..61af550 100644
--- a/tests/DeferredCanvasTest.cpp
+++ b/tests/DeferredCanvasTest.cpp
@@ -681,7 +681,7 @@
 
 static void TestDeferredCanvasSurface(skiatest::Reporter* reporter, GrContextFactory* factory) {
     SkImageInfo imageSpec = SkImageInfo::MakeN32Premul(10, 10);
-    bool useGpu = NULL != factory;
+    bool useGpu = SkToBool(factory);
     int cnt;
 #if SK_SUPPORT_GPU
     if (useGpu) {
@@ -712,7 +712,7 @@
         {
            surface = SkSurface::NewRaster(imageSpec);
         }
-        SkASSERT(NULL != surface);
+        SkASSERT(surface);
         SkAutoTUnref<SkSurface> aur(surface);
         SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(surface));
 
@@ -764,7 +764,7 @@
     SkImageInfo imageSpec = SkImageInfo::MakeN32Premul(10, 10);
     SkSurface* surface;
     SkSurface* alternateSurface;
-    bool useGpu = NULL != factory;
+    bool useGpu = SkToBool(factory);
     int cnt;
 #if SK_SUPPORT_GPU
     if (useGpu) {
@@ -796,8 +796,8 @@
             surface = SkSurface::NewRaster(imageSpec);
             alternateSurface = SkSurface::NewRaster(imageSpec);
         }
-        SkASSERT(NULL != surface);
-        SkASSERT(NULL != alternateSurface);
+        SkASSERT(surface);
+        SkASSERT(alternateSurface);
         SkAutoTUnref<SkSurface> aur1(surface);
         SkAutoTUnref<SkSurface> aur2(alternateSurface);
         PixelPtr pixels1 = get_surface_ptr(surface, useGpu);
diff --git a/tests/DequeTest.cpp b/tests/DequeTest.cpp
index 5d5dc09..04b1f40 100644
--- a/tests/DequeTest.cpp
+++ b/tests/DequeTest.cpp
@@ -19,8 +19,8 @@
         REPORTER_ASSERT(reporter, !deq.empty());
         REPORTER_ASSERT(reporter, count == deq.count());
         REPORTER_ASSERT(reporter, sizeof(int) == deq.elemSize());
-        REPORTER_ASSERT(reporter, NULL != deq.front());
-        REPORTER_ASSERT(reporter, NULL != deq.back());
+        REPORTER_ASSERT(reporter, deq.front());
+        REPORTER_ASSERT(reporter, deq.back());
         if (1 == count) {
             REPORTER_ASSERT(reporter, deq.back() == deq.front());
         } else {
@@ -36,7 +36,7 @@
     void* ptr;
 
     int value = max;
-    while (NULL != (ptr = iter.next())) {
+    while ((ptr = iter.next())) {
         REPORTER_ASSERT(reporter, value == *(int*)ptr);
         value -= 1;
     }
@@ -46,7 +46,7 @@
     iter.reset(deq, SkDeque::Iter::kBack_IterStart);
 
     value = min;
-    while (NULL != (ptr = iter.prev())) {
+    while ((ptr = iter.prev())) {
         REPORTER_ASSERT(reporter, value == *(int*)ptr);
         value += 1;
     }
@@ -57,12 +57,12 @@
 
     value = max;
     // forward iteration half-way
-    for (int i = 0; i < deq.count()/2 && NULL != (ptr = iter.next()); i++) {
+    for (int i = 0; i < deq.count()/2 && (ptr = iter.next()); i++) {
         REPORTER_ASSERT(reporter, value == *(int*)ptr);
         value -= 1;
     }
     // then back down w/ reverse iteration
-    while (NULL != (ptr = iter.prev())) {
+    while ((ptr = iter.prev())) {
         REPORTER_ASSERT(reporter, value == *(int*)ptr);
         value += 1;
     }
diff --git a/tests/FontMgrTest.cpp b/tests/FontMgrTest.cpp
index c9aa778..a1dc9dc 100644
--- a/tests/FontMgrTest.cpp
+++ b/tests/FontMgrTest.cpp
@@ -16,7 +16,7 @@
     uint32_t flags = 0;
     SkAutoTUnref<SkFont> font(SkFont::Create(NULL, 24, SkFont::kA8_MaskType, flags));
 
-    REPORTER_ASSERT(reporter, NULL != font->getTypeface());
+    REPORTER_ASSERT(reporter, font->getTypeface());
     REPORTER_ASSERT(reporter, 24 == font->getSize());
     REPORTER_ASSERT(reporter, 1 == font->getScaleX());
     REPORTER_ASSERT(reporter, 0 == font->getSkewX());
diff --git a/tests/GLInterfaceValidationTest.cpp b/tests/GLInterfaceValidationTest.cpp
index 541af8f..797ba72 100755
--- a/tests/GLInterfaceValidationTest.cpp
+++ b/tests/GLInterfaceValidationTest.cpp
@@ -22,14 +22,14 @@
         // We're supposed to fail the NVPR context type when we the native context that does not
         // support the NVPR extension.
         if (GrContextFactory::kNVPR_GLContextType == glCtxType &&
-            NULL != factory->getGLContext(GrContextFactory::kNative_GLContextType) &&
+            factory->getGLContext(GrContextFactory::kNative_GLContextType) &&
             !factory->getGLContext(GrContextFactory::kNative_GLContextType)->hasExtension("GL_NV_path_rendering")) {
             REPORTER_ASSERT(reporter, NULL == glCtxHelper);
             continue;
         }
 
-        REPORTER_ASSERT(reporter, NULL != glCtxHelper);
-        if (NULL != glCtxHelper) {
+        REPORTER_ASSERT(reporter, glCtxHelper);
+        if (glCtxHelper) {
             const GrGLInterface* interface = glCtxHelper->gl();
             REPORTER_ASSERT(reporter, interface->validate());
         }
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index 6efd7d5..a641fe2 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -44,9 +44,9 @@
 
     bool dstRead = false;
     bool fragPos = false;
-    bool vertexShader = (NULL != geometryProcessor);
+    bool vertexShader = SkToBool(geometryProcessor);
     int offset = 0;
-    if (NULL != geometryProcessor) {
+    if (geometryProcessor) {
         const GrEffectStage* stage = geometryProcessor;
         uint16_t* offsetAndSize = reinterpret_cast<uint16_t*>(fKey.begin() +
                                                               kEffectKeyOffsetsAndLengthOffset +
@@ -295,7 +295,7 @@
 DEF_GPUTEST(GLPrograms, reporter, factory) {
     for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
         GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(type));
-        if (NULL != context) {
+        if (context) {
             GrGpuGL* gpu = static_cast<GrGpuGL*>(context->getGpu());
             int maxStages = 6;
 #if SK_ANGLE
diff --git a/tests/GpuLayerCacheTest.cpp b/tests/GpuLayerCacheTest.cpp
index 5e18197..83f31f5 100644
--- a/tests/GpuLayerCacheTest.cpp
+++ b/tests/GpuLayerCacheTest.cpp
@@ -34,7 +34,7 @@
         GrCachedLayer* layer = cache->findLayerOrCreate(picture.uniqueID(), 
                                                         idOffset+i+1, idOffset+i+2, 
                                                         SkMatrix::I());
-        REPORTER_ASSERT(reporter, NULL != layer);
+        REPORTER_ASSERT(reporter, layer);
         GrCachedLayer* temp = cache->findLayer(picture.uniqueID(), idOffset+i+1, idOffset+i+2, SkMatrix::I());
         REPORTER_ASSERT(reporter, temp == layer);
 
@@ -66,7 +66,7 @@
     needsRerendering = cache->lock(layer, desc, false);
     REPORTER_ASSERT(reporter, !needsRerendering);
 
-    REPORTER_ASSERT(reporter, NULL != layer->texture());
+    REPORTER_ASSERT(reporter, layer->texture());
     REPORTER_ASSERT(reporter, layer->locked());
 }
 
@@ -100,7 +100,7 @@
 
         for (int i = 0; i < kInitialNumLayers; ++i) {
             GrCachedLayer* layer = cache.findLayer(picture->uniqueID(), i+1, i+2, SkMatrix::I());
-            REPORTER_ASSERT(reporter, NULL != layer);
+            REPORTER_ASSERT(reporter, layer);
 
             lock_layer(reporter, &cache, layer);
 
@@ -117,19 +117,19 @@
         // Unlock the textures
         for (int i = 0; i < kInitialNumLayers; ++i) {
             GrCachedLayer* layer = cache.findLayer(picture->uniqueID(), i+1, i+2, SkMatrix::I());
-            REPORTER_ASSERT(reporter, NULL != layer);
+            REPORTER_ASSERT(reporter, layer);
 
             cache.unlock(layer);
         }
 
         for (int i = 0; i < kInitialNumLayers; ++i) {
             GrCachedLayer* layer = cache.findLayer(picture->uniqueID(), i+1, i+2, SkMatrix::I());
-            REPORTER_ASSERT(reporter, NULL != layer);
+            REPORTER_ASSERT(reporter, layer);
 
             REPORTER_ASSERT(reporter, !layer->locked());
             // The first 4 layers should still be in the atlas.
             if (i < 4) {
-                REPORTER_ASSERT(reporter, NULL != layer->texture());
+                REPORTER_ASSERT(reporter, layer->texture());
                 REPORTER_ASSERT(reporter, layer->isAtlased());
             } else {
                 // The final layer should be unlocked.
@@ -145,7 +145,7 @@
             GrCachedLayer* layer = cache.findLayer(picture->uniqueID(), 
                                                    kInitialNumLayers+1, kInitialNumLayers+2, 
                                                    SkMatrix::I());
-            REPORTER_ASSERT(reporter, NULL != layer);
+            REPORTER_ASSERT(reporter, layer);
 
             lock_layer(reporter, &cache, layer);
             cache.unlock(layer);
@@ -155,13 +155,13 @@
             GrCachedLayer* layer = cache.findLayer(picture->uniqueID(), i+1, i+2, SkMatrix::I());
             // 3 old layers plus the new one should be in the atlas.
             if (1 == i || 2 == i || 3 == i || 5 == i) {
-                REPORTER_ASSERT(reporter, NULL != layer);
+                REPORTER_ASSERT(reporter, layer);
                 REPORTER_ASSERT(reporter, !layer->locked());
-                REPORTER_ASSERT(reporter, NULL != layer->texture());
+                REPORTER_ASSERT(reporter, layer->texture());
                 REPORTER_ASSERT(reporter, layer->isAtlased());
             } else if (4 == i) {
                 // The one that was never atlased should still be around
-                REPORTER_ASSERT(reporter, NULL != layer);
+                REPORTER_ASSERT(reporter, layer);
 
                 REPORTER_ASSERT(reporter, NULL == layer->texture());
                 REPORTER_ASSERT(reporter, !layer->isAtlased());
diff --git a/tests/GrAllocatorTest.cpp b/tests/GrAllocatorTest.cpp
index a05da8f..c02a7ca 100644
--- a/tests/GrAllocatorTest.cpp
+++ b/tests/GrAllocatorTest.cpp
@@ -30,7 +30,7 @@
 // again. Finally it resets the allocator and checks again.
 static void check_allocator(GrTAllocator<C>* allocator, int cnt, int popCnt,
                             skiatest::Reporter* reporter) {
-    SkASSERT(NULL != allocator);
+    SkASSERT(allocator);
     SkASSERT(allocator->empty());
     for (int i = 0; i < cnt; ++i) {
         // Try both variations of push_back().
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index ff67b1b..a2ed629 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -16,7 +16,7 @@
 
 DEF_GPUTEST(GrSurface, reporter, factory) {
     GrContext* context = factory->get(GrContextFactory::kNull_GLContextType);
-    if (NULL != context) {
+    if (context) {
         GrTextureDesc desc;
         desc.fConfig = kSkia8888_GrPixelConfig;
         desc.fFlags = kRenderTarget_GrTextureFlagBit;
diff --git a/tests/ImageCacheTest.cpp b/tests/ImageCacheTest.cpp
index bda10a0..317ed6d 100644
--- a/tests/ImageCacheTest.cpp
+++ b/tests/ImageCacheTest.cpp
@@ -45,7 +45,7 @@
 
         TestingRec* newRec = SkNEW_ARGS(TestingRec, (key, i));
         const TestingRec* addedRec = (const TestingRec*)cache.addAndLock(newRec);
-        REPORTER_ASSERT(reporter, NULL != addedRec);
+        REPORTER_ASSERT(reporter, addedRec);
 
         const TestingRec* foundRec = (const TestingRec*)cache.findAndLock(key);
         REPORTER_ASSERT(reporter, foundRec == addedRec);
@@ -59,7 +59,7 @@
         for (size_t i = 0; i < COUNT * 100; ++i) {
             TestingKey key(i);
             SkResourceCache::ID id = cache.addAndLock(SkNEW_ARGS(TestingRec, (key, i)));
-            REPORTER_ASSERT(reporter, NULL != id);
+            REPORTER_ASSERT(reporter, id);
             cache.unlock(id);
         }
     }
@@ -117,7 +117,7 @@
 
     // Lookup can return either value.
     const TestingRec* rec = (const TestingRec*)cache.findAndLock(key);
-    REPORTER_ASSERT(r, NULL != rec);
+    REPORTER_ASSERT(r, rec);
     REPORTER_ASSERT(r, 2 == rec->fValue || 3 == rec->fValue);
     cache.unlock(rec);
 }
diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp
index 4d26167..30665a6 100644
--- a/tests/ImageDecodingTest.cpp
+++ b/tests/ImageDecodingTest.cpp
@@ -278,7 +278,7 @@
 
         // This should never fail since we know the images we're decoding.
         SkAutoTDelete<SkImageDecoder> decoder(SkImageDecoder::Factory(&stream));
-        REPORTER_ASSERT(reporter, NULL != decoder.get());
+        REPORTER_ASSERT(reporter, decoder.get());
         if (NULL == decoder.get()) {
             continue;
         }
@@ -510,9 +510,9 @@
         SkBitmap bm;
         SkAssertResult(bm.setInfo(SkImageInfo::MakeN32Premul(1, 1)));
         REPORTER_ASSERT(reporter,
-            NULL != install_pixel_ref(&bm, stream.detach(), 1, true));
+            install_pixel_ref(&bm, stream.detach(), 1, true));
         SkAutoLockPixels alp(bm);
-        REPORTER_ASSERT(reporter, NULL != bm.getPixels());
+        REPORTER_ASSERT(reporter, bm.getPixels());
     }
 }
 
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index a8cd5d0..ebe9c4d 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -152,7 +152,7 @@
         // Check that a clipping color matrix followed by a grayscale does not concatenate into a single filter.
         SkAutoTUnref<SkImageFilter> doubleBrightness(make_scale(2.0f));
         SkAutoTUnref<SkImageFilter> halfBrightness(make_scale(0.5f, doubleBrightness));
-        REPORTER_ASSERT(reporter, NULL != halfBrightness->getInput(0));
+        REPORTER_ASSERT(reporter, halfBrightness->getInput(0));
     }
 
     {
diff --git a/tests/KtxTest.cpp b/tests/KtxTest.cpp
index 32dacd5..1a61f3a 100644
--- a/tests/KtxTest.cpp
+++ b/tests/KtxTest.cpp
@@ -31,7 +31,7 @@
     bm8888.allocN32Pixels(128, 128);
 
     uint8_t *pixels = reinterpret_cast<uint8_t*>(bm8888.getPixels());
-    REPORTER_ASSERT(reporter, NULL != pixels);
+    REPORTER_ASSERT(reporter, pixels);
 
     if (NULL == pixels) {
         return;
@@ -53,10 +53,10 @@
     REPORTER_ASSERT(reporter, !(bm8888.empty()));
 
     SkAutoDataUnref encodedData(SkImageEncoder::EncodeData(bm8888, SkImageEncoder::kKTX_Type, 0));
-    REPORTER_ASSERT(reporter, NULL != encodedData);
+    REPORTER_ASSERT(reporter, encodedData);
 
     SkAutoTUnref<SkMemoryStream> stream(SkNEW_ARGS(SkMemoryStream, (encodedData)));
-    REPORTER_ASSERT(reporter, NULL != stream);
+    REPORTER_ASSERT(reporter, stream);
 
     SkBitmap decodedBitmap;
     bool imageDecodeSuccess = SkImageDecoder::DecodeStream(stream, &decodedBitmap);
@@ -69,7 +69,7 @@
     REPORTER_ASSERT(reporter, !(decodedBitmap.empty()));
 
     uint8_t *decodedPixels = reinterpret_cast<uint8_t*>(decodedBitmap.getPixels());
-    REPORTER_ASSERT(reporter, NULL != decodedPixels);
+    REPORTER_ASSERT(reporter, decodedPixels);
     REPORTER_ASSERT(reporter, decodedBitmap.getSize() == bm8888.getSize());
 
     if (NULL == decodedPixels) {
@@ -109,7 +109,7 @@
 
     SkAutoTUnref<SkMemoryStream> stream(
         SkNEW_ARGS(SkMemoryStream, (kHalfWhiteKTX, sizeof(kHalfWhiteKTX))));
-    REPORTER_ASSERT(reporter, NULL != stream);
+    REPORTER_ASSERT(reporter, stream);
 
     SkBitmap decodedBitmap;
     bool imageDecodeSuccess = SkImageDecoder::DecodeStream(stream, &decodedBitmap);
@@ -122,7 +122,7 @@
     REPORTER_ASSERT(reporter, !(decodedBitmap.empty()));
 
     uint8_t *decodedPixels = reinterpret_cast<uint8_t*>(decodedBitmap.getPixels());
-    REPORTER_ASSERT(reporter, NULL != decodedPixels);
+    REPORTER_ASSERT(reporter, decodedPixels);
 
     uint8_t *row = decodedPixels;
     for (int j = 0; j < decodedBitmap.height(); ++j) {
@@ -145,7 +145,7 @@
     // Load PKM file into a bitmap
     SkBitmap etcBitmap;
     SkAutoTUnref<SkData> fileData(SkData::NewFromFileName(pkmFilename.c_str()));
-    REPORTER_ASSERT(reporter, NULL != fileData);
+    REPORTER_ASSERT(reporter, fileData);
     if (NULL == fileData) {
         return;
     }
@@ -159,7 +159,7 @@
     // Write the bitmap out to a KTX file.
     SkData *ktxDataPtr = SkImageEncoder::EncodeData(etcBitmap, SkImageEncoder::kKTX_Type, 0);
     SkAutoDataUnref newKtxData(ktxDataPtr);
-    REPORTER_ASSERT(reporter, NULL != ktxDataPtr);
+    REPORTER_ASSERT(reporter, ktxDataPtr);
 
     // See is this data is identical to data in existing ktx file.
     SkString ktxFilename = GetResourcePath("mandrill_128.ktx");
diff --git a/tests/LListTest.cpp b/tests/LListTest.cpp
index 20151c3..8fb0117 100644
--- a/tests/LListTest.cpp
+++ b/tests/LListTest.cpp
@@ -73,12 +73,12 @@
     Iter iter;
 
     ListElement* cur = iter.init(list, Iter::kHead_IterStart);
-    for (int i = 0; NULL != cur; ++i, cur = iter.next()) {
+    for (int i = 0; cur; ++i, cur = iter.next()) {
         REPORTER_ASSERT(reporter, cur->fID == 3-i);
     }
 
     cur = iter.init(list, Iter::kTail_IterStart);
-    for (int i = 0; NULL != cur; ++i, cur = iter.prev()) {
+    for (int i = 0; cur; ++i, cur = iter.prev()) {
         REPORTER_ASSERT(reporter, cur->fID == i);
     }
 
@@ -114,7 +114,7 @@
     check_list(list, reporter, false, 4, true, true, true, true, elements);
 
     cur = iter.init(list, Iter::kHead_IterStart);
-    for (int i = 0; NULL != cur; ++i, cur = iter.next()) {
+    for (int i = 0; cur; ++i, cur = iter.next()) {
         REPORTER_ASSERT(reporter, cur->fID == i);
     }
 }
@@ -228,7 +228,7 @@
                         next.next();
                         prev.prev();
 
-                        SkASSERT(NULL != iter.get());
+                        SkASSERT(iter.get());
                         // insert either before or after the iterator, then check that the
                         // surrounding sequence is correct.
                         if (2 == insertionMethod) {
@@ -237,10 +237,10 @@
                             newItem.prev();
                             REPORTER_ASSERT(reporter, newItem.get()->fID == id);
 
-                            if (NULL != next.get()) {
+                            if (next.get()) {
                                 REPORTER_ASSERT(reporter, next.prev()->fID == iter.get()->fID);
                             }
-                            if (NULL != prev.get()) {
+                            if (prev.get()) {
                                 REPORTER_ASSERT(reporter, prev.next()->fID == id);
                             }
                         } else {
@@ -249,10 +249,10 @@
                             newItem.next();
                             REPORTER_ASSERT(reporter, newItem.get()->fID == id);
 
-                            if (NULL != next.get()) {
+                            if (next.get()) {
                                 REPORTER_ASSERT(reporter, next.prev()->fID == id);
                             }
-                            if (NULL != prev.get()) {
+                            if (prev.get()) {
                                 REPORTER_ASSERT(reporter, prev.next()->fID == iter.get()->fID);
                             }
                         }
@@ -276,10 +276,10 @@
                 // find the element
                 Iter iter(list1, start);
                 while (n--) {
-                    REPORTER_ASSERT(reporter, NULL != iter.get());
+                    REPORTER_ASSERT(reporter, iter.get());
                     (iter.*incrFunc)();
                 }
-                REPORTER_ASSERT(reporter, NULL != iter.get());
+                REPORTER_ASSERT(reporter, iter.get());
 
                 // remember the prev and next elements from the element to be removed
                 Iter prev = iter;
diff --git a/tests/MallocPixelRefTest.cpp b/tests/MallocPixelRefTest.cpp
index cf5e054..c20c883 100644
--- a/tests/MallocPixelRefTest.cpp
+++ b/tests/MallocPixelRefTest.cpp
@@ -64,7 +64,7 @@
         SkAutoTUnref<SkMallocPixelRef> pr(
             SkMallocPixelRef::NewAllocate(info, rowBytes, NULL));
         REPORTER_ASSERT(reporter, pr.get() != NULL);
-        REPORTER_ASSERT(reporter, NULL != pr->pixels());
+        REPORTER_ASSERT(reporter, pr->pixels());
     }
     {
         void* addr = static_cast<void*>(new uint8_t[size]);
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 57587c4..35fbf2f 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -3377,7 +3377,7 @@
             REPORTER_ASSERT(reporter, 2*kRepeatCnt == pathRef->countPoints());
             REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countWeights());
             REPORTER_ASSERT(reporter, SkPath::kConic_SegmentMask == pathRef->getSegmentMasks());
-            REPORTER_ASSERT(reporter, NULL != weights);
+            REPORTER_ASSERT(reporter, weights);
             for (int i = 0; i < kRepeatCnt; ++i) {
                 REPORTER_ASSERT(reporter, SkPath::kConic_Verb == pathRef->atVerb(i));
             }
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index eb85c94..b1cdf7e 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -770,7 +770,7 @@
 
     const char *reason = NULL;
     REPORTER_ASSERT(reporter, !picture->suitableForGpuRasterization(NULL, &reason));
-    REPORTER_ASSERT(reporter, NULL != reason);
+    REPORTER_ASSERT(reporter, reason);
 
     canvas = GENERATE_CANVAS(recorder, useNewPath);
     {
@@ -968,7 +968,7 @@
             SkPicture::AccelData::Key key = GrAccelData::ComputeAccelDataKey();
 
             const SkPicture::AccelData* data = pict->EXPERIMENTAL_getAccelData(key);
-            REPORTER_ASSERT(reporter, NULL != data);
+            REPORTER_ASSERT(reporter, data);
 
             const GrAccelData *gpuData = static_cast<const GrAccelData*>(data);
             REPORTER_ASSERT(reporter, 8 == gpuData->numSaveLayers());
@@ -1023,7 +1023,7 @@
                                       kHeight == info3.fSize.fHeight);
             REPORTER_ASSERT(reporter, info3.fOriginXform.isIdentity());
             REPORTER_ASSERT(reporter, 0 == info3.fOffset.fX && 0 == info3.fOffset.fY);
-            REPORTER_ASSERT(reporter, NULL != info3.fPaint);
+            REPORTER_ASSERT(reporter, info3.fPaint);
             REPORTER_ASSERT(reporter, !info3.fIsNested && !info3.fHasNestedLayers);
 
             REPORTER_ASSERT(reporter, info4.fValid);
diff --git a/tests/RTreeTest.cpp b/tests/RTreeTest.cpp
index 087f19a..40af5fe 100644
--- a/tests/RTreeTest.cpp
+++ b/tests/RTreeTest.cpp
@@ -84,7 +84,7 @@
 static void rtree_test_main(SkRTree* rtree, skiatest::Reporter* reporter) {
     DataRect rects[NUM_RECTS];
     SkRandom rand;
-    REPORTER_ASSERT(reporter, NULL != rtree);
+    REPORTER_ASSERT(reporter, rtree);
 
     int expectedDepthMin = -1;
     int expectedDepthMax = -1;
diff --git a/tests/RecordTestUtils.h b/tests/RecordTestUtils.h
index db3f02d..0575b83 100644
--- a/tests/RecordTestUtils.h
+++ b/tests/RecordTestUtils.h
@@ -24,7 +24,7 @@
     ReadAs<T> reader;
     record.visit<void>(index, reader);
     REPORTER_ASSERT(r, T::kType == reader.type);
-    REPORTER_ASSERT(r, NULL != reader.ptr);
+    REPORTER_ASSERT(r, SkToBool(reader.ptr));
     return reader.ptr;
 }
 
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index c08e75f..a66b036 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -74,7 +74,7 @@
 
     ~TestResource() {
         --fAlive;
-        if (NULL != fToDelete) {
+        if (fToDelete) {
             // Breaks our little 2-element cycle below.
             fToDelete->setDeleteWhenDestroyed(NULL, NULL);
             fCache->deleteResource(fToDelete->getCacheEntry());
@@ -274,7 +274,7 @@
 
         REPORTER_ASSERT(reporter, 300 == cache.getCachedResourceBytes());
         REPORTER_ASSERT(reporter, 2 == cache.getCachedResourceCount());
-        REPORTER_ASSERT(reporter, NULL != cache.find(key1));
+        REPORTER_ASSERT(reporter, cache.find(key1));
         // Internal resource cache validation will test the detached size (debug mode only).
     }
 }
diff --git a/tests/SListTest.cpp b/tests/SListTest.cpp
index 72a8281..78fcc65 100644
--- a/tests/SListTest.cpp
+++ b/tests/SListTest.cpp
@@ -27,7 +27,7 @@
         ERRORF(reporter, "%s - List count is not zero, %d instead", stage, list.getCount());
         return false;
     }
-    if (NULL != list.head()) {
+    if (list.head()) {
         ERRORF(reporter, "%s - List has elements when empty", stage);
         return false;
     }
@@ -55,7 +55,7 @@
         }
         next = next->next();
     }
-    if (NULL != next) {
+    if (next) {
         ERRORF(reporter, "%s - List too long, should be %d", stage, count);
         return false;
     }
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp
index b5582dc..23cc33d 100644
--- a/tests/SerializationTest.cpp
+++ b/tests/SerializationTest.cpp
@@ -198,7 +198,7 @@
         // This should have succeeded, since there are enough bytes to read this
         REPORTER_ASSERT(reporter, buffer2.isValid());
         REPORTER_ASSERT(reporter, static_cast<size_t>(peekAfter - peekBefore) == bytesWritten);
-        REPORTER_ASSERT(reporter, NULL != obj2);
+        REPORTER_ASSERT(reporter, obj2);
     } else {
         // If the deserialization was supposed to fail, make sure it did
         REPORTER_ASSERT(reporter, !buffer.isValid());
@@ -490,7 +490,7 @@
         SkValidatingReadBuffer reader(static_cast<void*>(data.get()), size);
         SkAutoTUnref<SkPicture> readPict(
             SkPicture::CreateFromBuffer(reader));
-        REPORTER_ASSERT(reporter, NULL != readPict.get());
+        REPORTER_ASSERT(reporter, readPict.get());
     }
 
     TestPictureTypefaceSerialization(reporter);
diff --git a/tests/SkResourceCacheTest.cpp b/tests/SkResourceCacheTest.cpp
index dbd327c..b660890 100644
--- a/tests/SkResourceCacheTest.cpp
+++ b/tests/SkResourceCacheTest.cpp
@@ -79,7 +79,7 @@
     SkBitmap cachedBitmap;
     cachedBitmap.setInfo(info);
     SkBitmap::Allocator* allocator = SkBitmapCache::GetAllocator();
-    if (NULL != allocator) {
+    if (allocator) {
         allocator->allocPixelRef(&cachedBitmap, 0);
     } else {
         cachedBitmap.allocPixels();
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index eca929e..a175f64 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -139,7 +139,7 @@
             continue;   // gpu may not be enabled
         }
         const void* addr = image->peekPixels(&info, &rowBytes);
-        bool success = (NULL != addr);
+        bool success = SkToBool(addr);
         REPORTER_ASSERT(reporter, gRec[i].fPeekShouldSucceed == success);
         if (success) {
             REPORTER_ASSERT(reporter, 10 == info.width());
@@ -199,7 +199,7 @@
             surface->getCanvas()->clear(color);
 
             const void* addr = surface->getCanvas()->peekPixels(&info, &rowBytes);
-            bool success = (NULL != addr);
+            bool success = SkToBool(addr);
             REPORTER_ASSERT(reporter, gRec[i].fPeekShouldSucceed == success);
 
             SkImageInfo info2;
@@ -389,7 +389,7 @@
     SkAutoTUnref<SkImage> image(surface->newImageSnapshot());
     GrTexture* texture = image->getTexture();
     if (surfaceType == kGpu_SurfaceType || surfaceType == kGpuScratch_SurfaceType) {
-        REPORTER_ASSERT(reporter, NULL != texture);
+        REPORTER_ASSERT(reporter, texture);
         REPORTER_ASSERT(reporter, 0 != texture->getTextureHandle());
     } else {
         REPORTER_ASSERT(reporter, NULL == texture);
@@ -444,14 +444,14 @@
 
 #if SK_SUPPORT_GPU
     TestGetTexture(reporter, kRaster_SurfaceType, NULL);
-    if (NULL != factory) {
+    if (factory) {
         for (int i= 0; i < GrContextFactory::kGLContextTypeCnt; ++i) {
             GrContextFactory::GLContextType glCtxType = (GrContextFactory::GLContextType) i;
             if (!GrContextFactory::IsRenderingGLContext(glCtxType)) {
                 continue;
             }
             GrContext* context = factory->get(glCtxType);
-            if (NULL != context) {
+            if (context) {
                 TestSurfaceInCache(reporter, kGpu_SurfaceType, context);
                 TestSurfaceInCache(reporter, kGpuScratch_SurfaceType, context);
                 Test_crbug263329(reporter, kGpu_SurfaceType, context);
diff --git a/tests/TextBlobTest.cpp b/tests/TextBlobTest.cpp
index 7495ef3..70c9ddc 100644
--- a/tests/TextBlobTest.cpp
+++ b/tests/TextBlobTest.cpp
@@ -175,9 +175,9 @@
         }
 
         SkAutoTUnref<const SkTextBlob> blob(builder.build());
-        REPORTER_ASSERT(reporter, (NULL != blob->fGlyphBuffer) == (glyphCount > 0));
-        REPORTER_ASSERT(reporter, (NULL != blob->fPosBuffer) == (posCount > 0));
-        REPORTER_ASSERT(reporter, (NULL != blob->fRuns.get()) == (inCount > 0));
+        REPORTER_ASSERT(reporter, SkToBool(blob->fGlyphBuffer) == (glyphCount > 0));
+        REPORTER_ASSERT(reporter, SkToBool(blob->fPosBuffer) == (posCount > 0));
+        REPORTER_ASSERT(reporter, SkToBool(blob->fRuns.get()) == (inCount > 0));
 
         SkTextBlob::RunIterator it(blob);
         for (unsigned i = 0; i < outCount; ++i) {
diff --git a/tests/TextureCompressionTest.cpp b/tests/TextureCompressionTest.cpp
index b93cabb..7dd285d 100644
--- a/tests/TextureCompressionTest.cpp
+++ b/tests/TextureCompressionTest.cpp
@@ -134,7 +134,7 @@
         SkAutoLockPixels alp(bitmap);
 
         uint8_t* pixels = reinterpret_cast<uint8_t*>(bitmap.getPixels());
-        REPORTER_ASSERT(reporter, NULL != pixels);
+        REPORTER_ASSERT(reporter, pixels);
         if (NULL == pixels) {
             return;
         }
@@ -153,7 +153,7 @@
 
     SkAutoMalloc decompMemory(kWidth*kHeight);
     uint8_t* decompBuffer = reinterpret_cast<uint8_t*>(decompMemory.get());
-    REPORTER_ASSERT(reporter, NULL != decompBuffer);
+    REPORTER_ASSERT(reporter, decompBuffer);
     if (NULL == decompBuffer) {
         return;
     }
@@ -168,7 +168,7 @@
         }
 
         SkAutoDataUnref data(SkTextureCompressor::CompressBitmapToFormat(bitmap, fmt));
-        REPORTER_ASSERT(reporter, NULL != data);
+        REPORTER_ASSERT(reporter, data);
         if (NULL == data) {
             continue;
         }
@@ -182,7 +182,7 @@
 
         SkAutoLockPixels alp(bitmap);
         uint8_t* pixels = reinterpret_cast<uint8_t*>(bitmap.getPixels());
-        REPORTER_ASSERT(reporter, NULL != pixels);
+        REPORTER_ASSERT(reporter, pixels);
         if (NULL == pixels) {
             continue;
         }
@@ -228,7 +228,7 @@
     for (int lum = 0; lum < 256; ++lum) {
         bitmap.lockPixels();
         uint8_t* pixels = reinterpret_cast<uint8_t*>(bitmap.getPixels());
-        REPORTER_ASSERT(reporter, NULL != pixels);
+        REPORTER_ASSERT(reporter, pixels);
         if (NULL == pixels) {
             bitmap.unlockPixels();
             continue;
@@ -241,7 +241,7 @@
 
         SkAutoDataUnref latcData(
             SkTextureCompressor::CompressBitmapToFormat(bitmap, kLATCFormat));
-        REPORTER_ASSERT(reporter, NULL != latcData);
+        REPORTER_ASSERT(reporter, latcData);
         if (NULL == latcData) {
             continue;
         }