]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/store_rebuild.cc
Maintenance: Removed most NULLs using modernize-use-nullptr (#1075)
[thirdparty/squid.git] / src / store_rebuild.cc
index b315064f202e5db45cf3097b67c63dba94a4d850..2d9e9a88c5f2940a4869583ca08eb6aef87a123c 100644 (file)
@@ -38,7 +38,7 @@ typedef struct {
     int scanned;
 } store_rebuild_progress;
 
-static store_rebuild_progress *RebuildProgress = NULL;
+static store_rebuild_progress *RebuildProgress = nullptr;
 
 void
 StoreRebuildData::updateStartTime(const timeval &dirStartTime)
@@ -54,7 +54,7 @@ storeCleanup(void *)
     static int validated = 0;
     static int seen = 0;
 
-    if (currentSearch == NULL || currentSearch->isDone())
+    if (currentSearch == nullptr || currentSearch->isDone())
         currentSearch = Store::Root().search();
 
     size_t statCount = 500;
@@ -111,9 +111,9 @@ storeCleanup(void *)
         if (store_digest)
             storeDigestNoteStoreReady();
 
-        currentSearch = NULL;
+        currentSearch = nullptr;
     } else
-        eventAdd("storeCleanup", storeCleanup, NULL, 0.0, 1);
+        eventAdd("storeCleanup", storeCleanup, nullptr, 0.0, 1);
 }
 
 /* meta data recreated from disk image in swap directory */
@@ -164,11 +164,11 @@ storeRebuildComplete(StoreRebuildData *dc)
            ((double) counts.objcount / (dt > 0.0 ? dt : 1.0)) << " objects/sec).");
     debugs(20, Important(56), "Beginning Validation Procedure");
 
-    eventAdd("storeCleanup", storeCleanup, NULL, 0.0, 1);
+    eventAdd("storeCleanup", storeCleanup, nullptr, 0.0, 1);
 
     xfree(RebuildProgress);
 
-    RebuildProgress = NULL;
+    RebuildProgress = nullptr;
 }
 
 /*
@@ -213,7 +213,7 @@ storeRebuildProgress(int sd_index, int total, int sofar)
     if (sd_index >= Config.cacheSwap.n_configured)
         return;
 
-    if (NULL == RebuildProgress)
+    if (nullptr == RebuildProgress)
         return;
 
     RebuildProgress[sd_index].total = total;
@@ -349,7 +349,7 @@ storeRebuildParseEntry(MemBuf &buf, StoreEntry &tmpe, cache_key *key,
     InitStoreEntry visitor(&tmpe, key);
     for_each(*tlv_list, visitor);
     storeSwapTLVFree(tlv_list);
-    tlv_list = NULL;
+    tlv_list = nullptr;
 
     if (storeKeyNull(key)) {
         debugs(47, DBG_IMPORTANT, "WARNING: Ignoring keyless cache entry");