]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - test-suite/splay.cc
Maintenance: Removed most NULLs using modernize-use-nullptr (#1075)
[thirdparty/squid.git] / test-suite / splay.cc
index 81ded31f9f09de3136aa1df6f9a7087994e04dc3..e95d388cf087cc85527d825761d4619617d09135 100644 (file)
@@ -136,7 +136,7 @@ main(int, char *[])
 
     {
         /* test void * splay containers */
-        splayNode *top = NULL;
+        splayNode *top = nullptr;
 
         for (int i = 0; i < 100; ++i) {
             intnode *I = (intnode *)xcalloc(sizeof(intnode), 1);
@@ -148,10 +148,10 @@ main(int, char *[])
         }
 
         SplayCheck::BeginWalk();
-        top->walk(SplayCheck::WalkVoid, NULL);
+        top->walk(SplayCheck::WalkVoid, nullptr);
 
         SplayCheck::BeginWalk();
-        top->walk(SplayCheck::WalkVoid, NULL);
+        top->walk(SplayCheck::WalkVoid, nullptr);
         top->destroy(destintvoid);
     }
 
@@ -168,7 +168,7 @@ main(int, char *[])
         }
 
         SplayCheck::BeginWalk();
-        safeTop->walk(SplayCheck::WalkNode, NULL);
+        safeTop->walk(SplayCheck::WalkNode, nullptr);
 
         safeTop->destroy(destint);
     }
@@ -183,7 +183,7 @@ main(int, char *[])
         }
 
         SplayCheck::BeginWalk();
-        safeTop->walk(SplayCheck::WalkNodeRef, NULL);
+        safeTop->walk(SplayCheck::WalkNodeRef, nullptr);
 
         safeTop->destroy(destintref);
     }
@@ -194,20 +194,20 @@ main(int, char *[])
         intnode I;
         I.i = 1;
         /* check we don't segfault on NULL splay calls */
-        SplayCheck::WalkNodeRef(I, NULL);
+        SplayCheck::WalkNodeRef(I, nullptr);
         I.i = 0;
         SplayCheck::ExpectedFail = true;
-        SplayCheck::WalkNodeRef(I, NULL);
+        SplayCheck::WalkNodeRef(I, nullptr);
     }
 
     {
         /* check for begin() */
         Splay<intnode> *safeTop = new Splay<intnode>();
 
-        if (safeTop->start() != NULL)
+        if (safeTop->start() != nullptr)
             exit(EXIT_FAILURE);
 
-        if (safeTop->finish() != NULL)
+        if (safeTop->finish() != nullptr)
             exit(EXIT_FAILURE);
 
         for (int i = 0; i < 100; ++i) {
@@ -244,7 +244,7 @@ main(int, char *[])
     {
         Splay<intnode *> aSplay;
 
-        if (aSplay.start() != NULL)
+        if (aSplay.start() != nullptr)
             exit(EXIT_FAILURE);
 
         if (aSplay.size() != 0)
@@ -252,7 +252,7 @@ main(int, char *[])
 
         aSplay.insert (new intnode(5), compareint);
 
-        if (aSplay.start() == NULL)
+        if (aSplay.start() == nullptr)
             exit(EXIT_FAILURE);
 
         if (aSplay.size() != 1)
@@ -260,7 +260,7 @@ main(int, char *[])
 
         aSplay.destroy(destint);
 
-        if (aSplay.start() != NULL)
+        if (aSplay.start() != nullptr)
             exit(EXIT_FAILURE);
 
         if (aSplay.size() != 0)