From ced4da13279f834c381925f2ecd1649bfb459e8b Mon Sep 17 00:00:00 2001 From: James Peach Date: Fri, 14 Oct 2016 10:56:16 -0700 Subject: [PATCH] TS-4977: Prefer nullptr to NULL. --- .clang-tidy | 2 +- cmd/traffic_cop/traffic_cop.cc | 72 +- cmd/traffic_crashlog/procinfo.cc | 4 +- cmd/traffic_crashlog/traffic_crashlog.cc | 22 +- cmd/traffic_ctl/alarm.cc | 12 +- cmd/traffic_ctl/config.cc | 18 +- cmd/traffic_ctl/metric.cc | 14 +- cmd/traffic_ctl/plugin.cc | 2 +- cmd/traffic_ctl/server.cc | 16 +- cmd/traffic_ctl/storage.cc | 2 +- cmd/traffic_ctl/traffic_ctl.cc | 22 +- cmd/traffic_ctl/traffic_ctl.h | 10 +- cmd/traffic_layout/traffic_layout.cc | 12 +- cmd/traffic_manager/MgmtHandlers.cc | 16 +- cmd/traffic_manager/WebOverview.cc | 60 +- cmd/traffic_manager/WebOverview.h | 8 +- cmd/traffic_manager/metrics.cc | 10 +- cmd/traffic_manager/traffic_manager.cc | 84 +-- cmd/traffic_top/stats.h | 24 +- cmd/traffic_top/traffic_top.cc | 8 +- cmd/traffic_via/traffic_via.cc | 16 +- example/append-transform/append-transform.c | 3 +- example/basic-auth/basic-auth.c | 3 +- example/cache-scan/cache-scan.cc | 16 +- .../cppapi/async_http_fetch/AsyncHttpFetch.cc | 4 +- example/cppapi/boom/boom.cc | 6 +- example/cppapi/websocket/WSBuffer.cc | 2 +- example/intercept/intercept.cc | 28 +- example/null-transform/null-transform.c | 3 +- example/passthru/passthru.cc | 6 +- example/protocol-stack/protocol-stack.cc | 4 +- example/protocol/Protocol.c | 3 +- example/protocol/TxnSM.c | 49 +- example/query-remap/query-remap.c | 3 +- example/remap/remap.cc | 18 +- example/remap_header_add/remap_header_add.cc | 8 +- example/response-header-1/response-header-1.c | 6 +- example/secure-link/secure-link.c | 6 +- example/server-transform/server-transform.c | 12 +- example/ssl-preaccept/ssl-preaccept.cc | 8 +- .../ssl-sni-whitelist/ssl-sni-whitelist.cc | 14 +- example/ssl-sni/ssl-sni.cc | 12 +- example/statistic/statistic.cc | 2 +- iocore/aio/AIO.cc | 44 +- iocore/aio/test_AIO.cc | 4 +- iocore/cache/Cache.cc | 126 ++-- iocore/cache/CacheDir.cc | 56 +- iocore/cache/CacheDisk.cc | 24 +- iocore/cache/CacheHosting.cc | 76 +-- iocore/cache/CacheHttp.cc | 4 +- iocore/cache/CacheLink.cc | 20 +- iocore/cache/CachePages.cc | 28 +- iocore/cache/CachePagesInternal.cc | 4 +- iocore/cache/CacheRead.cc | 110 +-- iocore/cache/CacheTest.cc | 46 +- iocore/cache/CacheVol.cc | 32 +- iocore/cache/CacheWrite.cc | 68 +- iocore/cache/I_Cache.h | 2 +- iocore/cache/I_Store.h | 10 +- iocore/cache/P_CacheArray.h | 6 +- iocore/cache/P_CacheDisk.h | 10 +- iocore/cache/P_CacheHosting.h | 8 +- iocore/cache/P_CacheHttp.h | 2 +- iocore/cache/P_CacheInternal.h | 32 +- iocore/cache/P_CacheTest.h | 2 +- iocore/cache/P_CacheVol.h | 8 +- iocore/cache/RamCacheCLFUS.cc | 34 +- iocore/cache/RamCacheLRU.cc | 6 +- iocore/cache/Store.cc | 42 +- iocore/cluster/ClusterAPI.cc | 14 +- iocore/cluster/ClusterCache.cc | 160 ++--- iocore/cluster/ClusterConfig.cc | 32 +- iocore/cluster/ClusterHandler.cc | 144 ++-- iocore/cluster/ClusterHandlerBase.cc | 81 ++- iocore/cluster/ClusterLib.cc | 8 +- iocore/cluster/ClusterLoadMonitor.cc | 10 +- iocore/cluster/ClusterMachine.cc | 24 +- iocore/cluster/ClusterProcessor.cc | 32 +- iocore/cluster/ClusterRPC.cc | 14 +- iocore/cluster/ClusterVConnection.cc | 38 +- iocore/cluster/P_ClusterCache.h | 24 +- iocore/cluster/P_ClusterCacheInternal.h | 8 +- iocore/cluster/P_ClusterHandler.h | 10 +- iocore/cluster/P_ClusterInline.h | 4 +- iocore/cluster/P_ClusterMachine.h | 6 +- iocore/cluster/test_I_Cluster.cc | 2 +- iocore/cluster/test_P_Cluster.cc | 2 +- iocore/dns/DNS.cc | 70 +- iocore/dns/DNSConnection.cc | 3 +- iocore/dns/I_DNSProcessor.h | 2 +- iocore/dns/P_DNSProcessor.h | 8 +- iocore/dns/P_SplitDNSProcessor.h | 4 +- iocore/dns/SplitDNS.cc | 56 +- iocore/dns/test_I_DNS.cc | 2 +- iocore/dns/test_P_DNS.cc | 2 +- iocore/eventsystem/IOBuffer.cc | 2 +- iocore/eventsystem/I_Action.h | 6 +- iocore/eventsystem/I_Continuation.h | 10 +- iocore/eventsystem/I_EThread.h | 18 +- iocore/eventsystem/I_Event.h | 4 +- iocore/eventsystem/I_EventProcessor.h | 11 +- iocore/eventsystem/I_IOBuffer.h | 24 +- iocore/eventsystem/I_Lock.h | 28 +- iocore/eventsystem/I_SocketManager.h | 8 +- iocore/eventsystem/I_Thread.h | 2 +- iocore/eventsystem/I_VConnection.h | 10 +- iocore/eventsystem/PQ-List.cc | 2 +- iocore/eventsystem/P_Freer.h | 6 +- iocore/eventsystem/P_IOBuffer.h | 38 +- iocore/eventsystem/P_UnixEThread.h | 2 +- iocore/eventsystem/P_UnixEvent.h | 2 +- iocore/eventsystem/P_VConnection.h | 12 +- iocore/eventsystem/P_VIO.h | 6 +- iocore/eventsystem/Processor.cc | 2 +- iocore/eventsystem/ProtectedQueue.cc | 8 +- iocore/eventsystem/Thread.cc | 2 +- iocore/eventsystem/UnixEThread.cc | 20 +- iocore/eventsystem/UnixEventProcessor.cc | 18 +- iocore/eventsystem/test_Buffer.cc | 2 +- iocore/eventsystem/test_Event.cc | 2 +- iocore/hostdb/HostDB.cc | 139 ++-- iocore/hostdb/I_HostDBProcessor.h | 6 +- iocore/hostdb/P_HostDBProcessor.h | 22 +- iocore/hostdb/P_RefCountCache.h | 16 +- iocore/hostdb/P_RefCountCacheSerializer.h | 2 +- iocore/hostdb/include/Machine.h | 4 +- iocore/hostdb/test_I_HostDB.cc | 2 +- iocore/hostdb/test_RefCountCache.cc | 12 +- iocore/net/BIO_fastopen.cc | 10 +- iocore/net/I_NetProcessor.h | 4 +- iocore/net/I_NetVConnection.h | 12 +- iocore/net/I_SessionAccept.h | 6 +- iocore/net/I_UDPPacket.h | 8 +- iocore/net/Net.cc | 4 +- iocore/net/NetVCTest.cc | 34 +- iocore/net/NetVConnection.cc | 4 +- iocore/net/OCSPStapling.cc | 66 +- iocore/net/P_Connection.h | 6 +- iocore/net/P_InkBulkIO.h | 2 +- iocore/net/P_LibBulkIO.h | 20 +- iocore/net/P_NetAccept.h | 6 +- iocore/net/P_SSLCertLookup.h | 12 +- iocore/net/P_SSLNetVConnection.h | 10 +- iocore/net/P_SSLUtils.h | 22 +- iocore/net/P_Socks.h | 6 +- iocore/net/P_UDPConnection.h | 8 +- iocore/net/P_UDPIOEvent.h | 4 +- iocore/net/P_UDPNet.h | 10 +- iocore/net/P_UDPPacket.h | 14 +- iocore/net/P_UnixCompletionUtil.h | 2 +- iocore/net/P_UnixNet.h | 12 +- iocore/net/P_UnixNetProcessor.h | 4 +- iocore/net/P_UnixNetVConnection.h | 8 +- iocore/net/P_UnixUDPConnection.h | 8 +- iocore/net/SSLCertLookup.cc | 18 +- iocore/net/SSLClientUtils.cc | 20 +- iocore/net/SSLConfig.cc | 78 ++- iocore/net/SSLDynlock.cc | 2 +- iocore/net/SSLInternal.cc | 2 +- iocore/net/SSLNetProcessor.cc | 4 +- iocore/net/SSLNetVConnection.cc | 96 +-- iocore/net/SSLNextProtocolAccept.cc | 14 +- iocore/net/SSLNextProtocolSet.cc | 16 +- iocore/net/SSLSessionCache.cc | 6 +- iocore/net/SSLUtils.cc | 175 ++--- iocore/net/SessionAccept.cc | 4 +- iocore/net/Socks.cc | 48 +- iocore/net/UnixConnection.cc | 6 +- iocore/net/UnixNet.cc | 38 +- iocore/net/UnixNetAccept.cc | 18 +- iocore/net/UnixNetPages.cc | 4 +- iocore/net/UnixNetProcessor.cc | 10 +- iocore/net/UnixNetVConnection.cc | 68 +- iocore/net/UnixUDPConnection.cc | 26 +- iocore/net/UnixUDPNet.cc | 70 +- iocore/net/test_I_Net.cc | 4 +- iocore/net/test_I_UDPNet.cc | 2 +- iocore/net/test_P_Net.cc | 2 +- iocore/net/test_P_UDPNet.cc | 2 +- iocore/net/test_certlookup.cc | 18 +- iocore/utils/I_Machine.h | 2 +- iocore/utils/I_OneWayMultiTunnel.h | 10 +- iocore/utils/I_OneWayTunnel.h | 16 +- iocore/utils/Machine.cc | 10 +- iocore/utils/OneWayMultiTunnel.cc | 8 +- iocore/utils/OneWayTunnel.cc | 28 +- iocore/utils/diags.i | 4 +- lib/bindings/bindings.cc | 12 +- lib/bindings/lua.h | 2 +- lib/bindings/metrics.cc | 8 +- lib/bindings/repl.cc | 2 +- lib/cppapi/AsyncHttpFetch.cc | 10 +- lib/cppapi/AsyncTimer.cc | 8 +- lib/cppapi/ClientRequest.cc | 6 +- lib/cppapi/GlobalPlugin.cc | 2 +- lib/cppapi/GzipDeflateTransformation.cc | 4 +- lib/cppapi/GzipInflateTransformation.cc | 4 +- lib/cppapi/Headers.cc | 4 +- lib/cppapi/InterceptPlugin.cc | 26 +- lib/cppapi/Logger.cc | 2 +- lib/cppapi/Request.cc | 20 +- lib/cppapi/Response.cc | 8 +- lib/cppapi/Transaction.cc | 56 +- lib/cppapi/TransactionPlugin.cc | 2 +- lib/cppapi/TransformationPlugin.cc | 18 +- lib/cppapi/Url.cc | 2 +- lib/cppapi/include/atscppapi/Async.h | 8 +- lib/cppapi/include/atscppapi/AsyncHttpFetch.h | 2 +- lib/cppapi/include/atscppapi/Transaction.h | 2 +- lib/cppapi/utils.cc | 12 +- lib/cppapi/utils_internal.cc | 4 +- lib/records/I_RecCore.h | 8 +- lib/records/I_RecDefs.h | 2 +- lib/records/I_RecHttp.h | 12 +- lib/records/I_RecLocal.h | 2 +- lib/records/I_RecMutex.h | 2 +- lib/records/I_RecProcess.h | 4 +- lib/records/P_RecCore.cc | 46 +- lib/records/P_RecCore.h | 2 +- lib/records/RecConfigParse.cc | 24 +- lib/records/RecCore.cc | 78 +-- lib/records/RecDebug.cc | 4 +- lib/records/RecHttp.cc | 27 +- lib/records/RecLocal.cc | 16 +- lib/records/RecMessage.cc | 14 +- lib/records/RecMutex.cc | 6 +- lib/records/RecProcess.cc | 12 +- lib/records/RecRawStats.cc | 6 +- lib/records/RecUtils.cc | 16 +- lib/records/test_I_RecLocal.cc | 12 +- lib/records/test_RecTree.cc | 2 +- lib/records/test_RecordsConfig.cc | 30 +- lib/ts/Allocator.h | 8 +- lib/ts/Arena.cc | 6 +- lib/ts/Arena.h | 2 +- lib/ts/BaseLogFile.cc | 36 +- lib/ts/BaseLogFile.h | 2 +- lib/ts/ConsistentHash.cc | 8 +- lib/ts/ConsistentHash.h | 12 +- lib/ts/ContFlags.cc | 2 +- lib/ts/Diags.cc | 82 +-- lib/ts/Diags.h | 2 +- lib/ts/DynArray.h | 6 +- lib/ts/EventNotify.cc | 2 +- lib/ts/HashMD5.cc | 6 +- lib/ts/HostLookup.cc | 158 ++--- lib/ts/HostLookup.h | 2 +- lib/ts/IntrusiveDList.h | 4 +- lib/ts/IpMap.cc | 36 +- lib/ts/IpMap.h | 8 +- lib/ts/IpMapConf.cc | 8 +- lib/ts/Layout.cc | 8 +- lib/ts/List.h | 46 +- lib/ts/MMH.cc | 2 +- lib/ts/Map.h | 10 +- lib/ts/MatcherUtils.cc | 64 +- lib/ts/MatcherUtils.h | 8 +- lib/ts/ParseRules.h | 2 +- lib/ts/RbTree.cc | 22 +- lib/ts/Regex.cc | 22 +- lib/ts/Regression.cc | 16 +- lib/ts/SourceLocation.cc | 4 +- lib/ts/TextBuffer.cc | 10 +- lib/ts/Tokenizer.cc | 32 +- lib/ts/Trie.h | 10 +- lib/ts/TsBuffer.h | 6 +- lib/ts/X509HostnameValidator.cc | 16 +- lib/ts/hugepages.cc | 8 +- lib/ts/ink_args.cc | 4 +- lib/ts/ink_args.h | 12 +- lib/ts/ink_cap.cc | 14 +- lib/ts/ink_defs.cc | 6 +- lib/ts/ink_defs.h | 5 - lib/ts/ink_error.cc | 2 +- lib/ts/ink_file.h | 2 +- lib/ts/ink_hash_table.cc | 18 +- lib/ts/ink_hash_table.h | 2 +- lib/ts/ink_hrtime.cc | 8 +- lib/ts/ink_hrtime.h | 4 +- lib/ts/ink_inet.cc | 48 +- lib/ts/ink_inet.h | 18 +- lib/ts/ink_lockfile.h | 4 +- lib/ts/ink_memory.cc | 22 +- lib/ts/ink_memory.h | 8 +- lib/ts/ink_mutex.h | 2 +- lib/ts/ink_queue.cc | 38 +- lib/ts/ink_res_init.cc | 38 +- lib/ts/ink_res_mkquery.cc | 10 +- lib/ts/ink_resolver.h | 4 +- lib/ts/ink_resource.cc | 8 +- lib/ts/ink_rwlock.cc | 2 +- lib/ts/ink_sprintf.cc | 2 +- lib/ts/ink_string++.cc | 14 +- lib/ts/ink_string++.h | 48 +- lib/ts/ink_string.cc | 12 +- lib/ts/ink_string.h | 6 +- lib/ts/ink_syslog.cc | 2 +- lib/ts/ink_thread.h | 8 +- lib/ts/ink_time.cc | 6 +- lib/ts/llqueue.cc | 22 +- lib/ts/signals.cc | 16 +- lib/ts/test_Map.cc | 12 +- lib/ts/test_PriorityQueue.cc | 8 +- lib/ts/test_Ptr.cc | 6 +- lib/ts/test_X509HostnameValidator.cc | 34 +- lib/ts/test_arena.cc | 2 +- lib/ts/test_atomic.cc | 4 +- lib/ts/test_freelist.cc | 10 +- lib/tsconfig/Errata.cc | 2 +- lib/tsconfig/TsBuilder.cc | 4 +- lib/tsconfig/TsValue.cc | 4 +- mgmt/Alarms.cc | 36 +- mgmt/BaseManager.cc | 10 +- mgmt/FileManager.cc | 54 +- mgmt/LocalManager.cc | 34 +- mgmt/MultiFile.cc | 12 +- mgmt/ProcessManager.cc | 10 +- mgmt/ProxyConfig.cc | 16 +- mgmt/RecordsConfig.cc | 646 +++++++++--------- mgmt/RecordsConfigUtils.cc | 10 +- mgmt/Rollback.cc | 32 +- mgmt/WebMgmtUtils.cc | 40 +- mgmt/api/APITestCliRemote.cc | 40 +- mgmt/api/CfgContextImpl.cc | 78 +-- mgmt/api/CfgContextManager.cc | 40 +- mgmt/api/CfgContextUtils.cc | 154 ++--- mgmt/api/CoreAPI.cc | 10 +- mgmt/api/CoreAPIRemote.cc | 58 +- mgmt/api/CoreAPIShared.cc | 2 +- mgmt/api/EventCallback.cc | 22 +- mgmt/api/EventControlMain.cc | 62 +- mgmt/api/GenericParser.cc | 93 +-- mgmt/api/INKMgmtAPI.cc | 84 +-- mgmt/api/NetworkMessage.cc | 8 +- mgmt/api/NetworkUtilsLocal.cc | 4 +- mgmt/api/NetworkUtilsRemote.cc | 44 +- mgmt/api/TSControlMain.cc | 60 +- mgmt/cluster/ClusterCom.cc | 107 +-- mgmt/cluster/VMap.cc | 50 +- mgmt/utils/ExpandingArray.cc | 2 +- mgmt/utils/MgmtLocalCleanup.cc | 2 +- mgmt/utils/MgmtMarshall.cc | 6 +- mgmt/utils/MgmtSocket.cc | 8 +- mgmt/utils/MgmtUtils.cc | 6 +- mgmt/utils/test_marshall.cc | 42 +- plugins/authproxy/authproxy.cc | 72 +- plugins/background_fetch/background_fetch.cc | 52 +- plugins/background_fetch/configs.cc | 28 +- plugins/background_fetch/headers.cc | 2 +- plugins/background_fetch/rules.cc | 4 +- plugins/conf_remap/conf_remap.cc | 26 +- plugins/esi/combo_handler.cc | 26 +- plugins/esi/esi.cc | 110 +-- plugins/esi/fetcher/HttpDataFetcherImpl.cc | 8 +- plugins/esi/lib/DocNode.cc | 2 +- plugins/esi/lib/EsiGunzip.cc | 2 +- plugins/esi/lib/EsiProcessor.cc | 4 +- plugins/esi/lib/FailureInfo.cc | 4 +- plugins/esi/lib/HandlerManager.cc | 2 +- plugins/esi/lib/Stats.cc | 2 +- plugins/esi/lib/Utils.cc | 8 +- plugins/esi/lib/Variables.cc | 2 +- plugins/esi/lib/gzip.cc | 2 +- plugins/esi/serverIntercept.cc | 12 +- plugins/esi/test/StubIncludeHandler.cc | 2 +- plugins/esi/test/docnode_test.cc | 4 +- plugins/esi/test/gzip_test.cc | 2 +- plugins/esi/test/parser_test.cc | 12 +- plugins/esi/test/processor_test.cc | 6 +- plugins/esi/test/utils_test.cc | 25 +- plugins/esi/test/vars_test.cc | 6 +- plugins/experimental/balancer/balancer.cc | 14 +- plugins/experimental/balancer/hash.cc | 4 +- plugins/experimental/balancer/roundrobin.cc | 2 +- .../buffer_upload/buffer_upload.cc | 118 ++-- .../cache_promote/cache_promote.cc | 34 +- .../cache_range_requests.cc | 38 +- plugins/experimental/cachekey/cachekey.cc | 12 +- plugins/experimental/cachekey/configs.cc | 42 +- plugins/experimental/cachekey/pattern.cc | 24 +- plugins/experimental/cachekey/plugin.cc | 6 +- .../collapsed_connection.cc | 86 +-- .../custom_redirect/custom_redirect.cc | 4 +- plugins/experimental/epic/epic.cc | 20 +- plugins/experimental/escalate/escalate.cc | 12 +- plugins/experimental/geoip_acl/acl.cc | 14 +- plugins/experimental/geoip_acl/geoip_acl.cc | 4 +- .../experimental/header_freq/header_freq.cc | 2 +- .../header_normalize/header_normalize.cc | 6 +- plugins/experimental/hipes/hipes.cc | 10 +- plugins/experimental/inliner/ats-inliner.cc | 28 +- plugins/experimental/inliner/cache.cc | 18 +- plugins/experimental/inliner/chunk-decoder.cc | 12 +- plugins/experimental/inliner/fetcher.cc | 8 +- .../experimental/inliner/inliner-handler.cc | 14 +- plugins/experimental/inliner/ts.cc | 112 +-- .../memcached_remap/memcached_remap.cc | 4 +- plugins/experimental/metalink/metalink.cc | 16 +- plugins/experimental/mp4/mp4.cc | 24 +- plugins/experimental/mp4/mp4_meta.cc | 40 +- .../multiplexer/ats-multiplexer.cc | 20 +- .../experimental/multiplexer/chunk-decoder.cc | 12 +- plugins/experimental/multiplexer/dispatch.cc | 38 +- plugins/experimental/multiplexer/fetcher.cc | 8 +- .../multiplexer/original-request.cc | 30 +- plugins/experimental/multiplexer/post.cc | 32 +- .../experimental/remap_stats/remap_stats.c | 47 +- .../ssl_cert_loader/domain-tree.cc | 14 +- .../ssl_cert_loader/ssl-cert-loader.cc | 44 +- plugins/experimental/sslheaders/sslheaders.cc | 18 +- .../sslheaders/test_sslheaders.cc | 4 +- plugins/experimental/sslheaders/util.cc | 4 +- .../stale_while_revalidate.c | 9 +- .../stream_editor/stream_editor.cc | 44 +- plugins/experimental/ts_lua/ts_lua.c | 3 +- .../ts_lua/ts_lua_client_request.c | 6 +- .../ts_lua/ts_lua_client_response.c | 3 +- .../experimental/ts_lua/ts_lua_coroutine.c | 3 +- plugins/experimental/ts_lua/ts_lua_crypto.c | 6 +- plugins/experimental/ts_lua/ts_lua_fetch.c | 15 +- .../ts_lua/ts_lua_http_intercept.c | 6 +- plugins/experimental/ts_lua/ts_lua_io.c | 3 +- plugins/experimental/ts_lua/ts_lua_log.c | 3 +- plugins/experimental/ts_lua/ts_lua_misc.c | 6 +- plugins/experimental/ts_lua/ts_lua_package.c | 6 +- .../ts_lua/ts_lua_server_request.c | 3 +- .../ts_lua/ts_lua_server_response.c | 3 +- .../experimental/ts_lua/ts_lua_transform.c | 9 +- plugins/experimental/ts_lua/ts_lua_util.c | 3 +- plugins/experimental/url_sig/url_sig.c | 33 +- plugins/generator/generator.cc | 10 +- plugins/gzip/gzip.cc | 42 +- plugins/header_rewrite/conditions.cc | 44 +- plugins/header_rewrite/expander.cc | 2 +- plugins/header_rewrite/factory.cc | 8 +- plugins/header_rewrite/header_rewrite.cc | 14 +- plugins/header_rewrite/lulu.cc | 6 +- plugins/header_rewrite/operators.cc | 16 +- plugins/header_rewrite/regex_helper.cc | 10 +- plugins/header_rewrite/ruleset.cc | 10 +- plugins/header_rewrite/statement.cc | 2 +- plugins/healthchecks/healthchecks.c | 38 +- plugins/regex_remap/regex_remap.cc | 66 +- plugins/regex_revalidate/regex_revalidate.c | 63 +- plugins/s3_auth/s3_auth.cc | 40 +- plugins/stats_over_http/stats_over_http.c | 12 +- plugins/tcpinfo/tcpinfo.cc | 36 +- plugins/xdebug/xdebug.cc | 22 +- proxy/AbstractBuffer.cc | 2 +- proxy/CacheControl.cc | 22 +- proxy/ControlBase.cc | 37 +- proxy/ControlMatcher.cc | 104 +-- proxy/CoreUtils.cc | 28 +- proxy/Crash.cc | 4 +- proxy/EventName.cc | 2 +- proxy/FetchSM.cc | 12 +- proxy/ICP.cc | 176 ++--- proxy/ICPConfig.cc | 35 +- proxy/IPAllow.cc | 29 +- proxy/IPAllow.h | 2 +- proxy/InkAPI.cc | 390 +++++------ proxy/InkAPITest.cc | 379 +++++----- proxy/InkIOCoreAPI.cc | 18 +- proxy/Main.cc | 94 +-- proxy/ParentConsistentHash.cc | 36 +- proxy/ParentRoundRobin.cc | 14 +- proxy/ParentSelection.cc | 100 +-- proxy/Plugin.cc | 22 +- proxy/PluginVC.cc | 86 +-- proxy/ProtocolProbeSessionAccept.cc | 14 +- proxy/ProxyClientSession.cc | 18 +- proxy/ProxyClientTransaction.cc | 17 +- proxy/RegressionSM.cc | 14 +- proxy/ReverseProxy.cc | 4 +- proxy/SocksProxy.cc | 42 +- proxy/StatPages.cc | 8 +- proxy/Transform.cc | 50 +- proxy/hdrs/HTTP.cc | 109 +-- proxy/hdrs/HdrHeap.cc | 78 +-- proxy/hdrs/HdrTSOnly.cc | 4 +- proxy/hdrs/HdrTest.cc | 103 +-- proxy/hdrs/HdrToken.cc | 26 +- proxy/hdrs/HdrUtils.cc | 4 +- proxy/hdrs/HttpCompat.cc | 12 +- proxy/hdrs/MIME.cc | 156 ++--- proxy/hdrs/URL.cc | 78 ++- proxy/http/Http1ClientSession.cc | 58 +- proxy/http/Http1ClientTransaction.cc | 8 +- proxy/http/HttpBodyFactory.cc | 128 ++-- proxy/http/HttpCacheSM.cc | 44 +- proxy/http/HttpConfig.cc | 24 +- proxy/http/HttpPages.cc | 32 +- proxy/http/HttpProxyServerMain.cc | 16 +- proxy/http/HttpSM.cc | 602 ++++++++-------- proxy/http/HttpServerSession.cc | 14 +- proxy/http/HttpSessionAccept.cc | 6 +- proxy/http/HttpSessionManager.cc | 18 +- proxy/http/HttpTransact.cc | 320 ++++----- proxy/http/HttpTransactCache.cc | 38 +- proxy/http/HttpTransactHeaders.cc | 18 +- proxy/http/HttpTunnel.cc | 132 ++-- proxy/http/HttpUpdateSM.cc | 12 +- proxy/http/HttpUpdateTester.cc | 2 +- proxy/http/RegressionHttpTransact.cc | 6 +- proxy/http/remap/AclFiltering.cc | 14 +- proxy/http/remap/RemapConfig.cc | 152 ++--- proxy/http/remap/RemapPluginInfo.cc | 24 +- proxy/http/remap/RemapPlugins.cc | 10 +- proxy/http/remap/RemapProcessor.cc | 28 +- proxy/http/remap/UrlMapping.cc | 34 +- proxy/http/remap/UrlMappingPathIndex.cc | 4 +- proxy/http/remap/UrlRewrite.cc | 48 +- proxy/http2/HPACK.cc | 12 +- proxy/http2/HTTP2.cc | 28 +- proxy/http2/Http2ClientSession.cc | 24 +- proxy/http2/Http2ConnectionState.cc | 63 +- proxy/http2/Http2SessionAccept.cc | 6 +- proxy/http2/Http2Stream.cc | 56 +- proxy/http2/HuffmanCodec.cc | 4 +- proxy/http2/RegressionHPACK.cc | 6 +- proxy/http2/test_HPACK.cc | 12 +- proxy/http2/test_Http2DependencyTree.cc | 26 +- proxy/logging/Log.cc | 60 +- proxy/logging/LogAccess.cc | 124 ++-- proxy/logging/LogAccessHttp.cc | 69 +- proxy/logging/LogAccessICP.cc | 4 +- proxy/logging/LogBindings.cc | 30 +- proxy/logging/LogBuffer.cc | 52 +- proxy/logging/LogCollationAccept.cc | 6 +- proxy/logging/LogCollationClientSM.cc | 142 ++-- proxy/logging/LogCollationHostSM.cc | 72 +- proxy/logging/LogConfig.cc | 32 +- proxy/logging/LogField.cc | 70 +- proxy/logging/LogFile.cc | 16 +- proxy/logging/LogFilter.cc | 76 +-- proxy/logging/LogFormat.cc | 124 ++-- proxy/logging/LogHost.cc | 40 +- proxy/logging/LogObject.cc | 30 +- proxy/logging/LogSock.cc | 34 +- proxy/logging/LogStandalone.cc | 14 +- proxy/logging/LogUtils.cc | 10 +- proxy/shared/DiagsConfig.cc | 49 +- proxy/shared/UglyLogStubs.cc | 40 +- 543 files changed, 7533 insertions(+), 7349 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 0afc80f86b0..cac411cce14 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1 +1 @@ -Checks: -*,readability-braces-around-statements +Checks: -*,readability-braces-around-statements,modernize-use-nullptr diff --git a/cmd/traffic_cop/traffic_cop.cc b/cmd/traffic_cop/traffic_cop.cc index 2b1011144af..9aaf88b099f 100644 --- a/cmd/traffic_cop/traffic_cop.cc +++ b/cmd/traffic_cop/traffic_cop.cc @@ -339,7 +339,7 @@ set_alarm_death() cop_log_trace("Entering set_alarm_death()\n"); #if defined(solaris) - action.sa_handler = NULL; + action.sa_handler = nullptr; action.sa_sigaction = sig_fatal; sigemptyset(&action.sa_mask); action.sa_flags = SA_SIGINFO; @@ -349,7 +349,7 @@ set_alarm_death() action.sa_flags = 0; #endif - sigaction(SIGALRM, &action, NULL); + sigaction(SIGALRM, &action, nullptr); cop_log_trace("Leaving set_alarm_death()\n"); } @@ -360,7 +360,7 @@ set_alarm_warn() cop_log_trace("Entering set_alarm_warn()\n"); #if defined(solaris) - action.sa_handler = NULL; + action.sa_handler = nullptr; action.sa_sigaction = sig_alarm_warn; sigemptyset(&action.sa_mask); action.sa_flags = SA_SIGINFO; @@ -370,7 +370,7 @@ set_alarm_warn() action.sa_flags = 0; #endif - sigaction(SIGALRM, &action, NULL); + sigaction(SIGALRM, &action, nullptr); cop_log_trace("Leaving set_alarm_warn()\n"); } @@ -441,7 +441,7 @@ millisleep(int ms) cop_log_trace("Entering millisleep(%d)\n", ms); ts.tv_sec = ms / 1000; ts.tv_nsec = (ms - ts.tv_sec * 1000) * 1000 * 1000; - nanosleep(&ts, NULL); + nanosleep(&ts, nullptr); cop_log_trace("Leaving millisleep(%d)\n", ms); } @@ -489,7 +489,7 @@ static void config_register_default(const RecordElement *record, void *) { if (record->type == RECT_CONFIG || record->type == RECT_LOCAL) { - const char *value = record->value ? record->value : ""; // splooch NULL values so std::string can swallow them + const char *value = record->value ? record->value : ""; // splooch nullptr values so std::string can swallow them configTable[std::string(record->name)] = ConfigValue(record->type, record->value_type, value); } } @@ -628,7 +628,7 @@ config_reload_records() } configTable.clear(); - RecordsConfigIterate(config_register_default, NULL); + RecordsConfigIterate(config_register_default, nullptr); if (RecConfigFileParse(config_file, config_register_variable, false) != REC_ERR_OKAY) { cop_log(COP_FATAL, "could not parse \"%s\"\n", config_file); @@ -702,7 +702,7 @@ config_reload_records() static void get_admin_user() { - struct passwd *pwd = NULL; + struct passwd *pwd = nullptr; if (!admin_user) { admin_user = (char *)ats_malloc(MAX_LOGIN); @@ -775,8 +775,8 @@ spawn_manager() EnableDeathSignal(SIGTERM); // Bind stdout and stderr of traffic_manager to traffic.out - execl(prog, prog, "--" TM_OPT_BIND_STDOUT, log_file, "--" TM_OPT_BIND_STDERR, log_file, NULL); - cop_log_trace("Somehow execv(%s, options, NULL) failed: %s (%d)!\n", prog, strerror(errno), errno); + execl(prog, prog, "--" TM_OPT_BIND_STDOUT, log_file, "--" TM_OPT_BIND_STDERR, log_file, nullptr); + cop_log_trace("Somehow execv(%s, options, nullptr) failed: %s (%d)!\n", prog, strerror(errno), errno); exit(1); } else if (child == -1) { cop_log(COP_FATAL, "unable to fork [%d '%s']\n", errno, strerror(errno)); @@ -821,12 +821,12 @@ poll_write(int fd, int timeout) } static int -open_socket(int port, const char *ip = NULL, const char *ip_to_bind = NULL) +open_socket(int port, const char *ip = nullptr, const char *ip_to_bind = nullptr) { int sock = 0; struct addrinfo hints; - struct addrinfo *result = NULL; - struct addrinfo *result_to_bind = NULL; + struct addrinfo *result = nullptr; + struct addrinfo *result_to_bind = nullptr; char port_str[8] = {'\0'}; int err = 0; @@ -869,7 +869,7 @@ open_socket(int port, const char *ip = NULL, const char *ip_to_bind = NULL) hints.ai_family = result->ai_family; hints.ai_socktype = result->ai_socktype; - err = getaddrinfo(ip_to_bind, NULL, &hints, &result_to_bind); + err = getaddrinfo(ip_to_bind, nullptr, &hints, &result_to_bind); if (err != 0) { cop_log(COP_WARNING, "(test) unable to get address info [%d %s] at ip %s\n", err, gai_strerror(err), ip_to_bind); freeaddrinfo(result_to_bind); @@ -936,7 +936,7 @@ open_socket(int port, const char *ip = NULL, const char *ip_to_bind = NULL) static int test_port(int port, const char *request, char *buffer, int bufsize, int64_t test_timeout, const char *ip = NULL, - const char *ip_to_bind = NULL) + const char *ip_to_bind = nullptr) { int64_t start_time, timeout; int sock; @@ -1167,7 +1167,7 @@ test_rs_port() static int test_mgmt_cli_port() { - TSString val = NULL; + TSString val = nullptr; int ret = 0; if (TSRecordGetString("proxy.config.manager_binary", &val) != TS_ERR_OKAY) { @@ -1187,7 +1187,7 @@ test_mgmt_cli_port() } static int -test_http_port(int port, char *request, int timeout, const char *ip = NULL, char const *ip_to_bind = NULL) +test_http_port(int port, char *request, int timeout, const char *ip = nullptr, char const *ip_to_bind = nullptr) { char buffer[4096]; char *p; @@ -1689,8 +1689,8 @@ init_signals() sigemptyset(&action.sa_mask); action.sa_flags = 0; - sigaction(SIGTERM, &action, NULL); - sigaction(SIGINT, &action, NULL); + sigaction(SIGTERM, &action, nullptr); + sigaction(SIGINT, &action, nullptr); // Handle the SIGCHLD signal. We simply reap all children that // die (which should only be spawned traffic_manager's). @@ -1698,14 +1698,14 @@ init_signals() sigemptyset(&action.sa_mask); action.sa_flags = 0; - sigaction(SIGCHLD, &action, NULL); + sigaction(SIGCHLD, &action, nullptr); // Handle a bunch of fatal signals. We simply call abort() when // these signals arrive in order to generate a core. There is some // difficulty with generating core files when linking with libthread // under solaris. #if defined(solaris) - action.sa_handler = NULL; + action.sa_handler = nullptr; action.sa_sigaction = sig_fatal; #else action.sa_handler = sig_fatal; @@ -1717,14 +1717,14 @@ init_signals() action.sa_flags = 0; #endif - sigaction(SIGQUIT, &action, NULL); - sigaction(SIGILL, &action, NULL); - sigaction(SIGFPE, &action, NULL); - sigaction(SIGBUS, &action, NULL); - sigaction(SIGSEGV, &action, NULL); + sigaction(SIGQUIT, &action, nullptr); + sigaction(SIGILL, &action, nullptr); + sigaction(SIGFPE, &action, nullptr); + sigaction(SIGBUS, &action, nullptr); + sigaction(SIGSEGV, &action, nullptr); #if !defined(linux) - sigaction(SIGEMT, &action, NULL); - sigaction(SIGSYS, &action, NULL); + sigaction(SIGEMT, &action, nullptr); + sigaction(SIGSYS, &action, nullptr); #endif // Handle the SIGALRM signal. We use this signal to make sure the @@ -1737,7 +1737,7 @@ init_signals() sigemptyset(&action.sa_mask); action.sa_flags = 0; - sigaction(SIGPIPE, &action, NULL); + sigaction(SIGPIPE, &action, nullptr); cop_log_trace("Leaving init_signals()\n"); } @@ -1794,7 +1794,7 @@ init() // Start up the records store and load the defaults so that we can locate our configuration. RecConfigFileInit(); - RecordsConfigIterate(config_register_default, NULL); + RecordsConfigIterate(config_register_default, nullptr); init_signals(); init_syslog(); @@ -1816,9 +1816,9 @@ init() } static const ArgumentDescription argument_descriptions[] = { - {"debug", 'd', "Enable debug logging", "F", &debug_flag, NULL, NULL}, - {"stdout", 'o', "Print log messages to standard output", "F", &stdout_flag, NULL, NULL}, - {"stop", 's', "Send child processes SIGSTOP instead of SIGKILL", "F", &stop_flag, NULL, NULL}, + {"debug", 'd', "Enable debug logging", "F", &debug_flag, nullptr, nullptr}, + {"stdout", 'o', "Print log messages to standard output", "F", &stdout_flag, nullptr, nullptr}, + {"stop", 's', "Send child processes SIGSTOP instead of SIGKILL", "F", &stop_flag, nullptr, nullptr}, HELP_ARGUMENT_DESCRIPTION(), VERSION_ARGUMENT_DESCRIPTION()}; @@ -1844,7 +1844,7 @@ main(int /* argc */, const char *argv[]) signal(SIGTTIN, SIG_IGN); // setup supplementary groups if it is not set. any way, worth a try. - if (0 == getgroups(0, NULL)) { + if (0 == getgroups(0, nullptr)) { uid_t uid = getuid(); gid_t gid = getgid(); @@ -1852,7 +1852,7 @@ main(int /* argc */, const char *argv[]) char buf[bufSize]; struct passwd passwdInfo; - struct passwd *ppasswd = NULL; + struct passwd *ppasswd = nullptr; int res; res = getpwuid_r(uid, &passwdInfo, buf, bufSize, &ppasswd); if (!res && ppasswd) { @@ -1891,7 +1891,7 @@ main(int /* argc */, const char *argv[]) // Initialize and start it up. init(); - check(NULL); + check(nullptr); return 0; } diff --git a/cmd/traffic_crashlog/procinfo.cc b/cmd/traffic_crashlog/procinfo.cc index 440d303f28a..f647b89d280 100644 --- a/cmd/traffic_crashlog/procinfo.cc +++ b/cmd/traffic_crashlog/procinfo.cc @@ -43,7 +43,7 @@ procfd_readlink(pid_t pid, const char *fname) nbytes = readlink(path, resolved, MAXPATHLEN); if (nbytes == -1) { Note("readlink failed with %s", strerror(errno)); - return NULL; + return nullptr; } resolved[nbytes] = '\0'; @@ -144,7 +144,7 @@ crashlog_write_datime(FILE *fp, const crashlog_target &target) bool crashlog_write_backtrace(FILE *fp, const crashlog_target &) { - TSString trace = NULL; + TSString trace = nullptr; TSMgmtError mgmterr; // NOTE: sometimes we can't get a backtrace because the ptrace attach will fail with diff --git a/cmd/traffic_crashlog/traffic_crashlog.cc b/cmd/traffic_crashlog/traffic_crashlog.cc index fff02f67b2a..faf98dceb95 100644 --- a/cmd/traffic_crashlog/traffic_crashlog.cc +++ b/cmd/traffic_crashlog/traffic_crashlog.cc @@ -34,7 +34,7 @@ static int syslog_mode = false; static int debug_mode = false; static int wait_mode = false; -static char *host_triplet = NULL; +static char *host_triplet = nullptr; static int target_pid = getppid(); // If pid_t is not sizeof(int), we will have to jiggle argument parsing. @@ -42,18 +42,18 @@ extern char __pid_size_static_assert[sizeof(pid_t) == sizeof(int) ? 0 : -1]; static AppVersionInfo appVersionInfo; static const ArgumentDescription argument_descriptions[] = { - {"target", '-', "Target process ID", "I", &target_pid, NULL, NULL}, - {"host", '-', "Host triplet for the process being logged", "S*", &host_triplet, NULL, NULL}, - {"wait", '-', "Stop until signalled at startup", "F", &wait_mode, NULL, NULL}, - {"syslog", '-', "Syslog after writing a crash log", "F", &syslog_mode, NULL, NULL}, - {"debug", '-', "Enable debugging mode", "F", &debug_mode, NULL, NULL}, + {"target", '-', "Target process ID", "I", &target_pid, nullptr, nullptr}, + {"host", '-', "Host triplet for the process being logged", "S*", &host_triplet, nullptr, nullptr}, + {"wait", '-', "Stop until signalled at startup", "F", &wait_mode, nullptr, nullptr}, + {"syslog", '-', "Syslog after writing a crash log", "F", &syslog_mode, nullptr, nullptr}, + {"debug", '-', "Enable debugging mode", "F", &debug_mode, nullptr, nullptr}, HELP_ARGUMENT_DESCRIPTION(), VERSION_ARGUMENT_DESCRIPTION()}; static struct tm timestamp() { - time_t now = time(NULL); + time_t now = time(nullptr); struct tm tm; localtime_r(&now, &tm); @@ -80,7 +80,7 @@ crashlog_open(const char *path) int fd; fd = open(path, O_WRONLY | O_TRUNC | O_CREAT, 0400); - return (fd == -1) ? NULL : fdopen(fd, "w"); + return (fd == -1) ? nullptr : fdopen(fd, "w"); } int @@ -118,7 +118,7 @@ main(int /* argc ATS_UNUSED */, const char **argv) } Layout::create(); - RecProcessInit(RECM_STAND_ALONE, NULL /* diags */); + RecProcessInit(RECM_STAND_ALONE, nullptr /* diags */); LibRecordsConfigInit(); if (syslog_mode) { @@ -148,7 +148,7 @@ main(int /* argc ATS_UNUSED */, const char **argv) Note("crashlog started, target=%ld, debug=%s syslog=%s, uid=%ld euid=%ld", (long)target_pid, debug_mode ? "true" : "false", syslog_mode ? "true" : "false", (long)getuid(), (long)geteuid()); - mgmterr = TSInit(NULL, (TSInitOptionT)(TS_MGMT_OPT_NO_EVENTS | TS_MGMT_OPT_NO_SOCK_TESTS)); + mgmterr = TSInit(nullptr, (TSInitOptionT)(TS_MGMT_OPT_NO_EVENTS | TS_MGMT_OPT_NO_SOCK_TESTS)); if (mgmterr != TS_ERR_OKAY) { char *msg = TSGetErrorMessage(mgmterr); Warning("failed to intialize management API: %s", msg); @@ -179,7 +179,7 @@ main(int /* argc ATS_UNUSED */, const char **argv) logname = crashlog_name(); fp = debug_mode ? stdout : crashlog_open(logname); - if (fp == NULL) { + if (fp == nullptr) { Error("failed to create '%s': %s", logname, strerror(errno)); return 1; } diff --git a/cmd/traffic_ctl/alarm.cc b/cmd/traffic_ctl/alarm.cc index c341ffa21d2..5b014a4f26e 100644 --- a/cmd/traffic_ctl/alarm.cc +++ b/cmd/traffic_ctl/alarm.cc @@ -47,8 +47,8 @@ alarm_list(unsigned argc, const char **argv) TSMgmtError error; CtrlAlarmList alarms; - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments != 0) { - return CtrlCommandUsage("alarm list", NULL, 0); + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments != 0) { + return CtrlCommandUsage("alarm list", nullptr, 0); } error = TSActiveEventGetMlt(alarms.list); @@ -72,8 +72,8 @@ alarm_clear(unsigned argc, const char **argv) TSMgmtError error; CtrlAlarmList alarms; - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments != 0) { - return CtrlCommandUsage("alarm clear", NULL, 0); + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments != 0) { + return CtrlCommandUsage("alarm clear", nullptr, 0); } // First get the active alarms ... @@ -106,8 +106,8 @@ alarm_resolve(unsigned argc, const char **argv) TSMgmtError error; CtrlAlarmList alarms; - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments == 0) { - return CtrlCommandUsage("alarm resolve ALARM [ALARM ...]", NULL, 0); + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments == 0) { + return CtrlCommandUsage("alarm resolve ALARM [ALARM ...]", nullptr, 0); } for (unsigned i = 0; i < n_file_arguments; ++i) { diff --git a/cmd/traffic_ctl/config.cc b/cmd/traffic_ctl/config.cc index 3b9ba99e864..31e2f024177 100644 --- a/cmd/traffic_ctl/config.cc +++ b/cmd/traffic_ctl/config.cc @@ -166,7 +166,7 @@ rec_labelof(int rec_class) case RECT_LOCAL: return "LOCAL"; default: - return NULL; + return nullptr; } } @@ -194,7 +194,7 @@ config_get(unsigned argc, const char **argv) { int recfmt = 0; const ArgumentDescription opts[] = { - {"records", '-', "Emit output in records.config format", "F", &recfmt, NULL, NULL}, + {"records", '-', "Emit output in records.config format", "F", &recfmt, nullptr, nullptr}, }; if (!CtrlProcessArguments(argc, argv, opts, countof(opts)) || n_file_arguments < 1) { @@ -222,7 +222,7 @@ config_get(unsigned argc, const char **argv) static int config_describe(unsigned argc, const char **argv) { - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments < 1) { + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments < 1) { return CtrlCommandUsage("config describe RECORD [RECORD ...]"); } @@ -269,7 +269,7 @@ config_set(unsigned argc, const char **argv) TSMgmtError error; TSActionNeedT action; - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments != 2) { + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments != 2) { return CtrlCommandUsage("config set RECORD VALUE"); } @@ -303,7 +303,7 @@ config_match(unsigned argc, const char **argv) { int recfmt = 0; const ArgumentDescription opts[] = { - {"records", '-', "Emit output in records.config format", "F", &recfmt, NULL, NULL}, + {"records", '-', "Emit output in records.config format", "F", &recfmt, nullptr, nullptr}, }; if (!CtrlProcessArguments(argc, argv, opts, countof(opts)) || n_file_arguments < 1) { @@ -336,7 +336,7 @@ config_match(unsigned argc, const char **argv) static int config_reload(unsigned argc, const char **argv) { - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments != 0) { + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments != 0) { return CtrlCommandUsage("config reload"); } @@ -352,7 +352,7 @@ config_reload(unsigned argc, const char **argv) static int config_status(unsigned argc, const char **argv) { - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments != 0) { + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments != 0) { return CtrlCommandUsage("config status"); } @@ -395,7 +395,7 @@ config_defaults(unsigned argc, const char **argv) { int recfmt = 0; const ArgumentDescription opts[] = { - {"records", '-', "Emit output in records.config format", "F", &recfmt, NULL, NULL}, + {"records", '-', "Emit output in records.config format", "F", &recfmt, nullptr, nullptr}, }; if (!CtrlProcessArguments(argc, argv, opts, countof(opts)) || n_file_arguments != 0) { @@ -432,7 +432,7 @@ config_diff(unsigned argc, const char **argv) { int recfmt = 0; const ArgumentDescription opts[] = { - {"records", '-', "Emit output in records.config format", "F", &recfmt, NULL, NULL}, + {"records", '-', "Emit output in records.config format", "F", &recfmt, nullptr, nullptr}, }; if (!CtrlProcessArguments(argc, argv, opts, countof(opts)) || n_file_arguments != 0) { diff --git a/cmd/traffic_ctl/metric.cc b/cmd/traffic_ctl/metric.cc index 26d70d1617a..bee3356739e 100644 --- a/cmd/traffic_ctl/metric.cc +++ b/cmd/traffic_ctl/metric.cc @@ -27,8 +27,8 @@ static int metric_get(unsigned argc, const char **argv) { - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments < 1) { - return CtrlCommandUsage("metric get METRIC [METRIC ...]", NULL, 0); + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments < 1) { + return CtrlCommandUsage("metric get METRIC [METRIC ...]", nullptr, 0); } for (unsigned i = 0; i < n_file_arguments; ++i) { @@ -52,8 +52,8 @@ metric_get(unsigned argc, const char **argv) static int metric_match(unsigned argc, const char **argv) { - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments < 1) { - return CtrlCommandUsage("metric match [OPTIONS] REGEX [REGEX ...]", NULL, 0); + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments < 1) { + return CtrlCommandUsage("metric match [OPTIONS] REGEX [REGEX ...]", nullptr, 0); } for (unsigned i = 0; i < n_file_arguments; ++i) { @@ -84,14 +84,14 @@ metric_clear(unsigned argc, const char **argv) TSMgmtError error; const ArgumentDescription opts[] = { - {"cluster", '-', "Clear cluster metrics", "F", &cluster, NULL, NULL}, + {"cluster", '-', "Clear cluster metrics", "F", &cluster, nullptr, nullptr}, }; if (!CtrlProcessArguments(argc, argv, opts, countof(opts)) || n_file_arguments != 0) { return CtrlCommandUsage("metric clear [OPTIONS]", opts, countof(opts)); } - error = TSStatsReset(cluster, NULL); + error = TSStatsReset(cluster, nullptr); if (error != TS_ERR_OKAY) { CtrlMgmtError(error, "failed to clear %smetrics", cluster ? "cluster " : ""); return CTRL_EX_ERROR; @@ -107,7 +107,7 @@ metric_zero(unsigned argc, const char **argv) TSMgmtError error; const ArgumentDescription opts[] = { - {"cluster", '-', "Zero cluster metrics", "F", &cluster, NULL, NULL}, + {"cluster", '-', "Zero cluster metrics", "F", &cluster, nullptr, nullptr}, }; if (!CtrlProcessArguments(argc, argv, opts, countof(opts)) || n_file_arguments < 1) { diff --git a/cmd/traffic_ctl/plugin.cc b/cmd/traffic_ctl/plugin.cc index 9ae2dd02439..cec12fac9b5 100644 --- a/cmd/traffic_ctl/plugin.cc +++ b/cmd/traffic_ctl/plugin.cc @@ -26,7 +26,7 @@ static int plugin_msg(unsigned argc, const char **argv) { - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments != 2) { + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments != 2) { return CtrlCommandUsage("plugin msg TAG DATA"); } diff --git a/cmd/traffic_ctl/server.cc b/cmd/traffic_ctl/server.cc index b64c3fd3c5f..33f82ce1882 100644 --- a/cmd/traffic_ctl/server.cc +++ b/cmd/traffic_ctl/server.cc @@ -33,8 +33,8 @@ restart(unsigned argc, const char **argv, unsigned flags) const char *usage = (flags & TS_RESTART_OPT_CLUSTER) ? "cluster restart [OPTIONS]" : "server restart [OPTIONS]"; const ArgumentDescription opts[] = { - {"drain", '-', "Wait for client connections to drain before restarting", "F", &drain, NULL, NULL}, - {"manager", '-', "Restart traffic_manager as well as traffic_server", "F", &manager, NULL, NULL}, + {"drain", '-', "Wait for client connections to drain before restarting", "F", &drain, nullptr, nullptr}, + {"manager", '-', "Restart traffic_manager as well as traffic_server", "F", &manager, nullptr, nullptr}, }; if (!CtrlProcessArguments(argc, argv, opts, countof(opts)) || n_file_arguments != 0) { @@ -75,9 +75,9 @@ static int server_backtrace(unsigned argc, const char **argv) { TSMgmtError error; - TSString trace = NULL; + TSString trace = nullptr; - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments != 0) { + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments != 0) { return CtrlCommandUsage("server backtrace"); } @@ -95,7 +95,7 @@ server_backtrace(unsigned argc, const char **argv) static int server_status(unsigned argc, const char **argv) { - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments != 0) { + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments != 0) { return CtrlCommandUsage("server status"); } @@ -125,7 +125,7 @@ server_stop(unsigned argc, const char **argv) // TSProxyStateSet() is a synchronous API, returning only after the proxy has // been shut down. However, draining can take a long time and we don't want // to wait for it. Maybe the right approach is to make the stop async. - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments != 0) { + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments != 0) { return CtrlCommandUsage("server stop"); } @@ -147,8 +147,8 @@ server_start(unsigned argc, const char **argv) unsigned clear = TS_CACHE_CLEAR_NONE; const ArgumentDescription opts[] = { - {"clear-cache", '-', "Clear the disk cache on startup", "F", &cache, NULL, NULL}, - {"clear-hostdb", '-', "Clear the DNS cache on startup", "F", &hostdb, NULL, NULL}, + {"clear-cache", '-', "Clear the disk cache on startup", "F", &cache, nullptr, nullptr}, + {"clear-hostdb", '-', "Clear the DNS cache on startup", "F", &hostdb, nullptr, nullptr}, }; if (!CtrlProcessArguments(argc, argv, opts, countof(opts)) || n_file_arguments != 0) { diff --git a/cmd/traffic_ctl/storage.cc b/cmd/traffic_ctl/storage.cc index f5340c745ff..ebd96071eba 100644 --- a/cmd/traffic_ctl/storage.cc +++ b/cmd/traffic_ctl/storage.cc @@ -26,7 +26,7 @@ static int storage_offline(unsigned argc, const char **argv) { - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments == 0) { + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments == 0) { return CtrlCommandUsage("storage offline DEVICE [DEVICE ...]"); } diff --git a/cmd/traffic_ctl/traffic_ctl.cc b/cmd/traffic_ctl/traffic_ctl.cc index f1f367960ea..c67c0f86bb2 100644 --- a/cmd/traffic_ctl/traffic_ctl.cc +++ b/cmd/traffic_ctl/traffic_ctl.cc @@ -191,8 +191,8 @@ CtrlGenericSubcommand(const char *name, const subcommand *cmds, unsigned ncmds, CtrlCommandLine cmdline; // Process command line arguments and dump into variables - if (!CtrlProcessArguments(argc, argv, NULL, 0) || n_file_arguments < 1) { - return CtrlSubcommandUsage(name, cmds, ncmds, NULL, 0); + if (!CtrlProcessArguments(argc, argv, nullptr, 0) || n_file_arguments < 1) { + return CtrlSubcommandUsage(name, cmds, ncmds, nullptr, 0); } cmdline.init(n_file_arguments, file_arguments); @@ -203,7 +203,7 @@ CtrlGenericSubcommand(const char *name, const subcommand *cmds, unsigned ncmds, } } - return CtrlSubcommandUsage(name, cmds, ncmds, NULL, 0); + return CtrlSubcommandUsage(name, cmds, ncmds, nullptr, 0); } int @@ -215,9 +215,11 @@ main(int argc, const char **argv) CtrlVersionInfo.setup(PACKAGE_NAME, "traffic_ctl", PACKAGE_VERSION, __DATE__, __TIME__, BUILD_MACHINE, BUILD_PERSON, ""); program_name = CtrlVersionInfo.AppStr; - ArgumentDescription argument_descriptions[] = {{"debug", '-', "Enable debugging output", "F", &debug, NULL, NULL}, - HELP_ARGUMENT_DESCRIPTION(), - VERSION_ARGUMENT_DESCRIPTION()}; + ArgumentDescription argument_descriptions[] = { + {"debug", '-', "Enable debugging output", "F", &debug, nullptr, nullptr}, + HELP_ARGUMENT_DESCRIPTION(), + VERSION_ARGUMENT_DESCRIPTION(), + }; const subcommand commands[] = { {subcommand_alarm, "alarm", "Manipulate alarms"}, @@ -234,7 +236,7 @@ main(int argc, const char **argv) // Process command line arguments and dump into variables if (!CtrlProcessArguments(argc, argv, argument_descriptions, countof(argument_descriptions))) { - return CtrlSubcommandUsage(NULL, commands, countof(commands), argument_descriptions, countof(argument_descriptions)); + return CtrlSubcommandUsage(nullptr, commands, countof(commands), argument_descriptions, countof(argument_descriptions)); } if (debug) { @@ -246,13 +248,13 @@ main(int argc, const char **argv) CtrlDebug("debug logging active"); if (n_file_arguments < 1) { - return CtrlSubcommandUsage(NULL, commands, countof(commands), argument_descriptions, countof(argument_descriptions)); + return CtrlSubcommandUsage(nullptr, commands, countof(commands), argument_descriptions, countof(argument_descriptions)); } // Make a best effort to connect the control socket. If it turns out we are just displaying help or something then it // doesn't matter that we failed. If we end up performing some operation then that operation will fail and display the // error. - TSInit(NULL, static_cast(TS_MGMT_OPT_NO_EVENTS | TS_MGMT_OPT_NO_SOCK_TESTS)); + TSInit(nullptr, static_cast(TS_MGMT_OPT_NO_EVENTS | TS_MGMT_OPT_NO_SOCK_TESTS)); for (unsigned i = 0; i < countof(commands); ++i) { if (strcmp(file_arguments[0], commands[i].name) == 0) { @@ -265,5 +267,5 @@ main(int argc, const char **argv) // Done with the mgmt API. TSTerminate(); - return CtrlSubcommandUsage(NULL, commands, countof(commands), argument_descriptions, countof(argument_descriptions)); + return CtrlSubcommandUsage(nullptr, commands, countof(commands), argument_descriptions, countof(argument_descriptions)); } diff --git a/cmd/traffic_ctl/traffic_ctl.h b/cmd/traffic_ctl/traffic_ctl.h index 80c662ea145..b3ef645a934 100644 --- a/cmd/traffic_ctl/traffic_ctl.h +++ b/cmd/traffic_ctl/traffic_ctl.h @@ -47,7 +47,7 @@ extern AppVersionInfo CtrlVersionInfo; void CtrlMgmtError(TSMgmtError err, const char *fmt, ...) TS_PRINTFLIKE(2, 3); int CtrlSubcommandUsage(const char *name, const subcommand *cmds, unsigned ncmds, const ArgumentDescription *desc, unsigned ndesc); -int CtrlCommandUsage(const char *msg, const ArgumentDescription *desc = NULL, unsigned ndesc = 0); +int CtrlCommandUsage(const char *msg, const ArgumentDescription *desc = nullptr, unsigned ndesc = 0); bool CtrlProcessArguments(int argc, const char **argv, const ArgumentDescription *desc, unsigned ndesc); int CtrlUnimplementedCommand(unsigned argc, const char **argv); @@ -59,7 +59,7 @@ int CtrlGenericSubcommand(const char *, const subcommand *cmds, unsigned ncmds, TSMgmtError e = (expr); \ if (e != TS_ERR_OKAY) { \ CtrlDebug("%s failed with status %d", #expr, e); \ - CtrlMgmtError(e, NULL); \ + CtrlMgmtError(e, nullptr); \ return CTRL_EX_ERROR; \ } \ } while (0) @@ -166,7 +166,7 @@ struct CtrlMgmtRecordList : CtrlMgmtList { }; struct CtrlCommandLine { - CtrlCommandLine() { this->args.push_back(NULL); } + CtrlCommandLine() { this->args.push_back(nullptr); } void init(unsigned argc, const char **argv) { @@ -175,8 +175,8 @@ struct CtrlCommandLine { this->args.push_back(argv[i]); } - // Always NULL-terminate to keep ink_args happy. Note that we adjust arg() accordingly. - this->args.push_back(NULL); + // Always nullptr-terminate to keep ink_args happy. Note that we adjust arg() accordingly. + this->args.push_back(nullptr); } unsigned diff --git a/cmd/traffic_layout/traffic_layout.cc b/cmd/traffic_layout/traffic_layout.cc index ce5ed22c1e8..f10fc17b924 100644 --- a/cmd/traffic_layout/traffic_layout.cc +++ b/cmd/traffic_layout/traffic_layout.cc @@ -38,9 +38,9 @@ struct CommandLineArgs { static CommandLineArgs cl; const ArgumentDescription argument_descriptions[] = { - {"layout", 'l', "Show the layout (this is the default with no options given)", "T", &cl.layout, NULL, NULL}, - {"features", 'f', "Show the compiled features", "T", &cl.features, NULL, NULL}, - {"json", 'j', "Produce output in JSON format (when supported)", "T", &cl.json, NULL, NULL}, + {"layout", 'l', "Show the layout (this is the default with no options given)", "T", &cl.layout, nullptr, nullptr}, + {"features", 'f', "Show the compiled features", "T", &cl.features, nullptr, nullptr}, + {"json", 'j', "Produce output in JSON format (when supported)", "T", &cl.json, nullptr, nullptr}, HELP_ARGUMENT_DESCRIPTION(), VERSION_ARGUMENT_DESCRIPTION()}; @@ -141,7 +141,7 @@ produce_layout(bool json) { Layout::create(); - RecProcessInit(RECM_STAND_ALONE, NULL /* diags */); + RecProcessInit(RECM_STAND_ALONE, nullptr /* diags */); LibRecordsConfigInit(); if (json) { @@ -157,9 +157,9 @@ produce_layout(bool json) print_var("INCLUDEDIR", Layout::get()->includedir, json, false); // Dont' free this print_var("SNAPSHOTDIR", RecConfigReadSnapshotDir(), json); - print_var("records.config", RecConfigReadConfigPath(NULL, REC_CONFIG_FILE), json); + print_var("records.config", RecConfigReadConfigPath(nullptr, REC_CONFIG_FILE), json); print_var("remap.config", RecConfigReadConfigPath("proxy.config.url_remap.filename"), json); - print_var("plugin.config", RecConfigReadConfigPath(NULL, "plugin.config"), json); + print_var("plugin.config", RecConfigReadConfigPath(nullptr, "plugin.config"), json); print_var("ssl_multicert.config", RecConfigReadConfigPath("proxy.config.ssl.server.multicert.filename"), json); print_var("storage.config", RecConfigReadConfigPath("proxy.config.cache.storage_filename"), json); print_var("hosting.config", RecConfigReadConfigPath("proxy.config.cache.hosting_filename"), json); diff --git a/cmd/traffic_manager/MgmtHandlers.cc b/cmd/traffic_manager/MgmtHandlers.cc index ccc2b4cd447..f1a198c868a 100644 --- a/cmd/traffic_manager/MgmtHandlers.cc +++ b/cmd/traffic_manager/MgmtHandlers.cc @@ -186,7 +186,7 @@ synthetic_thread(void *info) } // Format the response - mime_format_date(dateBuf, time(NULL)); + mime_format_date(dateBuf, time(nullptr)); len = snprintf(buffer, sizeof(buffer), SyntheticResponse, dateBuf, (int)strlen(SyntheticData) * 3, SyntheticData, SyntheticData, SyntheticData); @@ -213,9 +213,9 @@ synthetic_thread(void *info) error: close_socket(clientFD); - ink_thread_exit(NULL); + ink_thread_exit(nullptr); - return NULL; + return nullptr; } void * @@ -235,7 +235,7 @@ mgmt_synthetic_main(void *) #if !defined(linux) // Start by blocking all signals sigfillset(&allSigs); - ink_thread_sigsetmask(SIG_SETMASK, &allSigs, NULL); + ink_thread_sigsetmask(SIG_SETMASK, &allSigs, nullptr); #endif if (aconf_port_arg > 0) { @@ -266,16 +266,12 @@ mgmt_synthetic_main(void *) mgmt_log("[SyntheticHealthServer] Connect by disallowed client %s, closing\n", inet_ntoa(clientInfo.sin_addr)); close_socket(clientFD); } else { - ink_thread thrId = ink_thread_create(synthetic_thread, (void *)&clientFD, 1, 0, NULL); - - if (thrId <= 0) { - mgmt_log("[SyntheticHealthServer] Failed to create worker thread"); - } + ink_thread_create(synthetic_thread, (void *)&clientFD, 1, 0, nullptr); } } ink_release_assert(!"impossible"); // should never get here - return NULL; + return nullptr; } /* diff --git a/cmd/traffic_manager/WebOverview.cc b/cmd/traffic_manager/WebOverview.cc index dbcda07602c..21433f558c7 100644 --- a/cmd/traffic_manager/WebOverview.cc +++ b/cmd/traffic_manager/WebOverview.cc @@ -58,12 +58,12 @@ overviewRecord::overviewRecord(unsigned long inet_addr, bool local, ClusterPeerI // If this is the local node, there is no cluster peer info // record. Remote nodes require a cluster peer info record - ink_assert((local == false && cpi != NULL) || (local == true && cpi == NULL)); + ink_assert((local == false && cpi != nullptr) || (local == true && cpi == nullptr)); // Set up the copy of the records array and initialize it if (local == true) { node_rec_data.num_recs = 0; - node_rec_data.recs = NULL; + node_rec_data.recs = nullptr; recordArraySize = 0; node_rec_first_ix = 0; } else { @@ -73,13 +73,13 @@ overviewRecord::overviewRecord(unsigned long inet_addr, bool local, ClusterPeerI memcpy(node_rec_data.recs, cpi->node_rec_data.recs, recordArraySize); // Recaculate the old relative index - RecGetRecordOrderAndId(node_rec_data.recs[0].name, &node_rec_first_ix, NULL); + RecGetRecordOrderAndId(node_rec_data.recs[0].name, &node_rec_first_ix, nullptr); } // Query for the name of the node. If it is not there, some // their cluster ip address name_l = this->readString("proxy.node.hostname_FQ", &name_found); - if (name_found == false || name_l == NULL) { + if (name_found == false || name_l == nullptr) { nameFailed.s_addr = inetAddr; mgmt_log("[overviewRecord::overviewRecord] Unable to find hostname for %s\n", inet_ntoa(nameFailed)); ats_free(name_l); // about to overwrite name_l, so we need to free it first @@ -127,7 +127,7 @@ overviewRecord::updateStatus(time_t currentTime, ClusterPeerInfo *cpi) // (remote nodes only) if (localNode == false) { memcpy(node_rec_data.recs, cpi->node_rec_data.recs, recordArraySize); - RecGetRecordOrderAndId(node_rec_data.recs[0].name, &node_rec_first_ix, NULL); + RecGetRecordOrderAndId(node_rec_data.recs[0].name, &node_rec_first_ix, nullptr); } } @@ -149,7 +149,7 @@ overviewRecord::readInteger(const char *name, bool *found) int rec_status = REC_ERR_OKAY; int order = -1; if (localNode == false) { - rec_status = RecGetRecordOrderAndId(name, &order, NULL); + rec_status = RecGetRecordOrderAndId(name, &order, nullptr); if (rec_status == REC_ERR_OKAY) { order -= node_rec_first_ix; // Offset ink_release_assert(order < node_rec_data.num_recs); @@ -175,7 +175,7 @@ overviewRecord::readFloat(const char *name, bool *found) int rec_status = REC_ERR_OKAY; int order = -1; if (localNode == false) { - rec_status = RecGetRecordOrderAndId(name, &order, NULL); + rec_status = RecGetRecordOrderAndId(name, &order, nullptr); if (rec_status == REC_ERR_OKAY) { order -= node_rec_first_ix; // Offset ink_release_assert(order < node_rec_data.num_recs); @@ -197,11 +197,11 @@ overviewRecord::readFloat(const char *name, bool *found) RecString overviewRecord::readString(const char *name, bool *found) { - RecString rec = NULL; + RecString rec = nullptr; int rec_status = REC_ERR_OKAY; int order = -1; if (localNode == false) { - rec_status = RecGetRecordOrderAndId(name, &order, NULL); + rec_status = RecGetRecordOrderAndId(name, &order, nullptr); if (rec_status == REC_ERR_OKAY) { order -= node_rec_first_ix; // Offset ink_release_assert(order < node_rec_data.num_recs); @@ -240,7 +240,7 @@ overviewRecord::readData(RecDataT varType, const char *name, bool *found) RecDataZero(RECD_NULL, &rec); if (localNode == false) { - rec_status = RecGetRecordOrderAndId(name, &order, NULL); + rec_status = RecGetRecordOrderAndId(name, &order, nullptr); if (rec_status == REC_ERR_OKAY) { order -= node_rec_first_ix; // Offset ink_release_assert(order < node_rec_data.num_recs); @@ -310,8 +310,8 @@ overviewPage::checkForUpdates() // ink_mutex_acquire(&accessLock); ink_mutex_acquire(&(lmgmt->ccom->mutex)); - currentTime = time(NULL); - for (entry = ink_hash_table_iterator_first(lmgmt->ccom->peers, &iterator_state); entry != NULL; + currentTime = time(nullptr); + for (entry = ink_hash_table_iterator_first(lmgmt->ccom->peers, &iterator_state); entry != nullptr; entry = ink_hash_table_iterator_next(lmgmt->ccom->peers, &iterator_state)) { tmp = (ClusterPeerInfo *)ink_hash_table_entry_value(lmgmt->ccom->peers, entry); @@ -355,10 +355,10 @@ overviewPage::addRecord(ClusterPeerInfo *cpi) { overviewRecord *newRec; - ink_assert(cpi != NULL); + ink_assert(cpi != nullptr); newRec = new overviewRecord(cpi->inet_address, false, cpi); - newRec->updateStatus(time(NULL), cpi); + newRec->updateStatus(time(nullptr), cpi); ink_hash_table_insert(nodeRecords, (InkHashTableKey)cpi->inet_address, (InkHashTableEntry *)newRec); @@ -398,14 +398,14 @@ overviewPage::addSelfRecord() // overviewRecord* overviewPage::findNodeByName(const char* nodeName) // // Returns a pointer to node name nodeName -// If node name is not found, returns NULL +// If node name is not found, returns nullptr // // CALLEE MUST BE HOLDING this->accessLock // overviewRecord * overviewPage::findNodeByName(const char *nodeName) { - overviewRecord *current = NULL; + overviewRecord *current = nullptr; bool nodeFound = false; // Do a linear search of the nodes for this nodeName. @@ -424,11 +424,11 @@ overviewPage::findNodeByName(const char *nodeName) if (nodeFound == true) { return current; } else { - return NULL; + return nullptr; } } -// MgmtString overviewPage::readString(const char* nodeName, char* *name, bool *found = NULL) +// MgmtString overviewPage::readString(const char* nodeName, char* *name, bool *found = nullptr) // // Looks up a node record for a specific by nodeName // CALLEE deallocates the string with free() @@ -436,7 +436,7 @@ overviewPage::findNodeByName(const char *nodeName) MgmtString overviewPage::readString(const char *nodeName, const char *name, bool *found) { - MgmtString r = NULL; + MgmtString r = nullptr; // bool nodeFound = false; bool valueFound = false; overviewRecord *node; @@ -445,19 +445,19 @@ overviewPage::readString(const char *nodeName, const char *name, bool *found) node = this->findNodeByName(nodeName); - if (node != NULL) { + if (node != nullptr) { r = node->readString(name, &valueFound); } ink_mutex_release(&accessLock); - if (found != NULL) { + if (found != nullptr) { *found = valueFound; } return r; } -// MgmtInt overviewPage::readInteger(const char* nodeName, char* *name, bool *found = NULL) +// MgmtInt overviewPage::readInteger(const char* nodeName, char* *name, bool *found = nullptr) // // Looks up a node record for a specific by nodeName // @@ -473,19 +473,19 @@ overviewPage::readInteger(const char *nodeName, const char *name, bool *found) node = this->findNodeByName(nodeName); - if (node != NULL) { + if (node != nullptr) { r = node->readInteger(name, &valueFound); } ink_mutex_release(&accessLock); - if (found != NULL) { + if (found != nullptr) { *found = valueFound; } return r; } -// MgmtFloat overviewPage::readFloat(const char* nodeName, char* *name, bool *found = NULL) +// MgmtFloat overviewPage::readFloat(const char* nodeName, char* *name, bool *found = nullptr) // // Looks up a node record for a specific by nodeName // @@ -501,12 +501,12 @@ overviewPage::readFloat(const char *nodeName, const char *name, bool *found) node = this->findNodeByName(nodeName); - if (node != NULL) { + if (node != nullptr) { r = node->readFloat(name, &valueFound); } ink_mutex_release(&accessLock); - if (found != NULL) { + if (found != nullptr) { *found = valueFound; } @@ -530,7 +530,7 @@ overviewPage::clusterSumData(RecDataT varType, const char *nodeVar, RecData *sum bool found; RecData recTmp; - ink_assert(sum != NULL); + ink_assert(sum != nullptr); RecDataZero(varType, sum); for (int i = 0; i < numHosts_local; i++) { @@ -606,13 +606,13 @@ overviewPage::resolvePeerHostname_ml(const char *peerIP) unsigned long int ipAddr; InkHashTableValue lookup; overviewRecord *peerRecord; - char *returnName = NULL; + char *returnName = nullptr; ipAddr = inet_addr(peerIP); // Check to see if our address is malformed if ((long int)ipAddr == -1) { - return NULL; + return nullptr; } if (ink_hash_table_lookup(nodeRecords, (InkHashTableKey)ipAddr, &lookup)) { diff --git a/cmd/traffic_manager/WebOverview.h b/cmd/traffic_manager/WebOverview.h index add7fb88c90..1d682e98949 100644 --- a/cmd/traffic_manager/WebOverview.h +++ b/cmd/traffic_manager/WebOverview.h @@ -71,7 +71,7 @@ class overviewRecord { public: - overviewRecord(unsigned long inet_addr, bool local, ClusterPeerInfo *cpi = NULL); + overviewRecord(unsigned long inet_addr, bool local, ClusterPeerInfo *cpi = nullptr); ~overviewRecord(); @@ -104,9 +104,9 @@ class overviewPage void checkForUpdates(); char *resolvePeerHostname(const char *peerIP); char *resolvePeerHostname_ml(const char *peerIP); - MgmtInt readInteger(const char *nodeName, const char *name, bool *found = NULL); - MgmtFloat readFloat(const char *nodeName, const char *name, bool *found = NULL); - MgmtString readString(const char *nodeName, const char *name, bool *found = NULL); + MgmtInt readInteger(const char *nodeName, const char *name, bool *found = nullptr); + MgmtFloat readFloat(const char *nodeName, const char *name, bool *found = nullptr); + MgmtString readString(const char *nodeName, const char *name, bool *found = nullptr); void addSelfRecord(); int varClusterDataFromName(RecDataT varType, const char *nodeVar, RecData *sum); diff --git a/cmd/traffic_manager/metrics.cc b/cmd/traffic_manager/metrics.cc index ad767391747..546dc3e99b8 100644 --- a/cmd/traffic_manager/metrics.cc +++ b/cmd/traffic_manager/metrics.cc @@ -35,7 +35,7 @@ #include "metrics.h" struct Evaluator { - Evaluator() : rec_name(NULL), data_type(RECD_NULL), ref(-1) {} + Evaluator() : rec_name(nullptr), data_type(RECD_NULL), ref(-1) {} ~Evaluator() { ats_free(this->rec_name); @@ -110,7 +110,7 @@ struct Evaluator { goto done; } - RecSetRecord(RECT_NULL, this->rec_name, this->data_type, &rec_value, NULL, REC_SOURCE_EXPLICIT); + RecSetRecord(RECT_NULL, this->rec_name, this->data_type, &rec_value, nullptr, REC_SOURCE_EXPLICIT); } done: @@ -190,7 +190,7 @@ metrics_register_evaluator(lua_State *L) binding = BindingInstance::self(L); evaluators = (EvaluatorList *)binding->retrieve_ptr("evaluators"); - ink_release_assert(evaluators != NULL); + ink_release_assert(evaluators != nullptr); eval = new Evaluator(); eval->bind(L, metric, chunk); @@ -355,7 +355,7 @@ metrics_binding_destroy(BindingInstance &binding) EvaluatorList *evaluators; evaluators = (EvaluatorList *)binding.retrieve_ptr("evaluators"); - binding.attach_ptr("evaluators", NULL); + binding.attach_ptr("evaluators", nullptr); delete evaluators; } @@ -365,7 +365,7 @@ metrics_binding_evaluate(BindingInstance &binding) EvaluatorList *evaluators; evaluators = (EvaluatorList *)binding.retrieve_ptr("evaluators"); - ink_release_assert(evaluators != NULL); + ink_release_assert(evaluators != nullptr); // Keep updating the namespace until it settles (ie. we make 0 updates). if (evaluators->update) { diff --git a/cmd/traffic_manager/traffic_manager.cc b/cmd/traffic_manager/traffic_manager.cc index 143915a1482..6183d365f89 100644 --- a/cmd/traffic_manager/traffic_manager.cc +++ b/cmd/traffic_manager/traffic_manager.cc @@ -66,7 +66,7 @@ #define DIAGS_LOG_FILENAME "manager.log" // These globals are still referenced directly by management API. -LocalManager *lmgmt = NULL; +LocalManager *lmgmt = nullptr; FileManager *configFiles; static void fileUpdated(char *fname, bool incVersion); @@ -85,7 +85,7 @@ static int proxy_off = false; static char bind_stdout[512] = ""; static char bind_stderr[512] = ""; -static const char *mgmt_path = NULL; +static const char *mgmt_path = nullptr; // By default, set the current directory as base static const char *recs_conf = "records.config"; @@ -227,7 +227,7 @@ initSignalHandlers() // Set up the signal handler #if !defined(linux) && !defined(freebsd) && !defined(darwin) - sigHandler.sa_handler = NULL; + sigHandler.sa_handler = nullptr; sigHandler.sa_sigaction = SignalHandler; #else sigHandler.sa_handler = SignalHandler; @@ -240,8 +240,8 @@ initSignalHandlers() // after the signal since not all calls are wrapped // to check errno for EINTR sigHandler.sa_flags = SA_RESTART; - sigaction(SIGHUP, &sigHandler, NULL); - sigaction(SIGUSR2, &sigHandler, NULL); + sigaction(SIGHUP, &sigHandler, nullptr); + sigaction(SIGUSR2, &sigHandler, nullptr); // Don't block the signal on entry to the signal // handler so we can reissue it and get a core @@ -251,15 +251,15 @@ initSignalHandlers() #else sigHandler.sa_flags = SA_RESETHAND; #endif - sigaction(SIGINT, &sigHandler, NULL); - sigaction(SIGQUIT, &sigHandler, NULL); - sigaction(SIGILL, &sigHandler, NULL); - sigaction(SIGBUS, &sigHandler, NULL); - sigaction(SIGSEGV, &sigHandler, NULL); - sigaction(SIGTERM, &sigHandler, NULL); + sigaction(SIGINT, &sigHandler, nullptr); + sigaction(SIGQUIT, &sigHandler, nullptr); + sigaction(SIGILL, &sigHandler, nullptr); + sigaction(SIGBUS, &sigHandler, nullptr); + sigaction(SIGSEGV, &sigHandler, nullptr); + sigaction(SIGTERM, &sigHandler, nullptr); #if !defined(linux) && !defined(freebsd) && !defined(darwin) - sigAlrmHandler.sa_handler = NULL; + sigAlrmHandler.sa_handler = nullptr; sigAlrmHandler.sa_sigaction = SignalAlrmHandler; #else sigAlrmHandler.sa_handler = SignalAlrmHandler; @@ -271,7 +271,7 @@ initSignalHandlers() #else sigAlrmHandler.sa_flags = 0; #endif - sigaction(SIGALRM, &sigAlrmHandler, NULL); + sigaction(SIGALRM, &sigAlrmHandler, nullptr); // Block the delivery of any signals we are not catching // @@ -290,7 +290,7 @@ initSignalHandlers() sigdelset(&sigsToBlock, SIGSEGV); sigdelset(&sigsToBlock, SIGTERM); sigdelset(&sigsToBlock, SIGALRM); - ink_thread_sigsetmask(SIG_SETMASK, &sigsToBlock, NULL); + ink_thread_sigsetmask(SIG_SETMASK, &sigsToBlock, nullptr); // Set up the SIGCHLD handler so we do not get into // a problem with Solaris 2.6 and strange waitpid() @@ -298,7 +298,7 @@ initSignalHandlers() sigChldHandler.sa_handler = SigChldHandler; sigChldHandler.sa_flags = SA_RESTART; sigemptyset(&sigChldHandler.sa_mask); - sigaction(SIGCHLD, &sigChldHandler, NULL); + sigaction(SIGCHLD, &sigChldHandler, nullptr); } static void @@ -413,7 +413,7 @@ millisleep(int ms) ts.tv_sec = ms / 1000; ts.tv_nsec = (ms - ts.tv_sec * 1000) * 1000 * 1000; - nanosleep(&ts, NULL); // we use nanosleep instead of sleep because it does not interact with signals + nanosleep(&ts, nullptr); // we use nanosleep instead of sleep because it does not interact with signals } int @@ -433,9 +433,9 @@ main(int argc, const char **argv) int cluster_mcport = -1, cluster_rsport = -1; // TODO: This seems completely incomplete, disabled for now // int dump_config = 0, dump_process = 0, dump_node = 0, dump_cluster = 0, dump_local = 0; - char *proxy_port = 0; + char *proxy_port = nullptr; int proxy_backdoor = -1; - char *group_addr = NULL, *tsArgs = NULL; + char *group_addr = nullptr, *tsArgs = nullptr; int disable_syslog = false; char userToRunAs[MAX_LOGIN + 1]; RecInt fds_throttle = -1; @@ -443,26 +443,26 @@ main(int argc, const char **argv) ink_thread synthThrId; int binding_version = 0; - BindingInstance *binding = NULL; + BindingInstance *binding = nullptr; ArgumentDescription argument_descriptions[] = { - {"proxyOff", '-', "Disable proxy", "F", &proxy_off, NULL, NULL}, - {"aconfPort", '-', "Autoconf port", "I", &aconf_port_arg, "MGMT_ACONF_PORT", NULL}, - {"clusterMCPort", '-', "Cluster multicast port", "I", &cluster_mcport, "MGMT_CLUSTER_MC_PORT", NULL}, - {"clusterRSPort", '-', "Cluster reliable service port", "I", &cluster_rsport, "MGMT_CLUSTER_RS_PORT", NULL}, - {"groupAddr", '-', "Multicast group address", "S*", &group_addr, "MGMT_GROUP_ADDR", NULL}, - {"path", '-', "Path to the management socket", "S*", &mgmt_path, NULL, NULL}, - {"recordsConf", '-', "Path to records.config", "S*", &recs_conf, NULL, NULL}, - {"tsArgs", '-', "Additional arguments for traffic_server", "S*", &tsArgs, NULL, NULL}, - {"proxyPort", '-', "HTTP port descriptor", "S*", &proxy_port, NULL, NULL}, - {"proxyBackDoor", '-', "Management port", "I", &proxy_backdoor, NULL, NULL}, - {TM_OPT_BIND_STDOUT, '-', "Regular file to bind stdout to", "S512", &bind_stdout, "PROXY_BIND_STDOUT", NULL}, - {TM_OPT_BIND_STDERR, '-', "Regular file to bind stderr to", "S512", &bind_stderr, "PROXY_BIND_STDERR", NULL}, + {"proxyOff", '-', "Disable proxy", "F", &proxy_off, nullptr, nullptr}, + {"aconfPort", '-', "Autoconf port", "I", &aconf_port_arg, "MGMT_ACONF_PORT", nullptr}, + {"clusterMCPort", '-', "Cluster multicast port", "I", &cluster_mcport, "MGMT_CLUSTER_MC_PORT", nullptr}, + {"clusterRSPort", '-', "Cluster reliable service port", "I", &cluster_rsport, "MGMT_CLUSTER_RS_PORT", nullptr}, + {"groupAddr", '-', "Multicast group address", "S*", &group_addr, "MGMT_GROUP_ADDR", nullptr}, + {"path", '-', "Path to the management socket", "S*", &mgmt_path, nullptr, nullptr}, + {"recordsConf", '-', "Path to records.config", "S*", &recs_conf, nullptr, nullptr}, + {"tsArgs", '-', "Additional arguments for traffic_server", "S*", &tsArgs, nullptr, nullptr}, + {"proxyPort", '-', "HTTP port descriptor", "S*", &proxy_port, nullptr, nullptr}, + {"proxyBackDoor", '-', "Management port", "I", &proxy_backdoor, nullptr, nullptr}, + {TM_OPT_BIND_STDOUT, '-', "Regular file to bind stdout to", "S512", &bind_stdout, "PROXY_BIND_STDOUT", nullptr}, + {TM_OPT_BIND_STDERR, '-', "Regular file to bind stderr to", "S512", &bind_stderr, "PROXY_BIND_STDERR", nullptr}, #if TS_USE_DIAGS - {"debug", 'T', "Vertical-bar-separated Debug Tags", "S1023", debug_tags, NULL, NULL}, - {"action", 'B', "Vertical-bar-separated Behavior Tags", "S1023", action_tags, NULL, NULL}, + {"debug", 'T', "Vertical-bar-separated Debug Tags", "S1023", debug_tags, nullptr, nullptr}, + {"action", 'B', "Vertical-bar-separated Behavior Tags", "S1023", action_tags, nullptr, nullptr}, #endif - {"nosyslog", '-', "Do not log to syslog", "F", &disable_syslog, NULL, NULL}, + {"nosyslog", '-', "Do not log to syslog", "F", &disable_syslog, nullptr, nullptr}, HELP_ARGUMENT_DESCRIPTION(), VERSION_ARGUMENT_DESCRIPTION() }; @@ -475,11 +475,11 @@ main(int argc, const char **argv) // Line buffer standard output & standard error int status; - status = setvbuf(stdout, NULL, _IOLBF, 0); + status = setvbuf(stdout, nullptr, _IOLBF, 0); if (status != 0) { perror("WARNING: can't line buffer stdout"); } - status = setvbuf(stderr, NULL, _IOLBF, 0); + status = setvbuf(stderr, nullptr, _IOLBF, 0); if (status != 0) { perror("WARNING: can't line buffer stderr"); } @@ -563,7 +563,7 @@ main(int argc, const char **argv) if (!disable_syslog) { char sys_var[] = "proxy.config.syslog_facility"; - char *facility_str = NULL; + char *facility_str = nullptr; int facility_int; facility_str = REC_readString(sys_var, &found); @@ -686,7 +686,7 @@ main(int argc, const char **argv) // can keep a consistent euid when create mgmtapi/eventapi unix // sockets in mgmt_synthetic_main thread. // - synthThrId = ink_thread_create(mgmt_synthetic_main, NULL, 0, 0, NULL); /* Spin web agent thread */ + synthThrId = ink_thread_create(mgmt_synthetic_main, nullptr, 0, 0, nullptr); /* Spin web agent thread */ Debug("lm", "Created Web Agent thread (%" PRId64 ")", (int64_t)synthThrId); // Setup the API and event sockets @@ -715,13 +715,13 @@ main(int argc, const char **argv) } umask(oldmask); - ink_thread_create(ts_ctrl_main, &mgmtapiFD, 0, 0, NULL); - ink_thread_create(event_callback_main, &eventapiFD, 0, 0, NULL); + ink_thread_create(ts_ctrl_main, &mgmtapiFD, 0, 0, nullptr); + ink_thread_create(event_callback_main, &eventapiFD, 0, 0, nullptr); - ticker = time(NULL); + ticker = time(nullptr); mgmt_log("[TrafficManager] Setup complete\n"); - RecRegisterStatInt(RECT_NODE, "proxy.node.config.reconfigure_time", time(NULL), RECP_NON_PERSISTENT); + RecRegisterStatInt(RECT_NODE, "proxy.node.config.reconfigure_time", time(nullptr), RECP_NON_PERSISTENT); RecRegisterStatInt(RECT_NODE, "proxy.node.config.reconfigure_required", 0, RECP_NON_PERSISTENT); RecRegisterStatInt(RECT_NODE, "proxy.node.config.restart_required.proxy", 0, RECP_NON_PERSISTENT); diff --git a/cmd/traffic_top/stats.h b/cmd/traffic_top/stats.h index 4d696868b96..f1877c6d58c 100644 --- a/cmd/traffic_top/stats.h +++ b/cmd/traffic_top/stats.h @@ -86,8 +86,8 @@ class Stats _old_time = 0; _now = 0; _time = (struct timeval){0, 0}; - _stats = NULL; - _old_stats = NULL; + _stats = nullptr; + _old_stats = nullptr; _absolute = false; lookup_table.insert(make_pair("version", LookupItem("Version", "proxy.process.version.server.short", 1))); lookup_table.insert(make_pair("disk_used", LookupItem("Disk Used", "proxy.process.cache.bytes_used", 1))); @@ -245,14 +245,14 @@ class Stats { if (_url == "") { int64_t value = 0; - if (_old_stats != NULL) { + if (_old_stats != nullptr) { delete _old_stats; - _old_stats = NULL; + _old_stats = nullptr; } _old_stats = _stats; _stats = new map; - gettimeofday(&_time, NULL); + gettimeofday(&_time, nullptr); double now = _time.tv_sec + (double)_time.tv_usec / 1000000; for (map::const_iterator lookup_it = lookup_table.begin(); lookup_it != lookup_table.end(); ++lookup_it) { @@ -261,7 +261,7 @@ class Stats if (item.type == 1 || item.type == 2 || item.type == 5 || item.type == 8) { if (strcmp(item.pretty, "Version") == 0) { // special case for Version information - TSString strValue = NULL; + TSString strValue = nullptr; if (TSRecordGetString(item.name, &strValue) == TS_ERR_OKAY) { string key = item.name; (*_stats)[key] = strValue; @@ -299,7 +299,7 @@ class Stats curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_error); // update time - gettimeofday(&_time, NULL); + gettimeofday(&_time, nullptr); double now = _time.tv_sec + (double)_time.tv_usec / 1000000; response.clear(); @@ -308,9 +308,9 @@ class Stats // only if success update stats and time information if (res == 0) { - if (_old_stats != NULL) { + if (_old_stats != nullptr) { delete _old_stats; - _old_stats = NULL; + _old_stats = nullptr; } _old_stats = _stats; _stats = new map; @@ -381,7 +381,7 @@ class Stats value = value / 10000000; } - if ((type == 2 || type == 5 || type == 8) && _old_stats != NULL && _absolute == false) { + if ((type == 2 || type == 5 || type == 8) && _old_stats != nullptr && _absolute == false) { double old = getValue(item.name, _old_stats); if (key == "total_time") { old = old / 10000000; @@ -479,10 +479,10 @@ class Stats ~Stats() { - if (_stats != NULL) { + if (_stats != nullptr) { delete _stats; } - if (_old_stats != NULL) { + if (_old_stats != nullptr) { delete _old_stats; } } diff --git a/cmd/traffic_top/traffic_top.cc b/cmd/traffic_top/traffic_top.cc index 7855cd0e32e..34a5fb1c66e 100644 --- a/cmd/traffic_top/traffic_top.cc +++ b/cmd/traffic_top/traffic_top.cc @@ -221,7 +221,7 @@ help(const string &host, const string &version) while (1) { clear(); - time_t now = time(NULL); + time_t now = time(nullptr); struct tm *nowtm = localtime(&now); char timeBuf[32]; strftime(timeBuf, sizeof(timeBuf), "%H:%M:%S", nowtm); @@ -401,7 +401,7 @@ main(int argc, char **argv) string url = ""; if (optind >= argc) { - if (TS_ERR_OKAY != TSInit(NULL, static_cast(TS_MGMT_OPT_NO_EVENTS | TS_MGMT_OPT_NO_SOCK_TESTS))) { + if (TS_ERR_OKAY != TSInit(nullptr, static_cast(TS_MGMT_OPT_NO_EVENTS | TS_MGMT_OPT_NO_SOCK_TESTS))) { fprintf(stderr, "Error: missing URL on command line or error connecting to the local manager\n"); usage(); } @@ -424,7 +424,7 @@ main(int argc, char **argv) init_pair(colorPair::blue, COLOR_BLUE, COLOR_BLACK); init_pair(colorPair::cyan, COLOR_CYAN, COLOR_BLACK); init_pair(colorPair::border, COLOR_WHITE, COLOR_BLUE); - // mvchgat(0, 0, -1, A_BLINK, 1, NULL); + // mvchgat(0, 0, -1, A_BLINK, 1, nullptr); enum Page { MAIN_PAGE, @@ -438,7 +438,7 @@ main(int argc, char **argv) attron(A_BOLD); string version; - time_t now = time(NULL); + time_t now = time(nullptr); struct tm *nowtm = localtime(&now); char timeBuf[32]; strftime(timeBuf, sizeof(timeBuf), "%H:%M:%S", nowtm); diff --git a/cmd/traffic_via/traffic_via.cc b/cmd/traffic_via/traffic_via.cc index 5afdfa2119e..b0a5d0eeb32 100644 --- a/cmd/traffic_via/traffic_via.cc +++ b/cmd/traffic_via/traffic_via.cc @@ -43,7 +43,7 @@ static AppVersionInfo appVersionInfo; struct VIA { - VIA(const char *t) : title(t), next(NULL) { memset(viaData, 0, sizeof(viaData)); } + VIA(const char *t) : title(t), next(nullptr) { memset(viaData, 0, sizeof(viaData)); } ~VIA() { delete next; } const char *title; const char *viaData[128]; @@ -110,7 +110,7 @@ detailViaLookup(char flag) viaTable->viaData[(unsigned char)'F'] = "connection open failed"; break; default: - viaTable = NULL; + viaTable = nullptr; fprintf(stderr, "%s: %s: %c\n", appVersionInfo.AppStr, "Invalid VIA header character", flag); break; } @@ -180,7 +180,7 @@ standardViaLookup(char flag) viaTable->viaData[(unsigned char)' '] = "unknown"; break; default: - viaTable = NULL; + viaTable = nullptr; fprintf(stderr, "%s: %s: %c\n", appVersionInfo.AppStr, "Invalid VIA header character", flag); break; } @@ -192,8 +192,8 @@ standardViaLookup(char flag) static void printViaHeader(const char *header) { - VIA *viaTable = NULL; - VIA *viaEntry = NULL; + VIA *viaTable = nullptr; + VIA *viaEntry = nullptr; bool isDetail = false; printf("Via Header Details:\n"); @@ -262,7 +262,7 @@ static TSMgmtError filterViaHeader() { const pcre *compiledReg; - const pcre_extra *extraReg = NULL; + const pcre_extra *extraReg = nullptr; int subStringVector[SUBSTRING_VECTOR_COUNT]; const char *err; int errOffset; @@ -274,9 +274,9 @@ filterViaHeader() char viaHeader[1024]; // Compile PCRE via header pattern - compiledReg = pcre_compile(viaPattern, 0, &err, &errOffset, NULL); + compiledReg = pcre_compile(viaPattern, 0, &err, &errOffset, nullptr); - if (compiledReg == NULL) { + if (compiledReg == nullptr) { printf("PCRE regex compilation failed with error %s at offset %d\n", err, errOffset); return TS_ERR_FAIL; } diff --git a/example/append-transform/append-transform.c b/example/append-transform/append-transform.c index 122c4378044..1b0741a4c9f 100644 --- a/example/append-transform/append-transform.c +++ b/example/append-transform/append-transform.c @@ -76,8 +76,9 @@ static void my_data_destroy(MyData *data) { if (data) { - if (data->output_buffer) + if (data->output_buffer) { TSIOBufferDestroy(data->output_buffer); + } TSfree(data); } } diff --git a/example/basic-auth/basic-auth.c b/example/basic-auth/basic-auth.c index b83ec11dc17..4d4aa311dca 100644 --- a/example/basic-auth/basic-auth.c +++ b/example/basic-auth/basic-auth.c @@ -40,8 +40,9 @@ base64_decode(const char *input) char *obuf; int len; - for (len = 0; (input[len] != '\0') && (input[len] != '='); len++) + for (len = 0; (input[len] != '\0') && (input[len] != '='); len++) { ; + } output = obuf = (char *)TSmalloc((len * 6) / 8 + 3); diff --git a/example/cache-scan/cache-scan.cc b/example/cache-scan/cache-scan.cc index 9c3c3edf68a..ad9fb47ea2a 100644 --- a/example/cache-scan/cache-scan.cc +++ b/example/cache-scan/cache-scan.cc @@ -227,19 +227,19 @@ cleanup(TSCont contp) if (cstate->req_buffer) { TSIOBufferDestroy(cstate->req_buffer); - cstate->req_buffer = NULL; + cstate->req_buffer = nullptr; } if (cstate->key_to_delete) { if (TSCacheKeyDestroy(cstate->key_to_delete) == TS_ERROR) { TSError("[cache-scan] Failed to destroy cache key"); } - cstate->key_to_delete = NULL; + cstate->key_to_delete = nullptr; } if (cstate->resp_buffer) { TSIOBufferDestroy(cstate->resp_buffer); - cstate->resp_buffer = NULL; + cstate->resp_buffer = nullptr; } TSVConnClose(cstate->net_vc); @@ -272,7 +272,7 @@ handle_io(TSCont contp, TSEvent event, void * /* edata ATS_UNUSED */) char head[] = "

Cache Contents:

\n

\n";
       cstate->total_bytes += TSIOBufferWrite(cstate->resp_buffer, head, sizeof(head) - 1);
       // start scan
-      TSAction actionp = TSCacheScan(contp, 0, 512000);
+      TSAction actionp = TSCacheScan(contp, nullptr, 512000);
       if (!TSActionDone(actionp)) {
         cstate->pending_action = actionp;
       }
@@ -352,7 +352,7 @@ unescapifyStr(char *buffer)
     if (*read == '%' && *(read + 1) != '\0' && *(read + 2) != '\0') {
       subStr[0] = *(++read);
       subStr[1] = *(++read);
-      *write    = (char)strtol(subStr, (char **)NULL, 16);
+      *write    = (char)strtol(subStr, (char **)nullptr, 16);
       read++;
       write++;
     } else if (*read == '+') {
@@ -425,7 +425,7 @@ setup_request(TSCont contp, TSHttpTxn txnp)
       start = strstr(querybuf, "remove_url=");
       if (start && (start == querybuf || *(start - 1) == '&')) {
         start += 11;
-        if ((end = strstr(start, "&")) != NULL) {
+        if ((end = strstr(start, "&")) != nullptr) {
           *end = '\0';
         }
         del_url_len = unescapifyStr(start);
@@ -443,10 +443,10 @@ setup_request(TSCont contp, TSHttpTxn txnp)
           TSError("[cache-scan] CacheKeyDigestFromUrlSet failed");
           TSCacheKeyDestroy(cstate->key_to_delete);
           TSfree(cstate);
-          TSHandleMLocRelease(urlBuf, NULL, urlLoc);
+          TSHandleMLocRelease(urlBuf, nullptr, urlLoc);
           goto Ldone;
         }
-        TSHandleMLocRelease(urlBuf, NULL, urlLoc);
+        TSHandleMLocRelease(urlBuf, nullptr, urlLoc);
       }
     }
 
diff --git a/example/cppapi/async_http_fetch/AsyncHttpFetch.cc b/example/cppapi/async_http_fetch/AsyncHttpFetch.cc
index 3aa898bb1d2..1fb29a861d5 100644
--- a/example/cppapi/async_http_fetch/AsyncHttpFetch.cc
+++ b/example/cppapi/async_http_fetch/AsyncHttpFetch.cc
@@ -54,7 +54,7 @@ class DelayedAsyncHttpFetch : public AsyncHttpFetch, public AsyncReceiver mutex)
-    : AsyncHttpFetch(request, method), mutex_(mutex), timer_(NULL){};
+    : AsyncHttpFetch(request, method), mutex_(mutex), timer_(nullptr){};
   void
   run()
   {
@@ -87,7 +87,7 @@ class TransactionHookPlugin : public TransactionPlugin,
 {
 public:
   TransactionHookPlugin(Transaction &transaction)
-    : TransactionPlugin(transaction), transaction_(transaction), num_fetches_pending_(0), post_request_(NULL)
+    : TransactionPlugin(transaction), transaction_(transaction), num_fetches_pending_(0), post_request_(nullptr)
   {
     TS_DEBUG(TAG, "Constructed TransactionHookPlugin, saved a reference to this transaction.");
     registerHook(HOOK_SEND_REQUEST_HEADERS);
diff --git a/example/cppapi/boom/boom.cc b/example/cppapi/boom/boom.cc
index bb23406cb0e..dfe14d811e7 100644
--- a/example/cppapi/boom/boom.cc
+++ b/example/cppapi/boom/boom.cc
@@ -210,14 +210,14 @@ BoomResponseRegistry::populate_error_responses(const std::string &base_directory
   // Iterate over files in the base directory.
   // Filename (sans the .html suffix) becomes the entry to the
   // registry lookup table
-  DIR *pDIR = NULL;
+  DIR *pDIR = nullptr;
   struct dirent *entry;
 
   pDIR = opendir(base_error_directory_.c_str());
-  if (pDIR != NULL) {
+  if (pDIR != nullptr) {
     while (true) {
       entry = readdir(pDIR);
-      if (entry == NULL)
+      if (entry == nullptr)
         break;
 
       if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0) {
diff --git a/example/cppapi/websocket/WSBuffer.cc b/example/cppapi/websocket/WSBuffer.cc
index 035b940fbc8..54fc48a2761 100644
--- a/example/cppapi/websocket/WSBuffer.cc
+++ b/example/cppapi/websocket/WSBuffer.cc
@@ -160,7 +160,7 @@ WSBuffer::ws_digest(std::string const &key)
   EVP_MD_CTX digest;
   EVP_MD_CTX_init(&digest);
 
-  if (!EVP_DigestInit_ex(&digest, EVP_sha1(), NULL)) {
+  if (!EVP_DigestInit_ex(&digest, EVP_sha1(), nullptr)) {
     EVP_MD_CTX_cleanup(&digest);
     return "init-failed";
   }
diff --git a/example/intercept/intercept.cc b/example/intercept/intercept.cc
index 300d6f6bcc5..8d62c30cea4 100644
--- a/example/intercept/intercept.cc
+++ b/example/intercept/intercept.cc
@@ -74,7 +74,7 @@ struct InterceptIOChannel {
   TSIOBuffer iobuf;
   TSIOBufferReader reader;
 
-  InterceptIOChannel() : vio(NULL), iobuf(NULL), reader(NULL) {}
+  InterceptIOChannel() : vio(nullptr), iobuf(nullptr), reader(nullptr) {}
   ~InterceptIOChannel()
   {
     if (this->reader) {
@@ -89,7 +89,7 @@ struct InterceptIOChannel {
   void
   read(TSVConn vc, TSCont contp)
   {
-    TSReleaseAssert(this->vio == NULL);
+    TSReleaseAssert(this->vio == nullptr);
     TSReleaseAssert((this->iobuf = TSIOBufferCreate()));
     TSReleaseAssert((this->reader = TSIOBufferReaderAlloc(this->iobuf)));
 
@@ -99,7 +99,7 @@ struct InterceptIOChannel {
   void
   write(TSVConn vc, TSCont contp)
   {
-    TSReleaseAssert(this->vio == NULL);
+    TSReleaseAssert(this->vio == nullptr);
     TSReleaseAssert((this->iobuf = TSIOBufferCreate()));
     TSReleaseAssert((this->reader = TSIOBufferReaderAlloc(this->iobuf)));
 
@@ -120,8 +120,8 @@ struct InterceptIO {
     if (this->vc) {
       TSVConnClose(this->vc);
     }
-    this->vc         = NULL;
-    this->readio.vio = this->writeio.vio = NULL;
+    this->vc         = nullptr;
+    this->readio.vio = this->writeio.vio = nullptr;
   }
 };
 
@@ -135,7 +135,7 @@ struct InterceptState {
   InterceptIO client; // Server intercept VC state.
   InterceptIO server; // Intercept origin VC state.
 
-  InterceptState() : txn(NULL) {}
+  InterceptState() : txn(nullptr) {}
   ~InterceptState() {}
 };
 
@@ -171,9 +171,9 @@ InterceptProxySideVC(const InterceptState *istate, TSVConn vc)
 static bool
 InterceptAttemptDestroy(InterceptState *istate, TSCont contp)
 {
-  if (istate->server.vc == NULL && istate->client.vc == NULL) {
+  if (istate->server.vc == nullptr && istate->client.vc == nullptr) {
     VDEBUG("destroying server intercept state istate=%p contp=%p", istate, contp);
-    TSContDataSet(contp, NULL); // Force a crash if we get additional events.
+    TSContDataSet(contp, nullptr); // Force a crash if we get additional events.
     TSContDestroy(contp);
     delete istate;
     return true;
@@ -315,7 +315,7 @@ InterceptInterceptionHook(TSCont contp, TSEvent event, void *edata)
       return TS_EVENT_NONE;
     }
 
-    if ((istate->server.vc = TSVConnFdCreate(fd)) == NULL) {
+    if ((istate->server.vc = TSVConnFdCreate(fd)) == nullptr) {
       VDEBUG("TSVconnFdCreate() failed");
       TSVConnAbort(arg.vc, TS_VC_CLOSE_ABORT);
 
@@ -388,12 +388,12 @@ InterceptInterceptionHook(TSCont contp, TSEvent event, void *edata)
     VDEBUG("reading vio=%p vc=%p, istate=%p is bound to client vc=%p and server vc=%p", arg.vio, TSVIOVConnGet(arg.vio),
            cdata.istate, cdata.istate->client.vc, cdata.istate->server.vc);
 
-    if (to->vc == NULL) {
+    if (to->vc == nullptr) {
       VDEBUG("closing %s vc=%p", InterceptProxySide(cdata.istate, from), from->vc);
       from->close();
     }
 
-    if (from->vc == NULL) {
+    if (from->vc == nullptr) {
       VDEBUG("closing %s vc=%p", InterceptProxySide(cdata.istate, to), to->vc);
       to->close();
     }
@@ -431,7 +431,7 @@ InterceptInterceptionHook(TSCont contp, TSEvent event, void *edata)
 
     // If the other side is closed, close this side too, but only if there
     // we have drained the write buffer.
-    if (from->vc == NULL) {
+    if (from->vc == nullptr) {
       VDEBUG("closing %s vc=%p with %" PRId64 " bytes to left", InterceptProxySide(cdata.istate, to), to->vc,
              TSIOBufferReaderAvail(to->writeio.reader));
       if (TSIOBufferReaderAvail(to->writeio.reader) == 0) {
@@ -548,8 +548,8 @@ TSPluginInit(int /* argc */, const char * /* argv */ [])
 
   // XXX accept hostname and port arguments
 
-  TxnHook       = InterceptContCreate(InterceptTxnHook, NULL, NULL);
-  InterceptHook = InterceptContCreate(InterceptInterceptionHook, NULL, NULL);
+  TxnHook       = InterceptContCreate(InterceptTxnHook, nullptr, nullptr);
+  InterceptHook = InterceptContCreate(InterceptInterceptionHook, nullptr, nullptr);
 
   // Wait until after the cache lookup to decide whether to
   // intercept a request. For cache hits we will never intercept.
diff --git a/example/null-transform/null-transform.c b/example/null-transform/null-transform.c
index d52847c2df1..e3d692803f4 100644
--- a/example/null-transform/null-transform.c
+++ b/example/null-transform/null-transform.c
@@ -61,8 +61,9 @@ static void
 my_data_destroy(MyData *data)
 {
   if (data) {
-    if (data->output_buffer)
+    if (data->output_buffer) {
       TSIOBufferDestroy(data->output_buffer);
+    }
     TSfree(data);
   }
 }
diff --git a/example/passthru/passthru.cc b/example/passthru/passthru.cc
index 4cd3cb746fc..426fc163a79 100644
--- a/example/passthru/passthru.cc
+++ b/example/passthru/passthru.cc
@@ -57,7 +57,7 @@ struct PassthruIO {
   TSIOBuffer iobuf;
   TSIOBufferReader reader;
 
-  PassthruIO() : vio(NULL), iobuf(NULL), reader(NULL) {}
+  PassthruIO() : vio(nullptr), iobuf(nullptr), reader(nullptr) {}
   ~PassthruIO() { clear(); }
   void
   clear()
@@ -79,7 +79,7 @@ struct PassthruIO {
   void
   read(TSVConn vconn, TSCont contp)
   {
-    TSReleaseAssert(this->vio == NULL);
+    TSReleaseAssert(this->vio == nullptr);
 
     this->iobuf  = TSIOBufferCreate();
     this->reader = TSIOBufferReaderAlloc(this->iobuf);
@@ -90,7 +90,7 @@ struct PassthruIO {
   void
   write(TSVConn vconn, TSCont contp)
   {
-    TSReleaseAssert(this->vio == NULL);
+    TSReleaseAssert(this->vio == nullptr);
 
     this->iobuf  = TSIOBufferCreate();
     this->reader = TSIOBufferReaderAlloc(this->iobuf);
diff --git a/example/protocol-stack/protocol-stack.cc b/example/protocol-stack/protocol-stack.cc
index d287e66851b..411f6afc7de 100644
--- a/example/protocol-stack/protocol-stack.cc
+++ b/example/protocol-stack/protocol-stack.cc
@@ -40,7 +40,7 @@ proto_stack_cb(TSCont contp ATS_UNUSED, TSEvent event, void *edata)
     TSDebug(DEBUG_TAG, "\t%d: %s", i, results[i]);
   }
   const char *ret_tag = TSHttpTxnClientProtocolStackContains(txnp, "h2");
-  TSDebug(DEBUG_TAG, "Stack %s HTTP/2", ret_tag != NULL ? "contains" : "does not contain");
+  TSDebug(DEBUG_TAG, "Stack %s HTTP/2", ret_tag != nullptr ? "contains" : "does not contain");
   TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);
   return 0;
 }
@@ -58,5 +58,5 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
     TSError("[protocol-stack] Plugin registration failed.");
   }
 
-  TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, TSContCreate(proto_stack_cb, NULL));
+  TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, TSContCreate(proto_stack_cb, nullptr));
 }
diff --git a/example/protocol/Protocol.c b/example/protocol/Protocol.c
index 6732880a897..76203507b27 100644
--- a/example/protocol/Protocol.c
+++ b/example/protocol/Protocol.c
@@ -62,8 +62,9 @@ accept_handler(TSCont contp, TSEvent event, void *edata)
   default:
     /* Something wrong with the network, if there are any
        pending NetAccept, cancel them. */
-    if (pending_action && !TSActionDone(pending_action))
+    if (pending_action && !TSActionDone(pending_action)) {
       TSActionCancel(pending_action);
+    }
 
     TSContDestroy(contp);
     break;
diff --git a/example/protocol/TxnSM.c b/example/protocol/TxnSM.c
index 75a166d3180..d21cee1d391 100644
--- a/example/protocol/TxnSM.c
+++ b/example/protocol/TxnSM.c
@@ -194,8 +194,9 @@ state_interface_with_client(TSCont contp, TSEvent event, TSVIO vio)
 
   txn_sm->q_pending_action = NULL;
 
-  if (vio == txn_sm->q_client_read_vio)
+  if (vio == txn_sm->q_client_read_vio) {
     return state_read_request_from_client(contp, event, vio);
+  }
 
   /* vio == txn_sm->q_client_write_vio */
   return state_send_response_to_client(contp, event, vio);
@@ -230,8 +231,9 @@ state_read_request_from_client(TSCont contp, TSEvent event, TSVIO vio ATS_UNUSED
         parse_result                               = parse_request(temp_buf, txn_sm->q_server_name, txn_sm->q_file_name);
         TSfree(temp_buf);
 
-        if (parse_result != 1)
+        if (parse_result != 1) {
           return prepare_to_die(contp);
+        }
 
         /* Start to do cache lookup */
         TSDebug("protocol", "Key material: file name is %s*****", txn_sm->q_file_name);
@@ -273,8 +275,9 @@ state_handle_cache_lookup(TSCont contp, TSEvent event, TSVConn vc)
 
     /* Write log */
     ret_val = TSTextLogObjectWrite(protocol_plugin_log, "%s %s %d \n", txn_sm->q_file_name, txn_sm->q_server_name, 1);
-    if (ret_val != TS_SUCCESS)
+    if (ret_val != TS_SUCCESS) {
       TSError("[protocol] Fail to write into log");
+    }
 
     txn_sm->q_cache_vc       = vc;
     txn_sm->q_pending_action = NULL;
@@ -305,8 +308,9 @@ state_handle_cache_lookup(TSCont contp, TSEvent event, TSVConn vc)
     /* Write log */
     ret_val = TSTextLogObjectWrite(protocol_plugin_log, "%s %s %d \n", txn_sm->q_file_name, txn_sm->q_server_name, 0);
 
-    if (ret_val != TS_SUCCESS)
+    if (ret_val != TS_SUCCESS) {
       TSError("[protocol] Fail to write into log");
+    }
 
     set_handler(txn_sm->q_current_handler, (TxnSMHandler)&state_handle_cache_prepare_for_write);
     txn_sm->q_pending_action = TSCacheWrite(contp, txn_sm->q_key);
@@ -675,8 +679,9 @@ state_write_to_cache(TSCont contp, TSEvent event, TSVIO vio)
     TSDebug("protocol", "nbytes %" PRId64 ", ndone %" PRId64, TSVIONBytesGet(vio), TSVIONDoneGet(vio));
     /* Since the first write is through TSVConnWrite, which aleady consume
        the data in cache_buffer_reader, don't consume it again. */
-    if (txn_sm->q_cache_response_length > 0 && txn_sm->q_block_bytes_read > 0)
+    if (txn_sm->q_cache_response_length > 0 && txn_sm->q_block_bytes_read > 0) {
       TSIOBufferReaderConsume(txn_sm->q_cache_response_buffer_reader, txn_sm->q_block_bytes_read);
+    }
 
     txn_sm->q_cache_response_length += TSVIONBytesGet(vio);
 
@@ -803,16 +808,18 @@ state_done(TSCont contp, TSEvent event ATS_UNUSED, TSVIO vio ATS_UNUSED)
   txn_sm->q_mutex          = NULL;
 
   if (txn_sm->q_client_request_buffer) {
-    if (txn_sm->q_client_request_buffer_reader)
+    if (txn_sm->q_client_request_buffer_reader) {
       TSIOBufferReaderFree(txn_sm->q_client_request_buffer_reader);
+    }
     TSIOBufferDestroy(txn_sm->q_client_request_buffer);
     txn_sm->q_client_request_buffer        = NULL;
     txn_sm->q_client_request_buffer_reader = NULL;
   }
 
   if (txn_sm->q_client_response_buffer) {
-    if (txn_sm->q_client_response_buffer_reader)
+    if (txn_sm->q_client_response_buffer_reader) {
       TSIOBufferReaderFree(txn_sm->q_client_response_buffer_reader);
+    }
 
     TSIOBufferDestroy(txn_sm->q_client_response_buffer);
     txn_sm->q_client_response_buffer        = NULL;
@@ -820,16 +827,18 @@ state_done(TSCont contp, TSEvent event ATS_UNUSED, TSVIO vio ATS_UNUSED)
   }
 
   if (txn_sm->q_cache_read_buffer) {
-    if (txn_sm->q_cache_read_buffer_reader)
+    if (txn_sm->q_cache_read_buffer_reader) {
       TSIOBufferReaderFree(txn_sm->q_cache_read_buffer_reader);
+    }
     TSIOBufferDestroy(txn_sm->q_cache_read_buffer);
     txn_sm->q_cache_read_buffer        = NULL;
     txn_sm->q_cache_read_buffer_reader = NULL;
   }
 
   if (txn_sm->q_server_request_buffer) {
-    if (txn_sm->q_server_request_buffer_reader)
+    if (txn_sm->q_server_request_buffer_reader) {
       TSIOBufferReaderFree(txn_sm->q_server_request_buffer_reader);
+    }
     TSIOBufferDestroy(txn_sm->q_server_request_buffer);
     txn_sm->q_server_request_buffer        = NULL;
     txn_sm->q_server_request_buffer_reader = NULL;
@@ -850,8 +859,9 @@ state_done(TSCont contp, TSEvent event ATS_UNUSED, TSVIO vio ATS_UNUSED)
     txn_sm->q_file_name = NULL;
   }
 
-  if (txn_sm->q_key)
+  if (txn_sm->q_key) {
     TSCacheKeyDestroy(txn_sm->q_key);
+  }
 
   if (txn_sm->q_client_request) {
     TSfree(txn_sm->q_client_request);
@@ -902,14 +912,16 @@ get_info_from_buffer(TSIOBufferReader the_reader)
   TSIOBufferBlock blk;
   char *buf;
 
-  if (!the_reader)
+  if (!the_reader) {
     return NULL;
+  }
 
   read_avail = TSIOBufferReaderAvail(the_reader);
 
   info = (char *)TSmalloc(sizeof(char) * read_avail);
-  if (info == NULL)
+  if (info == NULL) {
     return NULL;
+  }
   info_start = info;
 
   /* Read the data out of the reader */
@@ -932,8 +944,9 @@ int
 is_request_end(char *buf)
 {
   char *temp = strstr(buf, " \n\n");
-  if (!temp)
+  if (!temp) {
     return 0;
+  }
   return 1;
 }
 
@@ -944,16 +957,18 @@ parse_request(char *request, char *server_name, char *file_name)
   char *saveptr = NULL;
   char *temp    = strtok_r(request, " ", &saveptr);
 
-  if (temp != NULL)
+  if (temp != NULL) {
     TSstrlcpy(server_name, temp, MAX_SERVER_NAME_LENGTH + 1);
-  else
+  } else {
     return 0;
+  }
 
   temp = strtok_r(NULL, " ", &saveptr);
-  if (temp != NULL)
+  if (temp != NULL) {
     TSstrlcpy(file_name, temp, MAX_FILE_NAME_LENGTH + 1);
-  else
+  } else {
     return 0;
+  }
 
   return 1;
 }
diff --git a/example/query-remap/query-remap.c b/example/query-remap/query-remap.c
index 247032ea638..2c4796dddd5 100644
--- a/example/query-remap/query-remap.c
+++ b/example/query-remap/query-remap.c
@@ -96,8 +96,9 @@ TSRemapDeleteInstance(void *ih)
 
   if (ih) {
     query_remap_info *qri = (query_remap_info *)ih;
-    if (qri->param_name)
+    if (qri->param_name) {
       TSfree(qri->param_name);
+    }
     if (qri->hosts) {
       for (i = 0; i < qri->num_hosts; ++i) {
         TSfree(qri->hosts[i]);
diff --git a/example/remap/remap.cc b/example/remap/remap.cc
index 998d3c94ae3..cc94c7ff937 100644
--- a/example/remap/remap.cc
+++ b/example/remap/remap.cc
@@ -63,20 +63,20 @@ class remap_entry
 
 static int plugin_init_counter = 0;               /* remap plugin initialization counter */
 static pthread_mutex_t remap_plugin_global_mutex; /* remap plugin global mutex */
-remap_entry *remap_entry::active_list = 0;
+remap_entry *remap_entry::active_list = nullptr;
 pthread_mutex_t remap_entry::mutex; /* remap_entry class mutex */
 
 /* ----------------------- remap_entry::remap_entry ------------------------ */
-remap_entry::remap_entry(int _argc, char *_argv[]) : next(NULL), argc(0), argv(NULL)
+remap_entry::remap_entry(int _argc, char *_argv[]) : next(nullptr), argc(0), argv(nullptr)
 {
   int i;
 
-  if (_argc > 0 && _argv && (argv = (char **)TSmalloc(sizeof(char *) * (_argc + 1))) != 0) {
+  if (_argc > 0 && _argv && (argv = (char **)TSmalloc(sizeof(char *) * (_argc + 1))) != nullptr) {
     argc = _argc;
     for (i = 0; i < argc; i++) {
       argv[i] = TSstrdup(_argv[i]);
     }
-    argv[i] = NULL;
+    argv[i] = nullptr;
   }
 }
 
@@ -173,8 +173,8 @@ TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size)
                                     (api_info->tsremap_version >> 16), (api_info->tsremap_version & 0xffff));
     }
 
-    if (pthread_mutex_init(&remap_plugin_global_mutex, 0) ||
-        pthread_mutex_init(&remap_entry::mutex, 0)) { /* pthread_mutex_init - always returns 0. :) - impossible error */
+    if (pthread_mutex_init(&remap_plugin_global_mutex, nullptr) ||
+        pthread_mutex_init(&remap_entry::mutex, nullptr)) { /* pthread_mutex_init - always returns 0. :) - impossible error */
       return store_my_error_message(TS_ERROR, errbuf, errbuf_size, "[TSRemapInit] - Mutex initialization error");
     }
     plugin_init_counter++;
@@ -289,12 +289,12 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri)
 
   if ((cfield = TSMimeHdrFieldFind(rri->requestBufp, rri->requestHdrp, TS_MIME_FIELD_DATE, -1)) != TS_NULL_MLOC) {
     fprintf(stderr, "We have \"Date\" header in request\n");
-    value = TSMimeHdrFieldValueStringGet(rri->requestBufp, rri->requestHdrp, cfield, -1, NULL);
+    value = TSMimeHdrFieldValueStringGet(rri->requestBufp, rri->requestHdrp, cfield, -1, nullptr);
     fprintf(stderr, "Header value: %s\n", value);
   }
   if ((cfield = TSMimeHdrFieldFind(rri->requestBufp, rri->requestHdrp, "MyHeader", sizeof("MyHeader") - 1)) != TS_NULL_MLOC) {
     fprintf(stderr, "We have \"MyHeader\" header in request\n");
-    value = TSMimeHdrFieldValueStringGet(rri->requestBufp, rri->requestHdrp, cfield, -1, NULL);
+    value = TSMimeHdrFieldValueStringGet(rri->requestBufp, rri->requestHdrp, cfield, -1, nullptr);
     fprintf(stderr, "Header value: %s\n", value);
   }
 
@@ -312,7 +312,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri)
     size_t len = snprintf(tmp, 255, "This is very small example of TS API usage!\nIteration %d!\nHTTP return code %d\n",
                           my_local_counter, TS_HTTP_STATUS_CONTINUE + my_local_counter);
     TSHttpTxnSetHttpRetStatus((TSHttpTxn)rh, (TSHttpStatus)((int)TS_HTTP_STATUS_CONTINUE + my_local_counter));
-    TSHttpTxnErrorBodySet((TSHttpTxn)rh, tmp, len, NULL); // Defaults to text/html
+    TSHttpTxnErrorBodySet((TSHttpTxn)rh, tmp, len, nullptr); // Defaults to text/html
     my_local_counter++;
   }
   // hardcoded case for remapping
diff --git a/example/remap_header_add/remap_header_add.cc b/example/remap_header_add/remap_header_add.cc
index a5e522c5b74..75ab12bf8a3 100644
--- a/example/remap_header_add/remap_header_add.cc
+++ b/example/remap_header_add/remap_header_add.cc
@@ -52,9 +52,9 @@ ParseArgIntoNv(const char *arg, char **n, char **v)
 {
   const char *colon_pos = strchr(arg, ':');
 
-  if (colon_pos == NULL) {
-    *n = NULL;
-    *v = NULL;
+  if (colon_pos == nullptr) {
+    *n = nullptr;
+    *v = nullptr;
     TSDebug(TAG, "No name value pair since it was malformed");
     return;
   }
@@ -88,7 +88,7 @@ TSRemapInit(NOWARN_UNUSED TSRemapInterface *api_info, NOWARN_UNUSED char *errbuf
 TSReturnCode
 TSRemapNewInstance(int argc, char *argv[], void **ih, NOWARN_UNUSED char *errbuf, NOWARN_UNUSED int errbuf_size)
 {
-  remap_line *rl = NULL;
+  remap_line *rl = nullptr;
 
   TSDebug(TAG, "TSRemapNewInstance()");
 
diff --git a/example/response-header-1/response-header-1.c b/example/response-header-1/response-header-1.c
index b6d7187b71d..0fde00c87e5 100644
--- a/example/response-header-1/response-header-1.c
+++ b/example/response-header-1/response-header-1.c
@@ -84,8 +84,9 @@ modify_header(TSHttpTxn txnp)
 
   int num_refreshes = 0;
 
-  if (!init_buffer_status)
+  if (!init_buffer_status) {
     return; /* caller reenables */
+  }
 
   if (TSHttpTxnServerRespGet(txnp, &resp_bufp, &resp_loc) != TS_SUCCESS) {
     TSError("[response_header-1] Couldn't retrieve server response header");
@@ -287,7 +288,8 @@ TSPluginInit(int argc, const char *argv[])
     init_buffer_status = 0;
     /* bail out here and reenable transaction */
   } else {
-    if (field_loc != chk_field_loc)
+    if (field_loc != chk_field_loc) {
       TSError("[response_header-1] Retrieved buffer field loc is %p when it should be %p", chk_field_loc, field_loc);
+    }
   }
 }
diff --git a/example/secure-link/secure-link.c b/example/secure-link/secure-link.c
index 501a22329b4..7837bf1b9c2 100644
--- a/example/secure-link/secure-link.c
+++ b/example/secure-link/secure-link.c
@@ -103,10 +103,12 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri)
   MD5_Init(&ctx);
   MD5_Update(&ctx, sli->secret, strlen(sli->secret));
   MD5_Update(&ctx, ip, strlen(ip));
-  if (path)
+  if (path) {
     MD5_Update(&ctx, path, strlen(path));
-  if (expire)
+  }
+  if (expire) {
     MD5_Update(&ctx, expire, strlen(expire));
+  }
   MD5_Final(md, &ctx);
   for (i = 0; i < MD5_DIGEST_LENGTH; i++) {
     sprintf(&hash[i * 2], "%02x", md[i]);
diff --git a/example/server-transform/server-transform.c b/example/server-transform/server-transform.c
index 6cd7c51b18f..7a7af008c8b 100644
--- a/example/server-transform/server-transform.c
+++ b/example/server-transform/server-transform.c
@@ -123,17 +123,21 @@ transform_destroy(TSCont contp)
 
   data = TSContDataGet(contp);
   if (data != NULL) {
-    if (data->input_buf)
+    if (data->input_buf) {
       TSIOBufferDestroy(data->input_buf);
+    }
 
-    if (data->output_buf)
+    if (data->output_buf) {
       TSIOBufferDestroy(data->output_buf);
+    }
 
-    if (data->pending_action)
+    if (data->pending_action) {
       TSActionCancel(data->pending_action);
+    }
 
-    if (data->server_vc)
+    if (data->server_vc) {
       TSVConnAbort(data->server_vc, 1);
+    }
 
     TSfree(data);
   } else {
diff --git a/example/ssl-preaccept/ssl-preaccept.cc b/example/ssl-preaccept/ssl-preaccept.cc
index 0d3a9aa6111..a051843f90f 100644
--- a/example/ssl-preaccept/ssl-preaccept.cc
+++ b/example/ssl-preaccept/ssl-preaccept.cc
@@ -158,9 +158,9 @@ TSPluginInit(int argc, const char *argv[])
 {
   bool success = false;
   TSPluginRegistrationInfo info;
-  TSCont cb_pa                         = 0; // pre-accept callback continuation
+  TSCont cb_pa                         = nullptr; // pre-accept callback continuation
   static const struct option longopt[] = {
-    {const_cast("config"), required_argument, NULL, 'c'}, {NULL, no_argument, NULL, '\0'},
+    {const_cast("config"), required_argument, nullptr, 'c'}, {nullptr, no_argument, nullptr, '\0'},
   };
 
   info.plugin_name   = const_cast("SSL Preaccept test");
@@ -169,7 +169,7 @@ TSPluginInit(int argc, const char *argv[])
 
   int opt = 0;
   while (opt >= 0) {
-    opt = getopt_long(argc, (char *const *)argv, "c:", longopt, NULL);
+    opt = getopt_long(argc, (char *const *)argv, "c:", longopt, nullptr);
     switch (opt) {
     case 'c':
       ConfigPath = optarg;
@@ -189,7 +189,7 @@ TSPluginInit(int argc, const char *argv[])
     TSError(PCP "requires Traffic Server 2.0 or later.");
   } else if (0 > Load_Configuration()) {
     TSError(PCP "Failed to load config file.");
-  } else if (0 == (cb_pa = TSContCreate(&CB_Pre_Accept, TSMutexCreate()))) {
+  } else if (nullptr == (cb_pa = TSContCreate(&CB_Pre_Accept, TSMutexCreate()))) {
     TSError(PCP "Failed to pre-accept callback.");
   } else {
     TSHttpHookAdd(TS_VCONN_PRE_ACCEPT_HOOK, cb_pa);
diff --git a/example/ssl-sni-whitelist/ssl-sni-whitelist.cc b/example/ssl-sni-whitelist/ssl-sni-whitelist.cc
index 6156f69967a..9f3d8f10efe 100644
--- a/example/ssl-sni-whitelist/ssl-sni-whitelist.cc
+++ b/example/ssl-sni-whitelist/ssl-sni-whitelist.cc
@@ -78,14 +78,14 @@ CB_servername_whitelist(TSCont /* contp */, TSEvent /* event */, void *edata)
   const char *servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
 
   bool do_blind_tunnel = true;
-  if (servername != NULL) {
+  if (servername != nullptr) {
     TSSslContext ctxobj = TSSslContextFindByName(servername);
-    if (ctxobj != NULL) {
+    if (ctxobj != nullptr) {
       do_blind_tunnel = false;
     } else {
       // Look up by destination address
       ctxobj = TSSslContextFindByAddr(TSNetVConnRemoteAddrGet(ssl_vc));
-      if (ctxobj != NULL) {
+      if (ctxobj != nullptr) {
         do_blind_tunnel = false;
       }
     }
@@ -107,9 +107,9 @@ TSPluginInit(int argc, const char *argv[])
 {
   bool success = false;
   TSPluginRegistrationInfo info;
-  TSCont cb_sni                        = 0; // sni callback continuation
+  TSCont cb_sni                        = nullptr; // sni callback continuation
   static const struct option longopt[] = {
-    {const_cast("config"), required_argument, NULL, 'c'}, {NULL, no_argument, NULL, '\0'},
+    {const_cast("config"), required_argument, nullptr, 'c'}, {nullptr, no_argument, nullptr, '\0'},
   };
 
   info.plugin_name   = const_cast("SSL SNI whitelist");
@@ -118,7 +118,7 @@ TSPluginInit(int argc, const char *argv[])
 
   int opt = 0;
   while (opt >= 0) {
-    opt = getopt_long(argc, (char *const *)argv, "c:", longopt, NULL);
+    opt = getopt_long(argc, (char *const *)argv, "c:", longopt, nullptr);
     switch (opt) {
     case 'c':
       ConfigPath = optarg;
@@ -138,7 +138,7 @@ TSPluginInit(int argc, const char *argv[])
     TSError(PCP "requires Traffic Server 2.0 or later.");
   } else if (0 > Load_Configuration()) {
     TSError(PCP "Failed to load config file.");
-  } else if (0 == (cb_sni = TSContCreate(&CB_servername_whitelist, TSMutexCreate()))) {
+  } else if (nullptr == (cb_sni = TSContCreate(&CB_servername_whitelist, TSMutexCreate()))) {
     TSError(PCP "Failed to create SNI callback.");
   } else {
     TSHttpHookAdd(TS_SSL_CERT_HOOK, cb_sni);
diff --git a/example/ssl-sni/ssl-sni.cc b/example/ssl-sni/ssl-sni.cc
index f76152bd119..f4015ee4f04 100644
--- a/example/ssl-sni/ssl-sni.cc
+++ b/example/ssl-sni/ssl-sni.cc
@@ -87,7 +87,7 @@ CB_servername(TSCont /* contp */, TSEvent /* event */, void *edata)
   TSSslConnection sslobj = TSVConnSSLConnectionGet(ssl_vc);
   SSL *ssl               = reinterpret_cast(sslobj);
   const char *servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
-  if (servername != NULL) {
+  if (servername != nullptr) {
     int servername_len    = strlen(servername);
     int facebook_name_len = strlen("facebook.com");
     if (servername_len >= facebook_name_len) {
@@ -105,7 +105,7 @@ CB_servername(TSCont /* contp */, TSEvent /* event */, void *edata)
       TSDebug("skh", "SNI name is yahoo ssl obj is %p", sslobj);
       if (sslobj) {
         TSSslContext ctxobj = TSSslContextFindByName("safelyfiled.com");
-        if (ctxobj != NULL) {
+        if (ctxobj != nullptr) {
           TSDebug("skh", "Found cert for safelyfiled");
           SSL_CTX *ctx = reinterpret_cast(ctxobj);
           SSL_set_SSL_CTX(ssl, ctx);
@@ -128,9 +128,9 @@ TSPluginInit(int argc, const char *argv[])
 {
   bool success = false;
   TSPluginRegistrationInfo info;
-  TSCont cb_cert                       = 0; // Certificate callback continuation
+  TSCont cb_cert                       = nullptr; // Certificate callback continuation
   static const struct option longopt[] = {
-    {const_cast("config"), required_argument, NULL, 'c'}, {NULL, no_argument, NULL, '\0'},
+    {const_cast("config"), required_argument, nullptr, 'c'}, {nullptr, no_argument, nullptr, '\0'},
   };
 
   info.plugin_name   = const_cast("SSL SNI callback test");
@@ -139,7 +139,7 @@ TSPluginInit(int argc, const char *argv[])
 
   int opt = 0;
   while (opt >= 0) {
-    opt = getopt_long(argc, (char *const *)argv, "c:", longopt, NULL);
+    opt = getopt_long(argc, (char *const *)argv, "c:", longopt, nullptr);
     switch (opt) {
     case 'c':
       ConfigPath = optarg;
@@ -159,7 +159,7 @@ TSPluginInit(int argc, const char *argv[])
     TSError(PCP "requires Traffic Server 2.0 or later.");
   } else if (0 > Load_Configuration()) {
     TSError(PCP "Failed to load config file.");
-  } else if (0 == (cb_cert = TSContCreate(&CB_servername, TSMutexCreate()))) {
+  } else if (nullptr == (cb_cert = TSContCreate(&CB_servername, TSMutexCreate()))) {
     TSError(PCP "Failed to create cert callback.");
   } else {
     TSHttpHookAdd(TS_SSL_CERT_HOOK, cb_cert);
diff --git a/example/statistic/statistic.cc b/example/statistic/statistic.cc
index 5b101255b24..bf8dc1a2ce1 100644
--- a/example/statistic/statistic.cc
+++ b/example/statistic/statistic.cc
@@ -60,7 +60,7 @@ TSPluginInit(int /* argc */, const char * /* argv */ [])
 #endif
 
   // Set an initial value for our statistic.
-  TSStatIntSet(id, time(NULL));
+  TSStatIntSet(id, time(nullptr));
 
   // Increment the statistic as time passes.
   TSStatIntIncrement(id, 1);
diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc
index 2404b8f6b34..46362e2ec8c 100644
--- a/iocore/aio/AIO.cc
+++ b/iocore/aio/AIO.cc
@@ -50,8 +50,8 @@ int thread_is_created = 0;
 RecInt cache_config_threads_per_disk = 12;
 RecInt api_config_threads_per_disk   = 12;
 
-RecRawStatBlock *aio_rsb      = NULL;
-Continuation *aio_err_callbck = 0;
+RecRawStatBlock *aio_rsb      = nullptr;
+Continuation *aio_err_callbck = nullptr;
 // AIO Stats
 uint64_t aio_num_read      = 0;
 uint64_t aio_bytes_read    = 0;
@@ -117,7 +117,7 @@ AIOTestData::ink_aio_stats(int event, void *d)
 {
   ink_hrtime now   = Thread::get_hrtime();
   double time_msec = (double)(now - start) / (double)HRTIME_MSECOND;
-  int i            = (aio_reqs[0] == NULL) ? 1 : 0;
+  int i            = (aio_reqs[0] == nullptr) ? 1 : 0;
   for (; i < num_filedes; ++i)
     printf("%0.2f\t%i\t%i\t%i\n", time_msec, aio_reqs[i]->filedes, aio_reqs[i]->pending, aio_reqs[i]->queued);
   printf("Num Requests: %i Num Queued: %i num Moved: %i\n\n", data->num_req, data->num_queue, data->num_temp);
@@ -158,7 +158,7 @@ ink_aio_init(ModuleVersion v)
                      (int)AIO_STAT_KB_WRITE_PER_SEC, aio_stats_cb);
 #if AIO_MODE != AIO_MODE_NATIVE
   memset(&aio_reqs, 0, MAX_DISKS_POSSIBLE * sizeof(AIO_Reqs *));
-  ink_mutex_init(&insert_mutex, NULL);
+  ink_mutex_init(&insert_mutex, nullptr);
 #endif
   REC_ReadConfigInteger(cache_config_threads_per_disk, "proxy.config.cache.threads_per_disk");
 #if TS_USE_LINUX_NATIVE_AIO
@@ -228,8 +228,8 @@ aio_init_fildes(int fildes, int fromAPI = 0)
   INK_WRITE_MEMORY_BARRIER;
 
   ink_cond_init(&request->aio_cond);
-  ink_mutex_init(&request->aio_mutex, NULL);
-  ink_atomiclist_init(&request->aio_temp_list, "temp_list", (uintptr_t) & ((AIOCallback *)0)->link);
+  ink_mutex_init(&request->aio_mutex, nullptr);
+  ink_atomiclist_init(&request->aio_temp_list, "temp_list", (uintptr_t) & ((AIOCallback *)nullptr)->link);
 
   RecInt thread_num;
 
@@ -303,7 +303,7 @@ aio_insert(AIOCallback *op, AIO_Reqs *req)
 static void
 aio_move(AIO_Reqs *req)
 {
-  AIOCallback *next = NULL, *prev = NULL, *cb = (AIOCallback *)ink_atomiclist_popall(&req->aio_temp_list);
+  AIOCallback *next = nullptr, *prev = nullptr, *cb = (AIOCallback *)ink_atomiclist_popall(&req->aio_temp_list);
   /* flip the list */
   if (!cb)
     return;
@@ -317,8 +317,8 @@ aio_move(AIO_Reqs *req)
   cb->link.next = prev;
   for (; cb; cb = next) {
     next          = (AIOCallback *)cb->link.next;
-    cb->link.next = NULL;
-    cb->link.prev = NULL;
+    cb->link.next = nullptr;
+    cb->link.prev = nullptr;
     aio_insert(cb, req);
   }
 }
@@ -329,8 +329,8 @@ aio_queue_req(AIOCallbackInternal *op, int fromAPI = 0)
 {
   int thread_ndx = 1;
   AIO_Reqs *req  = op->aio_req;
-  op->link.next  = NULL;
-  op->link.prev  = NULL;
+  op->link.next  = nullptr;
+  op->link.prev  = nullptr;
 #ifdef AIO_STATS
   ink_atomic_increment((int *)&data->num_req, 1);
 #endif
@@ -368,7 +368,7 @@ aio_queue_req(AIOCallbackInternal *op, int fromAPI = 0)
   }
   if (fromAPI && (!req || req->filedes != -1)) {
     ink_mutex_acquire(&insert_mutex);
-    if (aio_reqs[0] == NULL) {
+    if (aio_reqs[0] == nullptr) {
       req = aio_init_fildes(-1, 1);
     } else {
       req = aio_reqs[0];
@@ -458,14 +458,14 @@ aio_thread_main(void *arg)
 {
   AIOThreadInfo *thr_info = (AIOThreadInfo *)arg;
   AIO_Reqs *my_aio_req    = (AIO_Reqs *)thr_info->req;
-  AIO_Reqs *current_req   = NULL;
-  AIOCallback *op         = NULL;
+  AIO_Reqs *current_req   = nullptr;
+  AIOCallback *op         = nullptr;
   ink_mutex_acquire(&my_aio_req->aio_mutex);
   for (;;) {
     do {
       if (unlikely(shutdown_event_system == true)) {
         ink_mutex_release(&my_aio_req->aio_mutex);
-        return 0;
+        return nullptr;
       }
       current_req = my_aio_req;
       /* check if any pending requests on the atomic list */
@@ -500,8 +500,8 @@ aio_thread_main(void *arg)
 #ifdef AIO_STATS
       ink_atomic_increment((int *)¤t_req->pending, -1);
 #endif
-      op->link.prev = NULL;
-      op->link.next = NULL;
+      op->link.prev = nullptr;
+      op->link.next = nullptr;
       op->mutex     = op->action.mutex;
       if (op->thread == AIO_CALLBACK_THREAD_AIO) {
         SCOPED_MUTEX_LOCK(lock, op->mutex, thr_info->mutex->thread_holding);
@@ -516,7 +516,7 @@ aio_thread_main(void *arg)
     timespec timedwait_msec = ink_hrtime_to_timespec(Thread::get_hrtime_updated() + HRTIME_MSECONDS(net_config_poll_timeout));
     ink_cond_timedwait(&my_aio_req->aio_cond, &my_aio_req->aio_mutex, &timedwait_msec);
   }
-  return 0;
+  return nullptr;
 }
 #else
 int
@@ -531,9 +531,9 @@ DiskHandler::startAIOEvent(int /* event ATS_UNUSED */, Event *e)
 int
 DiskHandler::mainAIOEvent(int event, Event *e)
 {
-  AIOCallback *op = NULL;
+  AIOCallback *op = nullptr;
 Lagain:
-  int ret = io_getevents(ctx, 0, MAX_AIO_EVENTS, events, NULL);
+  int ret = io_getevents(ctx, 0, MAX_AIO_EVENTS, events, nullptr);
   for (int i = 0; i < ret; i++) {
     op             = (AIOCallback *)events[i].data;
     op->aio_result = events[i].res;
@@ -555,7 +555,7 @@ DiskHandler::mainAIOEvent(int event, Event *e)
   ink_aiocb_t *cbs[MAX_AIO_EVENTS];
   int num = 0;
 
-  for (; num < MAX_AIO_EVENTS && ((op = ready_list.dequeue()) != NULL); ++num) {
+  for (; num < MAX_AIO_EVENTS && ((op = ready_list.dequeue()) != nullptr); ++num) {
     cbs[num] = &op->aiocb;
     ink_assert(op->action.continuation);
   }
@@ -575,7 +575,7 @@ DiskHandler::mainAIOEvent(int event, Event *e)
     }
   }
 
-  while ((op = complete_list.dequeue()) != NULL) {
+  while ((op = complete_list.dequeue()) != nullptr) {
     op->handleEvent(event, e);
   }
   return EVENT_CONT;
diff --git a/iocore/aio/test_AIO.cc b/iocore/aio/test_AIO.cc
index 27ef6887aa3..a3d427fa1f5 100644
--- a/iocore/aio/test_AIO.cc
+++ b/iocore/aio/test_AIO.cc
@@ -396,7 +396,7 @@ main(int /* argc ATS_UNUSED */, char *argv[])
   int i;
 
   Layout::create();
-  init_diags("", NULL);
+  init_diags("", nullptr);
   RecProcessInit(RECM_STAND_ALONE);
   ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
   eventProcessor.start(ink_number_of_processors());
@@ -416,7 +416,7 @@ main(int /* argc ATS_UNUSED */, char *argv[])
 
   RecProcessStart();
   ink_aio_init(AIO_MODULE_VERSION);
-  srand48(time(NULL));
+  srand48(time(nullptr));
   printf("input file %s\n", argv[1]);
   if (!read_config(argv[1]))
     exit(1);
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index 2bb65e893ae..7de23db053d 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -89,14 +89,14 @@ int cache_config_compatibility_4_2_0_fixup = 1;
 
 // Globals
 
-RecRawStatBlock *cache_rsb          = NULL;
-Cache *theStreamCache               = 0;
-Cache *theCache                     = 0;
-CacheDisk **gdisks                  = NULL;
+RecRawStatBlock *cache_rsb          = nullptr;
+Cache *theStreamCache               = nullptr;
+Cache *theCache                     = nullptr;
+CacheDisk **gdisks                  = nullptr;
 int gndisks                         = 0;
 static volatile int initialize_disk = 0;
-Cache *caches[NUM_CACHE_FRAG_TYPES] = {0};
-CacheSync *cacheDirSync             = 0;
+Cache *caches[NUM_CACHE_FRAG_TYPES] = {nullptr};
+CacheSync *cacheDirSync             = nullptr;
 Store theCacheStore;
 volatile int CacheProcessor::initialized      = CACHE_INITIALIZING;
 volatile uint32_t CacheProcessor::cache_ready = 0;
@@ -107,7 +107,7 @@ bool CacheProcessor::check                    = false;
 int CacheProcessor::start_internal_flags      = 0;
 int CacheProcessor::auto_clear_flag           = 0;
 CacheProcessor cacheProcessor;
-Vol **gvol         = NULL;
+Vol **gvol         = nullptr;
 volatile int gnvol = 0;
 ClassAllocator cacheVConnectionAllocator("cacheVConnection");
 ClassAllocator evacuationBlockAllocator("evacuationBlock");
@@ -131,7 +131,7 @@ struct VolInitInfo {
   ~VolInitInfo()
   {
     for (int i = 0; i < 4; i++) {
-      vol_aio[i].action = NULL;
+      vol_aio[i].action = nullptr;
       vol_aio[i].mutex.clear();
     }
     free(vol_h_f);
@@ -231,9 +231,9 @@ cache_stats_bytes_used_cb(const char *name, RecDataT data_type, RecData *data, R
 
   // Well, there's no way to pass along the volume ID, so extracting it from the stat name.
   p = strstr((char *)name, "volume_");
-  if (p != NULL) {
+  if (p != nullptr) {
     // I'm counting on the compiler to optimize out strlen("volume_").
-    volume = strtol(p + strlen("volume_"), NULL, 10);
+    volume = strtol(p + strlen("volume_"), nullptr, 10);
   }
 
   if (cacheProcessor.initialized == CACHE_INITIALIZED) {
@@ -305,7 +305,7 @@ update_cache_config(const char * /* name ATS_UNUSED */, RecDataT /* data_type AT
 
 CacheVC::CacheVC() : alternate_index(CACHE_ALT_INDEX_DEFAULT)
 {
-  size_to_init = sizeof(CacheVC) - (size_t) & ((CacheVC *)0)->vio;
+  size_to_init = sizeof(CacheVC) - (size_t) & ((CacheVC *)nullptr)->vio;
   memset((void *)&vio, 0, size_to_init);
 }
 
@@ -314,7 +314,7 @@ HTTPInfo::FragOffset *
 CacheVC::get_frag_table()
 {
   ink_assert(alternate.valid());
-  return alternate.valid() ? alternate.get_frag_table() : 0;
+  return alternate.valid() ? alternate.get_frag_table() : nullptr;
 }
 #endif
 
@@ -412,7 +412,7 @@ CacheVC::reenable_re(VIO *avio)
 #endif
   if (!trigger) {
     if (!is_io_in_progress() && !recursive) {
-      handleEvent(EVENT_NONE, (void *)0);
+      handleEvent(EVENT_NONE, (void *)nullptr);
     } else
       trigger = avio->mutex->thread_holding->schedule_imm_local(this);
   }
@@ -784,7 +784,7 @@ CacheProcessor::diskInitialized()
       if ((gndisks - bad_disks) > 0)
         p_good_disks = (CacheDisk **)ats_malloc((gndisks - bad_disks) * sizeof(CacheDisk *));
       else
-        p_good_disks = 0;
+        p_good_disks = nullptr;
 
       int insert_at = 0;
       for (i = 0; i < gndisks; i++) {
@@ -792,7 +792,7 @@ CacheProcessor::diskInitialized()
           delete gdisks[i];
           continue;
         }
-        if (p_good_disks != NULL) {
+        if (p_good_disks != nullptr) {
           p_good_disks[insert_at++] = gdisks[i];
         }
       }
@@ -1130,8 +1130,8 @@ CacheProcessor::open_read(Continuation *cont, const CacheKey *key, bool cluster_
     hkey.hash     = *key;
     hkey.hostname = hostname;
     hkey.hostlen  = hostlen;
-    return open_read_internal(CACHE_OPEN_READ, cont, (MIOBuffer *)0, &hkey, (CacheHTTPHdr *)0, (CacheLookupHttpConfig *)0, 0,
-                              frag_type);
+    return open_read_internal(CACHE_OPEN_READ, cont, (MIOBuffer *)nullptr, &hkey, (CacheHTTPHdr *)nullptr,
+                              (CacheLookupHttpConfig *)nullptr, 0, frag_type);
   }
 #endif
   return caches[frag_type]->open_read(cont, key, frag_type, hostname, hostlen);
@@ -1145,8 +1145,8 @@ CacheProcessor::open_write(Continuation *cont, CacheKey *key, bool cluster_cache
   if (cache_clustering_enabled > 0 && !cluster_cache_local) {
     ClusterMachine *m = cluster_machine_at_depth(cache_hash(*key));
     if (m)
-      return Cluster_write(cont, expected_size, (MIOBuffer *)0, m, key, frag_type, options, pin_in_cache, CACHE_OPEN_WRITE,
-                           (CacheHTTPHdr *)0, (CacheHTTPInfo *)0, hostname, host_len);
+      return Cluster_write(cont, expected_size, (MIOBuffer *)nullptr, m, key, frag_type, options, pin_in_cache, CACHE_OPEN_WRITE,
+                           (CacheHTTPHdr *)nullptr, (CacheHTTPInfo *)nullptr, hostname, host_len);
   }
 #endif
   return caches[frag_type]->open_write(cont, key, frag_type, options, pin_in_cache, hostname, host_len);
@@ -1301,7 +1301,7 @@ vol_clear_init(Vol *d)
   d->header->last_write_pos                               = d->header->write_pos;
   d->header->phase                                        = 0;
   d->header->cycle                                        = 0;
-  d->header->create_time                                  = time(NULL);
+  d->header->create_time                                  = time(nullptr);
   d->header->dirty                                        = 0;
   d->sector_size = d->header->sector_size = d->disk->hw_sector_size;
   *d->footer                              = *d->header;
@@ -1334,7 +1334,7 @@ Vol::clear_dir()
   io.aiocb.aio_offset = skip;
   io.action           = this;
   io.thread           = AIO_CALLBACK_THREAD_ANY;
-  io.then             = 0;
+  io.then             = nullptr;
   ink_assert(ink_aio_write(&io));
   return 0;
 }
@@ -1373,10 +1373,10 @@ Vol::init(char *s, off_t blocks, off_t dir_skip, bool clear)
   Debug("cache_init", "allocating %zu directory bytes for a %lld byte volume (%lf%%)", vol_dirlen(this), (long long)this->len,
         (double)vol_dirlen(this) / (double)this->len * 100.0);
 
-  raw_dir = NULL;
+  raw_dir = nullptr;
   if (ats_hugepage_enabled())
     raw_dir = (char *)ats_alloc_hugepage(vol_dirlen(this));
-  if (raw_dir == NULL)
+  if (raw_dir == nullptr)
     raw_dir = (char *)ats_memalign(ats_pagesize(), vol_dirlen(this));
 
   dir    = (Dir *)(raw_dir + vol_headerlen(this));
@@ -1409,7 +1409,7 @@ Vol::init(char *s, off_t blocks, off_t dir_skip, bool clear)
     aio->aiocb.aio_nbytes = footerlen;
     aio->action           = this;
     aio->thread           = AIO_CALLBACK_THREAD_ANY;
-    aio->then             = (i < 3) ? &(init_info->vol_aio[i + 1]) : 0;
+    aio->then             = (i < 3) ? &(init_info->vol_aio[i + 1]) : nullptr;
   }
 #if AIO_MODE == AIO_MODE_NATIVE
   ink_assert(ink_aio_readv(init_info->vol_aio));
@@ -1443,7 +1443,7 @@ Vol::handle_dir_clear(int event, void *data)
     }
     set_io_not_in_progress();
     SET_HANDLER(&Vol::dir_init_done);
-    dir_init_done(EVENT_IMMEDIATE, 0);
+    dir_init_done(EVENT_IMMEDIATE, nullptr);
     /* mark the volume as bad */
   }
   return EVENT_DONE;
@@ -1481,7 +1481,7 @@ int
 Vol::recover_data()
 {
   SET_HANDLER(&Vol::handle_recover_from_data);
-  return handle_recover_from_data(EVENT_IMMEDIATE, 0);
+  return handle_recover_from_data(EVENT_IMMEDIATE, nullptr);
 }
 
 /*
@@ -1528,9 +1528,9 @@ Vol::handle_recover_from_data(int event, void * /* data ATS_UNUSED */)
   char *s, *e;
   if (event == EVENT_IMMEDIATE) {
     if (header->sync_serial == 0) {
-      io.aiocb.aio_buf = NULL;
+      io.aiocb.aio_buf = nullptr;
       SET_HANDLER(&Vol::handle_recover_write_dir);
-      return handle_recover_write_dir(EVENT_IMMEDIATE, 0);
+      return handle_recover_write_dir(EVENT_IMMEDIATE, nullptr);
     }
     // initialize
     recover_wrapped   = 0;
@@ -1585,7 +1585,7 @@ Vol::handle_recover_from_data(int event, void * /* data ATS_UNUSED */)
   }
   // examine what we got
   if (got_len) {
-    Doc *doc = NULL;
+    Doc *doc = nullptr;
 
     if (recover_wrapped && start == io.aiocb.aio_offset) {
       doc = (Doc *)s;
@@ -1700,7 +1700,7 @@ Ldone : {
     SET_HANDLER(&Vol::handle_recover_write_dir);
     if (is_debug_tag_set("cache_init"))
       Note("recovery wrapped around. nothing to clear\n");
-    return handle_recover_write_dir(EVENT_IMMEDIATE, 0);
+    return handle_recover_write_dir(EVENT_IMMEDIATE, nullptr);
   }
 
   recover_pos += EVACUATION_SIZE; // safely cover the max write size
@@ -1736,7 +1736,7 @@ Ldone : {
     aio->aiocb.aio_fildes = fd;
     aio->action           = this;
     aio->thread           = AIO_CALLBACK_THREAD_ANY;
-    aio->then             = (i < 2) ? &(init_info->vol_aio[i + 1]) : 0;
+    aio->then             = (i < 2) ? &(init_info->vol_aio[i + 1]) : nullptr;
   }
   int footerlen = ROUND_TO_STORE_BLOCK(sizeof(VolHeaderFooter));
   size_t dirlen = vol_dirlen(this);
@@ -1765,7 +1765,7 @@ Ldone : {
 Lclear:
   free((char *)io.aiocb.aio_buf);
   delete init_info;
-  init_info = 0;
+  init_info = nullptr;
   clear_dir();
   return EVENT_CONT;
 }
@@ -1776,12 +1776,12 @@ Vol::handle_recover_write_dir(int /* event ATS_UNUSED */, void * /* data ATS_UNU
   if (io.aiocb.aio_buf)
     free((char *)io.aiocb.aio_buf);
   delete init_info;
-  init_info = 0;
+  init_info = nullptr;
   set_io_not_in_progress();
   scan_pos = header->write_pos;
   periodic_scan();
   SET_HANDLER(&Vol::dir_init_done);
-  return dir_init_done(EVENT_IMMEDIATE, 0);
+  return dir_init_done(EVENT_IMMEDIATE, nullptr);
 }
 
 int
@@ -1793,7 +1793,7 @@ Vol::handle_header_read(int event, void *data)
   case AIO_EVENT_DONE:
     op = (AIOCallback *)data;
     for (int i = 0; i < 4; i++) {
-      ink_assert(op != 0);
+      ink_assert(op != nullptr);
       hf[i] = (VolHeaderFooter *)(op->aiocb.aio_buf);
       if ((size_t)op->aio_result != (size_t)op->aiocb.aio_nbytes) {
         clear_dir();
@@ -1807,7 +1807,7 @@ Vol::handle_header_read(int event, void *data)
     io.aiocb.aio_buf    = raw_dir;
     io.action           = this;
     io.thread           = AIO_CALLBACK_THREAD_ANY;
-    io.then             = 0;
+    io.then             = nullptr;
 
     if (hf[0]->sync_serial == hf[1]->sync_serial &&
         (hf[0]->sync_serial >= hf[2]->sync_serial || hf[2]->sync_serial != hf[3]->sync_serial)) {
@@ -1828,7 +1828,7 @@ Vol::handle_header_read(int event, void *data)
       Note("no good directory, clearing '%s'", hash_text.get());
       clear_dir();
       delete init_info;
-      init_info = 0;
+      init_info = nullptr;
     }
     return EVENT_DONE;
   default:
@@ -1907,7 +1907,7 @@ build_vol_hash_table(CacheHostRecord *cp)
     if (cp->vol_hash_table) {
       new_Freer(cp->vol_hash_table, CACHE_MEM_FREE_TIMEOUT);
     }
-    cp->vol_hash_table = NULL;
+    cp->vol_hash_table = nullptr;
     ats_free(mapping);
     ats_free(p);
     return;
@@ -1968,7 +1968,7 @@ build_vol_hash_table(CacheHostRecord *cp)
     Debug("cache_init", "build_vol_hash_table index %d mapped to %d requested %d got %d", i, mapping[i], forvol[i], gotvol[i]);
   }
   // install new table
-  if (0 != (old_table = ink_atomic_swap(&(cp->vol_hash_table), ttable)))
+  if (nullptr != (old_table = ink_atomic_swap(&(cp->vol_hash_table), ttable)))
     new_Freer(old_table, CACHE_MEM_FREE_TIMEOUT);
   ats_free(mapping);
   ats_free(p);
@@ -2314,7 +2314,7 @@ CacheVC::handleReadDone(int event, Event *e)
   cancel_trigger();
   ink_assert(this_ethread() == mutex->thread_holding);
 
-  Doc *doc = NULL;
+  Doc *doc = nullptr;
   if (event == AIO_EVENT_DONE)
     set_io_not_in_progress();
   else if (is_io_in_progress())
@@ -2442,7 +2442,7 @@ CacheVC::handleReadDone(int event, Event *e)
   }
 Ldone:
   POP_HANDLER;
-  return handleEvent(AIO_EVENT_DONE, 0);
+  return handleEvent(AIO_EVENT_DONE, nullptr);
 }
 
 int
@@ -2512,7 +2512,7 @@ Action *
 Cache::lookup(Continuation *cont, const CacheKey *key, CacheFragType type, const char *hostname, int host_len)
 {
   if (!CacheProcessor::IsCacheReady(type)) {
-    cont->handleEvent(CACHE_EVENT_LOOKUP_FAILED, 0);
+    cont->handleEvent(CACHE_EVENT_LOOKUP_FAILED, nullptr);
     return ACTION_RESULT_DONE;
   }
 
@@ -2527,9 +2527,9 @@ Cache::lookup(Continuation *cont, const CacheKey *key, CacheFragType type, const
   c->frag_type          = type;
   c->f.lookup           = 1;
   c->vol                = vol;
-  c->last_collision     = NULL;
+  c->last_collision     = nullptr;
 
-  if (c->handleEvent(EVENT_INTERVAL, 0) == EVENT_CONT)
+  if (c->handleEvent(EVENT_INTERVAL, nullptr) == EVENT_CONT)
     return &c->_action;
   else
     return ACTION_RESULT_DONE;
@@ -2547,7 +2547,7 @@ CacheVC::removeEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
     if (_action.cancelled) {
       if (od) {
         vol->close_write(this);
-        od = 0;
+        od = nullptr;
       }
       goto Lfree;
     }
@@ -2556,7 +2556,7 @@ CacheVC::removeEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
         // writer  exists
         ink_release_assert(od = vol->open_read(&key));
         od->dont_update_directory = 1;
-        od                        = NULL;
+        od                        = nullptr;
       } else {
         od->dont_update_directory = 1;
       }
@@ -2567,7 +2567,7 @@ CacheVC::removeEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
     if (!buf)
       goto Lcollision;
     if (!dir_valid(vol, &dir)) {
-      last_collision = NULL;
+      last_collision = nullptr;
       goto Lcollision;
     }
     // check read completed correct FIXME: remove bad vols
@@ -2582,7 +2582,7 @@ CacheVC::removeEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
         if (dir_delete(&key, vol, &dir) > 0) {
           if (od)
             vol->close_write(this);
-          od = NULL;
+          od = nullptr;
           goto Lremoved;
         }
         goto Ldone;
@@ -2605,7 +2605,7 @@ CacheVC::removeEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
   _action.continuation->handleEvent(CACHE_EVENT_REMOVE_FAILED, (void *)-ECACHE_NO_DOC);
   goto Lfree;
 Lremoved:
-  _action.continuation->handleEvent(CACHE_EVENT_REMOVE, 0);
+  _action.continuation->handleEvent(CACHE_EVENT_REMOVE, nullptr);
 Lfree:
   return free_CacheVC(this);
 }
@@ -2615,7 +2615,7 @@ Cache::remove(Continuation *cont, const CacheKey *key, CacheFragType type, const
 {
   if (!CacheProcessor::IsCacheReady(type)) {
     if (cont)
-      cont->handleEvent(CACHE_EVENT_REMOVE_FAILED, 0);
+      cont->handleEvent(CACHE_EVENT_REMOVE_FAILED, nullptr);
     return ACTION_RESULT_DONE;
   }
 
@@ -2642,7 +2642,7 @@ Cache::remove(Continuation *cont, const CacheKey *key, CacheFragType type, const
   c->f.remove           = 1;
 
   SET_CONTINUATION_HANDLER(c, &CacheVC::removeEvent);
-  int ret = c->removeEvent(EVENT_IMMEDIATE, 0);
+  int ret = c->removeEvent(EVENT_IMMEDIATE, nullptr);
   if (ret == EVENT_DONE)
     return ACTION_RESULT_DONE;
   else
@@ -2650,7 +2650,7 @@ Cache::remove(Continuation *cont, const CacheKey *key, CacheFragType type, const
 }
 // CacheVConnection
 
-CacheVConnection::CacheVConnection() : VConnection(NULL)
+CacheVConnection::CacheVConnection() : VConnection(nullptr)
 {
 }
 
@@ -2717,12 +2717,12 @@ cplist_update()
                 config_vol->cachep = cp;
               } else {
                 cp->disk_vols[d_no]->disk->delete_volume(cp->vol_number);
-                cp->disk_vols[d_no] = NULL;
+                cp->disk_vols[d_no] = nullptr;
               }
             }
           }
           if (clearCV) {
-            config_vol = NULL;
+            config_vol = nullptr;
           }
         }
         break;
@@ -3084,7 +3084,7 @@ rebuild_host_table(Cache *cache)
   }
 }
 
-// if generic_host_rec.vols == NULL, what do we do???
+// if generic_host_rec.vols == nullptr, what do we do???
 Vol *
 Cache::key_to_vol(const CacheKey *key, const char *hostname, int host_len)
 {
@@ -3261,14 +3261,14 @@ ink_cache_init(ModuleVersion v)
 
   REC_EstablishStaticConfigInt32(cache_config_read_while_writer, "proxy.config.cache.enable_read_while_writer");
   cache_config_read_while_writer = validate_rww(cache_config_read_while_writer);
-  REC_RegisterConfigUpdateFunc("proxy.config.cache.enable_read_while_writer", update_cache_config, NULL);
+  REC_RegisterConfigUpdateFunc("proxy.config.cache.enable_read_while_writer", update_cache_config, nullptr);
   Debug("cache_init", "proxy.config.cache.enable_read_while_writer = %d", cache_config_read_while_writer);
 
   register_cache_stats(cache_rsb, "proxy.process.cache");
 
   REC_ReadConfigInteger(cacheProcessor.wait_for_cache, "proxy.config.http.wait_for_cache");
 
-  const char *err = NULL;
+  const char *err = nullptr;
   if ((err = theCacheStore.read_config())) {
     printf("Failed to read cache storage configuration - %s\n", err);
     exit(1);
@@ -3282,7 +3282,7 @@ CacheProcessor::open_read(Continuation *cont, const HttpCacheKey *key, bool clus
 {
 #ifdef CLUSTER_CACHE
   if (cache_clustering_enabled > 0 && !cluster_cache_local) {
-    return open_read_internal(CACHE_OPEN_READ_LONG, cont, (MIOBuffer *)0, key, request, params, pin_in_cache, type);
+    return open_read_internal(CACHE_OPEN_READ_LONG, cont, (MIOBuffer *)nullptr, key, request, params, pin_in_cache, type);
   }
 #endif
 
@@ -3300,12 +3300,12 @@ CacheProcessor::open_write(Continuation *cont, int expected_size, const HttpCach
 
     if (m) {
       // Do remote open_write()
-      return Cluster_write(cont, expected_size, (MIOBuffer *)0, m, &key->hash, type, false, pin_in_cache, CACHE_OPEN_WRITE_LONG,
-                           request, old_info, key->hostname, key->hostlen);
+      return Cluster_write(cont, expected_size, (MIOBuffer *)nullptr, m, &key->hash, type, false, pin_in_cache,
+                           CACHE_OPEN_WRITE_LONG, request, old_info, key->hostname, key->hostlen);
     }
   }
 #endif
-  return caches[type]->open_write(cont, &key->hash, old_info, pin_in_cache, NULL /* key1 */, type, key->hostname, key->hostlen);
+  return caches[type]->open_write(cont, &key->hash, old_info, pin_in_cache, nullptr /* key1 */, type, key->hostname, key->hostlen);
 }
 
 //----------------------------------------------------------------------------
@@ -3339,7 +3339,7 @@ CacheProcessor::find_by_path(const char *path, int len)
     }
   }
 
-  return 0;
+  return nullptr;
 }
 
 // ----------------------------
@@ -3410,7 +3410,7 @@ HTTPInfo_v21::copy_and_upgrade_unmarshalled_to_v23(char *&dst, char *&src, size_
     }
   } else {
     d_alt->m_frag_offset_count = 0;
-    d_alt->m_frag_offsets      = 0;
+    d_alt->m_frag_offsets      = nullptr;
     ink_zero(d_alt->m_integral_frag_offsets);
   }
 
diff --git a/iocore/cache/CacheDir.cc b/iocore/cache/CacheDir.cc
index d305785d291..dfe1d47844d 100644
--- a/iocore/cache/CacheDir.cc
+++ b/iocore/cache/CacheDir.cc
@@ -87,7 +87,7 @@ OpenDir::open_write(CacheVC *cont, int allow_if_writers, int max_writers)
     return 0;
   }
   OpenDirEntry *od = THREAD_ALLOC(openDirEntryAllocator, cont->mutex->thread_holding);
-  od->readers.head = NULL;
+  od->readers.head = nullptr;
   od->writers.push(cont);
   od->num_writers           = 1;
   od->max_writers           = max_writers;
@@ -108,12 +108,12 @@ OpenDir::signal_readers(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
 {
   Queue newly_delayed_readers;
   EThread *t = mutex->thread_holding;
-  CacheVC *c = NULL;
+  CacheVC *c = nullptr;
   while ((c = delayed_readers.dequeue())) {
     CACHE_TRY_LOCK(lock, c->mutex, t);
     if (lock.is_locked()) {
       c->f.open_read_timeout = 0;
-      c->handleEvent(EVENT_IMMEDIATE, 0);
+      c->handleEvent(EVENT_IMMEDIATE, nullptr);
       continue;
     }
     newly_delayed_readers.push(c);
@@ -139,11 +139,11 @@ OpenDir::close_write(CacheVC *cont)
     int b          = h % OPEN_DIR_BUCKETS;
     bucket[b].remove(cont->od);
     delayed_readers.append(cont->od->readers);
-    signal_readers(0, 0);
+    signal_readers(0, nullptr);
     cont->od->vector.clear();
     THREAD_FREE(cont->od, openDirEntryAllocator, cont->mutex->thread_holding);
   }
-  cont->od = NULL;
+  cont->od = nullptr;
   return 0;
 }
 
@@ -155,7 +155,7 @@ OpenDir::open_read(const CryptoHash *key)
   for (OpenDirEntry *d = bucket[b].head; d; d = d->link.next)
     if (d->writers.head->first_key == *key)
       return d;
-  return NULL;
+  return nullptr;
 }
 
 int
@@ -178,7 +178,7 @@ OpenDirEntry::wait(CacheVC *cont, int msec)
 int
 dir_bucket_loop_check(Dir *start_dir, Dir *seg)
 {
-  if (start_dir == NULL)
+  if (start_dir == nullptr)
     return 1;
 
   Dir *p1 = start_dir;
@@ -321,7 +321,7 @@ dir_delete_entry(Dir *e, Dir *p, int s, Vol *d)
       return e;
     } else {
       dir_clear(e);
-      return NULL;
+      return nullptr;
     }
   }
   return dir_from_offset(no, seg);
@@ -330,7 +330,7 @@ dir_delete_entry(Dir *e, Dir *p, int s, Vol *d)
 inline void
 dir_clean_bucket(Dir *b, int s, Vol *vol)
 {
-  Dir *e = b, *p = NULL;
+  Dir *e = b, *p = nullptr;
   Dir *seg = dir_segment(s, vol);
 #ifdef LOOP_CHECK_MODE
   int loop_count = 0;
@@ -429,13 +429,13 @@ freelist_pop(int s, Vol *d)
   Dir *e   = dir_from_offset(d->header->freelist[s], seg);
   if (!e) {
     freelist_clean(s, d);
-    return NULL;
+    return nullptr;
   }
   d->header->freelist[s] = dir_next(e);
   // if the freelist if bad, punt.
   if (dir_offset(e)) {
     dir_init_segment(s, d);
-    return NULL;
+    return nullptr;
   }
   Dir *h = dir_from_offset(d->header->freelist[s], seg);
   if (h)
@@ -506,7 +506,7 @@ dir_probe(const CacheKey *key, Vol *d, Dir *result, Dir **last_collision)
   int s    = key->slice32(0) % d->segments;
   int b    = key->slice32(1) % d->buckets;
   Dir *seg = dir_segment(s, d);
-  Dir *e = NULL, *p = NULL, *collision = *last_collision;
+  Dir *e = nullptr, *p = nullptr, *collision = *last_collision;
   Vol *vol = d;
   CHECK_DIR(d);
 #ifdef LOOP_CHECK_MODE
@@ -524,7 +524,7 @@ dir_probe(const CacheKey *key, Vol *d, Dir *result, Dir **last_collision)
         // don't want to call dir_delete_entry.
         if (collision) {
           if (collision == e) {
-            collision = NULL;
+            collision = nullptr;
             // increment collison stat
             // Note: dir_probe could be called multiple times
             // for the same document and so the collision stat
@@ -557,7 +557,7 @@ dir_probe(const CacheKey *key, Vol *d, Dir *result, Dir **last_collision)
   if (collision) { // last collision no longer in the list, retry
     DDebug("cache_stats", "Incrementing dir collisions");
     CACHE_INC_DIR_COLLISIONS(d->mutex);
-    collision = NULL;
+    collision = nullptr;
     goto Lagain;
   }
   DDebug("dir_probe_miss", "missed %X %X on vol %d bucket %d at %p", key->slice32(0), key->slice32(1), d->fd, b, seg);
@@ -573,7 +573,7 @@ dir_insert(const CacheKey *key, Vol *d, Dir *to_part)
   int bi = key->slice32(1) % d->buckets;
   ink_assert(dir_approx_size(to_part) <= MAX_FRAG_SIZE + sizeofDoc);
   Dir *seg = dir_segment(s, d);
-  Dir *e   = NULL;
+  Dir *e   = nullptr;
   Dir *b   = dir_bucket(bi, seg);
   Vol *vol = d;
 #if defined(DEBUG) && defined(DO_CHECK_DIR_FAST)
@@ -624,7 +624,7 @@ dir_overwrite(const CacheKey *key, Vol *d, Dir *dir, Dir *overwrite, bool must_o
   int s          = key->slice32(0) % d->segments, l;
   int bi         = key->slice32(1) % d->buckets;
   Dir *seg       = dir_segment(s, d);
-  Dir *e         = NULL;
+  Dir *e         = nullptr;
   Dir *b         = dir_bucket(bi, seg);
   unsigned int t = DIR_MASK_TAG(key->slice32(2));
   int res        = 1;
@@ -696,7 +696,7 @@ dir_delete(const CacheKey *key, Vol *d, Dir *del)
   int s    = key->slice32(0) % d->segments;
   int b    = key->slice32(1) % d->buckets;
   Dir *seg = dir_segment(s, d);
-  Dir *e = NULL, *p = NULL;
+  Dir *e = nullptr, *p = nullptr;
 #ifdef LOOP_CHECK_MODE
   int loop_count = 0;
 #endif
@@ -893,7 +893,7 @@ void
 sync_cache_dir_on_shutdown(void)
 {
   Debug("cache_dir_sync", "sync started");
-  char *buf     = NULL;
+  char *buf     = nullptr;
   size_t buflen = 0;
   bool buf_huge = false;
 
@@ -945,14 +945,14 @@ sync_cache_dir_on_shutdown(void)
           ats_free_hugepage(buf, buflen);
         else
           ats_memalign_free(buf);
-        buf = NULL;
+        buf = nullptr;
       }
       buflen = dirlen;
       if (ats_hugepage_enabled()) {
         buf      = (char *)ats_alloc_hugepage(buflen);
         buf_huge = true;
       }
-      if (buf == NULL) {
+      if (buf == nullptr) {
         buf      = (char *)ats_memalign(ats_pagesize(), buflen);
         buf_huge = false;
       }
@@ -979,7 +979,7 @@ sync_cache_dir_on_shutdown(void)
       ats_free_hugepage(buf, buflen);
     else
       ats_memalign_free(buf);
-    buf = NULL;
+    buf = nullptr;
   }
 }
 
@@ -988,7 +988,7 @@ CacheSync::mainEvent(int event, Event *e)
 {
   if (trigger) {
     trigger->cancel_action();
-    trigger = NULL;
+    trigger = nullptr;
   }
 
 Lrestart:
@@ -1000,7 +1000,7 @@ CacheSync::mainEvent(int event, Event *e)
       else
         ats_memalign_free(buf);
       buflen   = 0;
-      buf      = NULL;
+      buf      = nullptr;
       buf_huge = false;
     }
     Debug("cache_dir_sync", "sync done");
@@ -1060,7 +1060,7 @@ CacheSync::mainEvent(int event, Event *e)
         Debug("cache_dir_sync", "Dir %s: waiting for agg buffer", vol->hash_text.get());
         vol->dir_sync_waiting = 1;
         if (!vol->is_io_in_progress())
-          vol->aggWrite(EVENT_IMMEDIATE, 0);
+          vol->aggWrite(EVENT_IMMEDIATE, nullptr);
         return EVENT_CONT;
       }
       Debug("cache_dir_sync", "pos: %" PRIu64 " Dir %s dirty...syncing to disk", vol->header->write_pos, vol->hash_text.get());
@@ -1071,14 +1071,14 @@ CacheSync::mainEvent(int event, Event *e)
             ats_free_hugepage(buf, buflen);
           else
             ats_memalign_free(buf);
-          buf = NULL;
+          buf = nullptr;
         }
         buflen = dirlen;
         if (ats_hugepage_enabled()) {
           buf      = (char *)ats_alloc_hugepage(buflen);
           buf_huge = true;
         }
-        if (buf == NULL) {
+        if (buf == nullptr) {
           buf      = (char *)ats_memalign(ats_pagesize(), buflen);
           buf_huge = false;
         }
@@ -1188,7 +1188,7 @@ int Vol::dir_check(bool /* fix ATS_UNUSED */) // TODO: we should eliminate this
           ++seg_empty;
           --seg_buckets_in_use;
           // this should only happen on the first dir in a bucket
-          ink_assert(NULL == next_dir(e, seg));
+          ink_assert(nullptr == next_dir(e, seg));
           break;
         } else {
           int e_idx = e - seg;
@@ -1430,7 +1430,7 @@ EXCLUSIVE_REGRESSION_TEST(Cache_dir)(RegressionTest *t, int /* atype ATS_UNUSED
   regress_rand_init(13);
   ttime = Thread::get_hrtime_updated();
   for (i = 0; i < newfree; i++) {
-    Dir *last_collision = 0;
+    Dir *last_collision = nullptr;
     regress_rand_CacheKey(&key);
     if (!dir_probe(&key, d, &dir, &last_collision))
       ret = REGRESSION_TEST_FAILED;
diff --git a/iocore/cache/CacheDisk.cc b/iocore/cache/CacheDisk.cc
index 5987ae58c0d..a257e618bb2 100644
--- a/iocore/cache/CacheDisk.cc
+++ b/iocore/cache/CacheDisk.cc
@@ -60,7 +60,7 @@ CacheDisk::open(char *s, off_t blocks, off_t askip, int ahw_sector_size, int fil
       fprintf(stderr, "Could not read disk header for disk %s", path);
       SET_DISK_BAD(this);
       SET_HANDLER(&CacheDisk::openDone);
-      return openDone(EVENT_IMMEDIATE, 0);
+      return openDone(EVENT_IMMEDIATE, nullptr);
     } else {
       SET_HANDLER(&CacheDisk::clearDone);
       return clearDisk();
@@ -81,7 +81,7 @@ CacheDisk::~CacheDisk()
   if (path) {
     ats_free(path);
     for (int i = 0; i < (int)header->num_volumes; i++) {
-      DiskVolBlockQueue *q = NULL;
+      DiskVolBlockQueue *q = nullptr;
       while (disk_vols[i] && (q = (disk_vols[i]->dpb_queue.pop()))) {
         delete q;
       }
@@ -90,7 +90,7 @@ CacheDisk::~CacheDisk()
     free(header);
   }
   if (free_blocks) {
-    DiskVolBlockQueue *q = NULL;
+    DiskVolBlockQueue *q = nullptr;
     while ((q = (free_blocks->dpb_queue.pop()))) {
       delete q;
     }
@@ -123,7 +123,7 @@ CacheDisk::clearDone(int event, void * /* data ATS_UNUSED */)
   //  update_header();
 
   SET_HANDLER(&CacheDisk::openDone);
-  return openDone(EVENT_IMMEDIATE, 0);
+  return openDone(EVENT_IMMEDIATE, nullptr);
 }
 
 int
@@ -135,7 +135,7 @@ CacheDisk::openStart(int event, void * /* data ATS_UNUSED */)
     Warning("could not read disk header for disk %s: declaring disk bad", path);
     SET_DISK_BAD(this);
     SET_HANDLER(&CacheDisk::openDone);
-    return openDone(EVENT_IMMEDIATE, 0);
+    return openDone(EVENT_IMMEDIATE, nullptr);
   }
 
   if (header->magic != DISK_HEADER_MAGIC || header->num_blocks != static_cast(len)) {
@@ -168,7 +168,7 @@ CacheDisk::openStart(int event, void * /* data ATS_UNUSED */)
   update_header();
 
   SET_HANDLER(&CacheDisk::openDone);
-  return openDone(EVENT_IMMEDIATE, 0);
+  return openDone(EVENT_IMMEDIATE, nullptr);
 }
 
 int
@@ -214,20 +214,20 @@ DiskVolBlock *
 CacheDisk::create_volume(int number, off_t size_in_blocks, int scheme)
 {
   if (size_in_blocks == 0)
-    return NULL;
+    return nullptr;
 
   DiskVolBlockQueue *q             = free_blocks->dpb_queue.head;
   DiskVolBlockQueue *closest_match = q;
 
   if (!q)
-    return NULL;
+    return nullptr;
 
   off_t max_blocks = MAX_VOL_SIZE >> STORE_BLOCK_SHIFT;
   size_in_blocks   = (size_in_blocks <= max_blocks) ? size_in_blocks : max_blocks;
 
   int blocks_per_vol = VOL_BLOCK_SIZE / STORE_BLOCK_SIZE;
   //  ink_assert(!(size_in_blocks % blocks_per_vol));
-  DiskVolBlock *p = 0;
+  DiskVolBlock *p = nullptr;
   for (; q; q = q->link.next) {
     if ((off_t)q->b->len >= size_in_blocks) {
       p            = q->b;
@@ -240,7 +240,7 @@ CacheDisk::create_volume(int number, off_t size_in_blocks, int scheme)
   }
 
   if (!p && !closest_match)
-    return NULL;
+    return nullptr;
 
   if (!p && closest_match) {
     /* allocate from the closest match */
@@ -344,7 +344,7 @@ CacheDisk::update_header()
   unsigned int n = 0;
   unsigned int i, j;
   if (free_blocks) {
-    DiskVolBlockQueue *q = NULL;
+    DiskVolBlockQueue *q = nullptr;
     while ((q = (free_blocks->dpb_queue.pop()))) {
       delete q;
     }
@@ -408,7 +408,7 @@ CacheDisk::get_diskvol(int vol_number)
       return disk_vols[i];
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 int
diff --git a/iocore/cache/CacheHosting.cc b/iocore/cache/CacheHosting.cc
index 3f02e6c1984..2cac146acf9 100644
--- a/iocore/cache/CacheHosting.cc
+++ b/iocore/cache/CacheHosting.cc
@@ -28,13 +28,13 @@
 
 extern int gndisks;
 
-matcher_tags CacheHosting_tags = {"hostname", "domain", NULL, NULL, NULL, NULL, 0};
+matcher_tags CacheHosting_tags = {"hostname", "domain", nullptr, nullptr, nullptr, nullptr, 0};
 
 /*************************************************************
  *   Begin class HostMatcher
  *************************************************************/
 
-CacheHostMatcher::CacheHostMatcher(const char *name, CacheType typ) : data_array(NULL), array_len(-1), num_el(-1), type(typ)
+CacheHostMatcher::CacheHostMatcher(const char *name, CacheType typ) : data_array(nullptr), array_len(-1), num_el(-1), type(typ)
 {
   host_lookup = new HostLookup(name);
 }
@@ -117,7 +117,7 @@ CacheHostMatcher::Match(const char *rdata, int rlen, CacheHostResult *result)
   r = host_lookup->MatchFirst(data, &s, &opaque_ptr);
 
   while (r == true) {
-    ink_assert(opaque_ptr != NULL);
+    ink_assert(opaque_ptr != nullptr);
     data_ptr = (CacheHostRecord *)opaque_ptr;
     data_ptr->UpdateMatch(result, data);
 
@@ -151,11 +151,11 @@ CacheHostMatcher::NewEntry(matcher_line *line_info)
 
   // Make sure that the line_info is not bogus
   ink_assert(line_info->dest_entry < MATCHER_MAX_TOKENS);
-  ink_assert(match_data != NULL);
+  ink_assert(match_data != nullptr);
 
   // Remove our consumed label from the parsed line
   if (line_info->dest_entry < MATCHER_MAX_TOKENS)
-    line_info->line[0][line_info->dest_entry] = NULL;
+    line_info->line[0][line_info->dest_entry] = nullptr;
   line_info->num_el--;
 
   // Fill in the parameter info
@@ -184,13 +184,13 @@ CacheHostTable::CacheHostTable(Cache *c, CacheType typ)
   ats_scoped_str config_path;
 
   config_tags = &CacheHosting_tags;
-  ink_assert(config_tags != NULL);
+  ink_assert(config_tags != nullptr);
 
   type         = typ;
   cache        = c;
   matcher_name = "[CacheHosting]";
   ;
-  hostMatch = NULL;
+  hostMatch = nullptr;
 
   config_path = RecConfigReadConfigPath("proxy.config.cache.hosting_filename");
   ink_release_assert(config_path);
@@ -200,7 +200,7 @@ CacheHostTable::CacheHostTable(Cache *c, CacheType typ)
 
 CacheHostTable::~CacheHostTable()
 {
-  if (hostMatch != NULL) {
+  if (hostMatch != nullptr) {
     delete hostMatch;
   }
 }
@@ -213,7 +213,7 @@ void
 CacheHostTable::Print()
 {
   printf("Control Matcher Table: %s\n", matcher_name);
-  if (hostMatch != NULL) {
+  if (hostMatch != nullptr) {
     hostMatch->Print();
   }
 }
@@ -252,13 +252,13 @@ CacheHostTable::BuildTableFromString(const char *config_file_path, char *file_bu
   Tokenizer bufTok("\n");
   tok_iter_state i_state;
   const char *tmp;
-  matcher_line *first = NULL;
+  matcher_line *first = nullptr;
   matcher_line *current;
-  matcher_line *last = NULL;
+  matcher_line *last = nullptr;
   int line_num       = 0;
   int second_pass    = 0;
   int numEntries     = 0;
-  const char *errPtr = NULL;
+  const char *errPtr = nullptr;
 
   // type counts
   int hostDomain = 0;
@@ -273,7 +273,7 @@ CacheHostTable::BuildTableFromString(const char *config_file_path, char *file_bu
   }
   // First get the number of entries
   tmp = bufTok.iterFirst(&i_state);
-  while (tmp != NULL) {
+  while (tmp != nullptr) {
     line_num++;
 
     // skip all blank spaces at beginning of line
@@ -285,7 +285,7 @@ CacheHostTable::BuildTableFromString(const char *config_file_path, char *file_bu
       current = (matcher_line *)ats_malloc(sizeof(matcher_line));
       errPtr  = parseConfigLine((char *)tmp, current, config_tags);
 
-      if (errPtr != NULL) {
+      if (errPtr != nullptr) {
         RecSignalWarning(REC_SIGNAL_CONFIG_ERROR, "%s discarding %s entry at line %d : %s", matcher_name, config_file_path,
                          line_num, errPtr);
         ats_free(current);
@@ -305,8 +305,8 @@ CacheHostTable::BuildTableFromString(const char *config_file_path, char *file_bu
           ink_assert(0);
         }
 
-        if (first == NULL) {
-          ink_assert(last == NULL);
+        if (first == nullptr) {
+          ink_assert(last == nullptr);
           first = last = current;
         } else {
           last->next = current;
@@ -326,7 +326,7 @@ CacheHostTable::BuildTableFromString(const char *config_file_path, char *file_bu
       Warning("Problems encountered while initializing the Generic Volume");
     }
 
-    if (first != NULL) {
+    if (first != nullptr) {
       ats_free(first);
     }
     return 0;
@@ -339,11 +339,11 @@ CacheHostTable::BuildTableFromString(const char *config_file_path, char *file_bu
   // Traverse the list and build the records table
   int generic_rec_initd = 0;
   current               = first;
-  while (current != NULL) {
+  while (current != nullptr) {
     second_pass++;
     if ((current->type == MATCH_DOMAIN) || (current->type == MATCH_HOST)) {
       char *match_data = current->line[1][current->dest_entry];
-      ink_assert(match_data != NULL);
+      ink_assert(match_data != nullptr);
 
       if (!strcasecmp(match_data, "*")) {
         // generic volume - initialize the generic hostrecord */
@@ -352,7 +352,7 @@ CacheHostTable::BuildTableFromString(const char *config_file_path, char *file_bu
 
         // Remove our consumed label from the parsed line
         if (current->dest_entry < MATCHER_MAX_TOKENS)
-          current->line[0][current->dest_entry] = NULL;
+          current->line[0][current->dest_entry] = nullptr;
         else
           Warning("Problems encountered while initializing the Generic Volume");
 
@@ -397,9 +397,9 @@ CacheHostTable::BuildTable(const char *config_file_path)
   char *file_buf;
   int ret;
 
-  file_buf = readIntoBuffer(config_file_path, matcher_name, NULL);
+  file_buf = readIntoBuffer(config_file_path, matcher_name, nullptr);
 
-  if (file_buf == NULL) {
+  if (file_buf == nullptr) {
     Warning("Cannot read the config file: %s", config_file_path);
     gen_host_rec.Init(type);
     return 0;
@@ -482,7 +482,7 @@ CacheHostRecord::Init(matcher_line *line_info, CacheType typ)
             const char *errptr = "A volume number expected";
             RecSignalWarning(REC_SIGNAL_CONFIG_ERROR, "%s discarding %s entry at line %d :%s", "[CacheHosting]", config_file,
                              line_info->line_num, errptr);
-            if (val != NULL) {
+            if (val != nullptr) {
               ats_free(val);
             }
             return -1;
@@ -491,7 +491,7 @@ CacheHostRecord::Init(matcher_line *line_info, CacheType typ)
         if ((*s < '0') || (*s > '9')) {
           RecSignalWarning(REC_SIGNAL_CONFIG_ERROR, "%s discarding %s entry at line %d : bad token [%c]", "[CacheHosting]",
                            config_file, line_info->line_num, *s);
-          if (val != NULL) {
+          if (val != nullptr) {
             ats_free(val);
           }
           return -1;
@@ -526,7 +526,7 @@ CacheHostRecord::Init(matcher_line *line_info, CacheType typ)
           if (!is_vol_present) {
             RecSignalWarning(REC_SIGNAL_CONFIG_ERROR, "%s discarding %s entry at line %d : bad volume number [%d]",
                              "[CacheHosting]", config_file, line_info->line_num, volume_number);
-            if (val != NULL) {
+            if (val != nullptr) {
               ats_free(val);
             }
             return -1;
@@ -537,7 +537,7 @@ CacheHostRecord::Init(matcher_line *line_info, CacheType typ)
         }
         s++;
       }
-      if (val != NULL) {
+      if (val != nullptr) {
         ats_free(val);
       }
       break;
@@ -591,8 +591,8 @@ ConfigVolumes::read_config_file()
   config_path = RecConfigReadConfigPath("proxy.config.cache.volume_filename");
   ink_release_assert(config_path);
 
-  file_buf = readIntoBuffer(config_path, "[CacheVolition]", NULL);
-  if (file_buf == NULL) {
+  file_buf = readIntoBuffer(config_path, "[CacheVolition]", nullptr);
+  if (file_buf == nullptr) {
     Warning("Cannot read the config file: %s", (const char *)config_path);
     return;
   }
@@ -628,12 +628,12 @@ ConfigVolumes::BuildListFromString(char *config_file_path, char *file_buf)
 
   // First get the number of entries
   tmp = bufTok.iterFirst(&i_state);
-  while (tmp != NULL) {
+  while (tmp != nullptr) {
     line_num++;
 
     char *end;
-    char *line_end    = NULL;
-    const char *err   = NULL;
+    char *line_end    = nullptr;
+    const char *err   = nullptr;
     int volume_number = 0;
     CacheType scheme  = CACHE_NONE_TYPE;
     int size          = 0;
@@ -746,7 +746,7 @@ ConfigVolumes::BuildListFromString(char *config_file_path, char *file_buf)
       }
       configp->scheme = scheme;
       configp->size   = size;
-      configp->cachep = NULL;
+      configp->cachep = nullptr;
       cp_queue.enqueue(configp);
       num_volumes++;
       if (scheme == CACHE_HTTP_TYPE) {
@@ -791,7 +791,7 @@ static void restore_state();
 EXCLUSIVE_REGRESSION_TEST(Cache_vol)(RegressionTest *t, int /* atype ATS_UNUSED */, int *status)
 {
   save_state();
-  srand48(time(NULL));
+  srand48(time(nullptr));
   *status = REGRESSION_TEST_PASSED;
   for (int i = 0; i < configs; i++) {
     if (create_config(t, i)) {
@@ -829,7 +829,7 @@ create_config(RegressionTest *t, int num)
         cp->scheme     = CACHE_HTTP_TYPE;
         cp->size       = 128;
         cp->in_percent = 0;
-        cp->cachep     = 0;
+        cp->cachep     = nullptr;
         config_volumes.cp_queue.enqueue(cp);
         config_volumes.num_volumes++;
         config_volumes.num_http_volumes++;
@@ -868,7 +868,7 @@ create_config(RegressionTest *t, int num)
       cp->size       = 10;
       cp->percent    = 10;
       cp->in_percent = 1;
-      cp->cachep     = 0;
+      cp->cachep     = nullptr;
       config_volumes.cp_queue.enqueue(cp);
       config_volumes.num_volumes++;
       config_volumes.num_http_volumes++;
@@ -926,7 +926,7 @@ create_config(RegressionTest *t, int num)
       cp->size       = random_size >> 20;
       cp->percent    = 0;
       cp->in_percent = 0;
-      cp->cachep     = 0;
+      cp->cachep     = nullptr;
       config_volumes.cp_queue.enqueue(cp);
       config_volumes.num_volumes++;
       if (cp->scheme == CACHE_HTTP_TYPE) {
@@ -1035,7 +1035,7 @@ int
 ClearConfigVol(ConfigVolumes *configp)
 {
   int i         = 0;
-  ConfigVol *cp = NULL;
+  ConfigVol *cp = nullptr;
   while ((cp = configp->cp_queue.dequeue())) {
     delete cp;
     i++;
@@ -1054,7 +1054,7 @@ int
 ClearCacheVolList(Queue *cpl, int len)
 {
   int i        = 0;
-  CacheVol *cp = NULL;
+  CacheVol *cp = nullptr;
   while ((cp = cpl->dequeue())) {
     ats_free(cp->disk_vols);
     ats_free(cp->vols);
diff --git a/iocore/cache/CacheHttp.cc b/iocore/cache/CacheHttp.cc
index 4c2130d1911..b142125d4b6 100644
--- a/iocore/cache/CacheHttp.cc
+++ b/iocore/cache/CacheHttp.cc
@@ -33,7 +33,7 @@ static vec_info default_vec_info;
 #ifdef HTTP_CACHE
 static CacheHTTPInfo default_http_info;
 
-CacheHTTPInfoVector::CacheHTTPInfoVector() : magic(NULL), data(&default_vec_info, 4), xcount(0)
+CacheHTTPInfoVector::CacheHTTPInfoVector() : magic(nullptr), data(&default_vec_info, 4), xcount(0)
 {
 }
 
@@ -48,7 +48,7 @@ CacheHTTPInfoVector::~CacheHTTPInfoVector()
     data[i].alternate.destroy();
   }
   vector_buf.clear();
-  magic = NULL;
+  magic = nullptr;
 }
 
 /*-------------------------------------------------------------------------
diff --git a/iocore/cache/CacheLink.cc b/iocore/cache/CacheLink.cc
index 2aef39e14b0..6b1f6dc823a 100644
--- a/iocore/cache/CacheLink.cc
+++ b/iocore/cache/CacheLink.cc
@@ -27,7 +27,7 @@ Action *
 Cache::link(Continuation *cont, const CacheKey *from, const CacheKey *to, CacheFragType type, const char *hostname, int host_len)
 {
   if (!CacheProcessor::IsCacheReady(type)) {
-    cont->handleEvent(CACHE_EVENT_LINK_FAILED, 0);
+    cont->handleEvent(CACHE_EVENT_LINK_FAILED, nullptr);
     return ACTION_RESULT_DONE;
   }
 
@@ -63,9 +63,9 @@ CacheVC::linkWrite(int event, Event * /* e ATS_UNUSED */)
   if (_action.cancelled)
     goto Ldone;
   if (io.ok())
-    _action.continuation->handleEvent(CACHE_EVENT_LINK, NULL);
+    _action.continuation->handleEvent(CACHE_EVENT_LINK, nullptr);
   else
-    _action.continuation->handleEvent(CACHE_EVENT_LINK_FAILED, NULL);
+    _action.continuation->handleEvent(CACHE_EVENT_LINK_FAILED, nullptr);
 Ldone:
   return free_CacheVC(this);
 }
@@ -74,7 +74,7 @@ Action *
 Cache::deref(Continuation *cont, const CacheKey *key, CacheFragType type, const char *hostname, int host_len)
 {
   if (!CacheProcessor::IsCacheReady(type)) {
-    cont->handleEvent(CACHE_EVENT_DEREF_FAILED, 0);
+    cont->handleEvent(CACHE_EVENT_DEREF_FAILED, nullptr);
     return ACTION_RESULT_DONE;
   }
 
@@ -82,8 +82,8 @@ Cache::deref(Continuation *cont, const CacheKey *key, CacheFragType type, const
 
   Vol *vol = key_to_vol(key, hostname, host_len);
   Dir result;
-  Dir *last_collision = NULL;
-  CacheVC *c          = NULL;
+  Dir *last_collision = nullptr;
+  CacheVC *c          = nullptr;
   {
     MUTEX_TRY_LOCK(lock, vol->mutex, cont->mutex->thread_holding);
     if (lock.is_locked()) {
@@ -114,7 +114,7 @@ Cache::deref(Continuation *cont, const CacheKey *key, CacheFragType type, const
     }
   }
 Lcallreturn:
-  if (c->handleEvent(AIO_EVENT_DONE, 0) == EVENT_DONE)
+  if (c->handleEvent(AIO_EVENT_DONE, nullptr) == EVENT_DONE)
     return ACTION_RESULT_DONE;
   else
     return &c->_action;
@@ -123,7 +123,7 @@ Cache::deref(Continuation *cont, const CacheKey *key, CacheFragType type, const
 int
 CacheVC::derefRead(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
 {
-  Doc *doc = NULL;
+  Doc *doc = nullptr;
 
   cancel_trigger();
   set_io_not_in_progress();
@@ -134,7 +134,7 @@ CacheVC::derefRead(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
   if ((int)io.aio_result != (int)io.aiocb.aio_nbytes)
     goto Ldone;
   if (!dir_agg_valid(vol, &dir)) {
-    last_collision = NULL;
+    last_collision = nullptr;
     goto Lcollision;
   }
   doc = (Doc *)buf->data();
@@ -163,5 +163,5 @@ Lcollision : {
   _action.continuation->handleEvent(CACHE_EVENT_DEREF_FAILED, (void *)-ECACHE_NO_DOC);
   return free_CacheVC(this);
 Lcallreturn:
-  return handleEvent(AIO_EVENT_DONE, 0); // hopefully a tail call
+  return handleEvent(AIO_EVENT_DONE, nullptr); // hopefully a tail call
 }
diff --git a/iocore/cache/CachePages.cc b/iocore/cache/CachePages.cc
index 07c79e82fc7..74aef253984 100644
--- a/iocore/cache/CachePages.cc
+++ b/iocore/cache/CachePages.cc
@@ -70,18 +70,18 @@ struct ShowCache : public ShowCont {
       vol_index(0),
       seg_index(0),
       scan_flag(scan_type_lookup),
-      cache_vc(0),
-      buffer(0),
-      buffer_reader(0),
+      cache_vc(nullptr),
+      buffer(nullptr),
+      buffer_reader(nullptr),
       content_length(0),
-      cvio(0)
+      cvio(nullptr)
   {
     urlstrs_index = 0;
     linecount     = 0;
     int query_len;
     char query[4096];
     char unescapedQuery[sizeof(query)];
-    show_cache_urlstrs = NULL;
+    show_cache_urlstrs = nullptr;
     URL *u             = h->url_get();
 
     // process the query string
@@ -317,15 +317,15 @@ ShowCache::handleCacheEvent(int event, Event *e)
 
     if (buffer_reader) {
       buffer->dealloc_reader(buffer_reader);
-      buffer_reader = 0;
+      buffer_reader = nullptr;
     }
     if (buffer) {
       free_MIOBuffer(buffer);
-      buffer = 0;
+      buffer = nullptr;
     }
-    cvio = 0;
+    cvio = nullptr;
     cache_vc->do_io_close(-1);
-    cache_vc = 0;
+    cache_vc = nullptr;
     return complete(event, e);
   }
   case CACHE_EVENT_OPEN_READ: {
@@ -441,7 +441,7 @@ ShowCache::lookup_url(int event, Event *e)
 
   snprintf(header_str, sizeof(header_str), "%s", show_cache_urlstrs[0]);
   CHECK_SHOW(begin(header_str));
-  url.create(NULL);
+  url.create(nullptr);
   const char *s;
   s = show_cache_urlstrs[0];
   url.parse(&s, s + strlen(s));
@@ -457,7 +457,7 @@ ShowCache::lookup_url(int event, Event *e)
   if (lookup_result == ACTION_RESULT_DONE)
     return EVENT_DONE; // callback complete
   else if (lookup_result == ACTION_IO_ERROR) {
-    handleEvent(CACHE_EVENT_OPEN_READ_FAILED, 0);
+    handleEvent(CACHE_EVENT_OPEN_READ_FAILED, nullptr);
     return EVENT_DONE; // callback complete
   } else
     return EVENT_CONT; // callback pending, will be a cluster read.
@@ -478,7 +478,7 @@ ShowCache::delete_url(int event, Event *e)
     CHECK_SHOW(show("\n"));
     return complete(event, e);
   }
-  url.create(NULL);
+  url.create(nullptr);
   const char *s;
   s = show_cache_urlstrs[urlstrs_index];
   CHECK_SHOW(show("%s", s));
@@ -601,12 +601,12 @@ ShowCache::handleCacheScanCallback(int event, Event *e)
     for (unsigned s = 0; show_cache_urlstrs[s][0] != '\0'; s++) {
       const char *error;
       int erroffset;
-      pcre *preq = pcre_compile(show_cache_urlstrs[s], 0, &error, &erroffset, NULL);
+      pcre *preq = pcre_compile(show_cache_urlstrs[s], 0, &error, &erroffset, nullptr);
 
       Debug("cache_inspector", "matching url '%s' '%s' with regex '%s'", m, xx, show_cache_urlstrs[s]);
 
       if (preq) {
-        int r = pcre_exec(preq, NULL, xx, ib, 0, 0, NULL, 0);
+        int r = pcre_exec(preq, nullptr, xx, ib, 0, 0, nullptr, 0);
 
         pcre_free(preq);
         if (r != -1) {
diff --git a/iocore/cache/CachePagesInternal.cc b/iocore/cache/CachePagesInternal.cc
index 7a41d94d27a..34a17718200 100644
--- a/iocore/cache/CachePagesInternal.cc
+++ b/iocore/cache/CachePagesInternal.cc
@@ -58,7 +58,7 @@ extern Vol **gvol;
 extern volatile int gnvol;
 
 // Stat Pages
-ShowCacheInternal *theshowcacheInternal = NULL;
+ShowCacheInternal *theshowcacheInternal = nullptr;
 
 #define STREQ_PREFIX(_x, _s) (!strncasecmp(_x, _s, sizeof(_s) - 1))
 #define STREQ_LEN_PREFIX(_x, _l, _s) (path_len < sizeof(_s) && !strncasecmp(_x, _s, sizeof(_s) - 1))
@@ -263,7 +263,7 @@ ShowCacheInternal::showVolVolumes(int event, Event *e)
   ctime[strlen(ctime) - 1] = 0;
   int agg_todo             = 0;
   int agg_done             = p->agg_buf_pos;
-  CacheVC *c               = 0;
+  CacheVC *c               = nullptr;
   for (c = p->agg.head; c; c = (CacheVC *)c->link.next)
     agg_todo++;
   CHECK_SHOW(show(""
diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc
index 35db0b95e3c..ec3cf3d40ab 100644
--- a/iocore/cache/CacheRead.cc
+++ b/iocore/cache/CacheRead.cc
@@ -39,10 +39,10 @@ Cache::open_read(Continuation *cont, const CacheKey *key, CacheFragType type, co
   ink_assert(caches[type] == this);
 
   Vol *vol = key_to_vol(key, hostname, host_len);
-  Dir result, *last_collision = NULL;
+  Dir result, *last_collision = nullptr;
   ProxyMutex *mutex = cont->mutex.get();
-  OpenDirEntry *od  = NULL;
-  CacheVC *c        = NULL;
+  OpenDirEntry *od  = nullptr;
+  CacheVC *c        = nullptr;
   {
     CACHE_TRY_LOCK(lock, vol->mutex, mutex->thread_holding);
     if (!lock.is_locked() || (od = vol->open_read(key)) || dir_probe(key, vol, &result, &last_collision)) {
@@ -81,11 +81,11 @@ Cache::open_read(Continuation *cont, const CacheKey *key, CacheFragType type, co
   return ACTION_RESULT_DONE;
 Lwriter:
   SET_CONTINUATION_HANDLER(c, &CacheVC::openReadFromWriter);
-  if (c->handleEvent(EVENT_IMMEDIATE, 0) == EVENT_DONE)
+  if (c->handleEvent(EVENT_IMMEDIATE, nullptr) == EVENT_DONE)
     return ACTION_RESULT_DONE;
   return &c->_action;
 Lcallreturn:
-  if (c->handleEvent(AIO_EVENT_DONE, 0) == EVENT_DONE)
+  if (c->handleEvent(AIO_EVENT_DONE, nullptr) == EVENT_DONE)
     return ACTION_RESULT_DONE;
   return &c->_action;
 }
@@ -102,10 +102,10 @@ Cache::open_read(Continuation *cont, const CacheKey *key, CacheHTTPHdr *request,
   ink_assert(caches[type] == this);
 
   Vol *vol = key_to_vol(key, hostname, host_len);
-  Dir result, *last_collision = NULL;
+  Dir result, *last_collision = nullptr;
   ProxyMutex *mutex = cont->mutex.get();
-  OpenDirEntry *od  = NULL;
-  CacheVC *c        = NULL;
+  OpenDirEntry *od  = nullptr;
+  CacheVC *c        = nullptr;
 
   {
     CACHE_TRY_LOCK(lock, vol->mutex, mutex->thread_holding);
@@ -151,11 +151,11 @@ Cache::open_read(Continuation *cont, const CacheKey *key, CacheHTTPHdr *request,
   // this is a horrible violation of the interface and should be fixed (FIXME)
   ((HttpCacheSM *)cont)->set_readwhilewrite_inprogress(true);
   SET_CONTINUATION_HANDLER(c, &CacheVC::openReadFromWriter);
-  if (c->handleEvent(EVENT_IMMEDIATE, 0) == EVENT_DONE)
+  if (c->handleEvent(EVENT_IMMEDIATE, nullptr) == EVENT_DONE)
     return ACTION_RESULT_DONE;
   return &c->_action;
 Lcallreturn:
-  if (c->handleEvent(AIO_EVENT_DONE, 0) == EVENT_DONE)
+  if (c->handleEvent(AIO_EVENT_DONE, nullptr) == EVENT_DONE)
     return ACTION_RESULT_DONE;
   return &c->_action;
 }
@@ -179,7 +179,7 @@ CacheVC::load_http_info(CacheHTTPInfoVector *info, Doc *doc, RefCountObj *block_
 int
 CacheVC::openReadFromWriterFailure(int event, Event *e)
 {
-  od = NULL;
+  od = nullptr;
   vector.clear(false);
   CACHE_INCREMENT_DYN_STAT(cache_read_failure_stat);
   CACHE_INCREMENT_DYN_STAT(cache_read_busy_failure_stat);
@@ -192,9 +192,9 @@ int
 CacheVC::openReadChooseWriter(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
 {
   intptr_t err = ECACHE_DOC_BUSY;
-  CacheVC *w   = NULL;
+  CacheVC *w   = nullptr;
 
-  ink_assert(vol->mutex->thread_holding == mutex->thread_holding && write_vc == NULL);
+  ink_assert(vol->mutex->thread_holding == mutex->thread_holding && write_vc == nullptr);
 
   if (!od)
     return EVENT_RETURN;
@@ -203,7 +203,7 @@ CacheVC::openReadChooseWriter(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSE
     ink_assert(od->num_writers == 1);
     w = od->writers.head;
     if (w->start_time > start_time || w->closed < 0) {
-      od = NULL;
+      od = nullptr;
       return EVENT_RETURN;
     }
     if (!w->closed)
@@ -228,7 +228,7 @@ CacheVC::openReadChooseWriter(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSE
         continue;
 
       if (!w->closed && !w->alternate.valid()) {
-        od = NULL;
+        od = nullptr;
         ink_assert(!write_vc);
         vector.clear(false);
         return EVENT_CONT;
@@ -255,7 +255,7 @@ CacheVC::openReadChooseWriter(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSE
         // the writer(s) are reading the vector, so there is probably
         // an old vector. Since this reader came before any of the
         // current writers, we should return the old data
-        od = NULL;
+        od = nullptr;
         return EVENT_RETURN;
       }
       return -ECACHE_NO_DOC;
@@ -276,7 +276,7 @@ CacheVC::openReadChooseWriter(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSE
     vector.clear(false);
     if (!write_vc) {
       DDebug("cache_read_agg", "%p: key: %X writer alternate different: %d", this, first_key.slice32(1), alternate_index);
-      od = NULL;
+      od = nullptr;
       return EVENT_RETURN;
     }
 
@@ -291,9 +291,9 @@ int
 CacheVC::openReadFromWriter(int event, Event *e)
 {
   if (!f.read_from_writer_called) {
-    // The assignment to last_collision as NULL was
+    // The assignment to last_collision as nullptr was
     // made conditional after INKqa08411
-    last_collision = NULL;
+    last_collision = nullptr;
     // Let's restart the clock from here - the first time this a reader
     // gets in this state. Its possible that the open_read was called
     // before the open_write, but the reader could not get the volume
@@ -306,7 +306,7 @@ CacheVC::openReadFromWriter(int event, Event *e)
   intptr_t err = ECACHE_DOC_BUSY;
   DDebug("cache_read_agg", "%p: key: %X In openReadFromWriter", this, first_key.slice32(1));
   if (_action.cancelled) {
-    od = NULL; // only open for read so no need to close
+    od = nullptr; // only open for read so no need to close
     return free_CacheVC(this);
   }
   CACHE_TRY_LOCK(lock, vol->mutex, mutex->thread_holding);
@@ -315,7 +315,7 @@ CacheVC::openReadFromWriter(int event, Event *e)
   od = vol->open_read(&first_key); // recheck in case the lock failed
   if (!od) {
     MUTEX_RELEASE(lock);
-    write_vc = NULL;
+    write_vc = nullptr;
     SET_HANDLER(&CacheVC::openReadStartHead);
     return openReadStartHead(event, e);
   } else
@@ -343,8 +343,8 @@ CacheVC::openReadFromWriter(int event, Event *e)
     if (writer_done()) {
       MUTEX_RELEASE(lock);
       DDebug("cache_read_agg", "%p: key: %X writer %p has left, continuing as normal read", this, first_key.slice32(1), write_vc);
-      od       = NULL;
-      write_vc = NULL;
+      od       = nullptr;
+      write_vc = nullptr;
       SET_HANDLER(&CacheVC::openReadStartHead);
       return openReadStartHead(event, e);
     }
@@ -352,14 +352,14 @@ CacheVC::openReadFromWriter(int event, Event *e)
 #ifdef HTTP_CACHE
   OpenDirEntry *cod = od;
 #endif
-  od = NULL;
+  od = nullptr;
   // someone is currently writing the document
   if (write_vc->closed < 0) {
     MUTEX_RELEASE(lock);
-    write_vc = NULL;
+    write_vc = nullptr;
     // writer aborted, continue as if there is no writer
     SET_HANDLER(&CacheVC::openReadStartHead);
-    return openReadStartHead(EVENT_IMMEDIATE, 0);
+    return openReadStartHead(EVENT_IMMEDIATE, nullptr);
   }
   // allow reading from unclosed writer for http requests only.
   ink_assert(frag_type == CACHE_FRAG_TYPE_HTTP || write_vc->closed);
@@ -426,7 +426,7 @@ CacheVC::openReadFromWriter(int event, Event *e)
       }
       // want to snarf the new headers from the writer
       // and then continue as if nothing happened
-      last_collision = NULL;
+      last_collision = nullptr;
       MUTEX_RELEASE(writer_lock);
       SET_HANDLER(&CacheVC::openReadStartEarliest);
       return openReadStartEarliest(event, e);
@@ -440,7 +440,7 @@ CacheVC::openReadFromWriter(int event, Event *e)
 #endif
   if (write_vc->fragment) {
     doc_len        = write_vc->vio.nbytes;
-    last_collision = NULL;
+    last_collision = nullptr;
     DDebug("cache_read_agg", "%p: key: %X closed: %d, fragment: %d, len: %d starting first fragment", this, first_key.slice32(1),
            write_vc->closed, write_vc->fragment, (int)doc_len);
     MUTEX_RELEASE(writer_lock);
@@ -474,7 +474,7 @@ CacheVC::openReadFromWriterMain(int /* event ATS_UNUSED */, Event * /* e ATS_UNU
     vio.ndone = seek_to;
     seek_to   = 0;
   }
-  IOBufferBlock *b = NULL;
+  IOBufferBlock *b = nullptr;
   int64_t ntodo    = vio.ntodo();
   if (ntodo <= 0)
     return EVENT_CONT;
@@ -537,7 +537,7 @@ CacheVC::openReadClose(int event, Event * /* e ATS_UNUSED */)
 int
 CacheVC::openReadReadDone(int event, Event *e)
 {
-  Doc *doc = NULL;
+  Doc *doc = nullptr;
 
   cancel_trigger();
   if (event == EVENT_IMMEDIATE)
@@ -567,7 +567,7 @@ CacheVC::openReadReadDone(int event, Event *e)
         goto LreadMain;
     }
     if (last_collision && dir_offset(&dir) != dir_offset(last_collision))
-      last_collision = 0; // object has been/is being overwritten
+      last_collision = nullptr; // object has been/is being overwritten
     if (dir_probe(&key, vol, &dir, &last_collision)) {
       int ret = do_read_call(&key);
       if (ret == EVENT_RETURN)
@@ -575,7 +575,7 @@ CacheVC::openReadReadDone(int event, Event *e)
       return EVENT_CONT;
     } else if (write_vc) {
       if (writer_done()) {
-        last_collision = NULL;
+        last_collision = nullptr;
         while (dir_probe(&earliest_key, vol, &dir, &last_collision)) {
           if (dir_offset(&dir) == dir_offset(&earliest_dir)) {
             DDebug("cache_read_agg", "%p: key: %X ReadRead complete: %d", this, first_key.slice32(1), (int)vio.ndone);
@@ -604,7 +604,7 @@ CacheVC::openReadReadDone(int event, Event *e)
 Ldone:
   return calluser(VC_EVENT_EOS);
 Lcallreturn:
-  return handleEvent(AIO_EVENT_DONE, 0);
+  return handleEvent(AIO_EVENT_DONE, nullptr);
 LreadMain:
   fragment++;
   doc_pos = doc->prefix_len();
@@ -620,7 +620,7 @@ CacheVC::openReadMain(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
   Doc *doc         = (Doc *)buf->data();
   int64_t ntodo    = vio.ntodo();
   int64_t bytes    = doc->len - doc_pos;
-  IOBufferBlock *b = NULL;
+  IOBufferBlock *b = nullptr;
   if (seek_to) { // handle do_io_pread
     if (seek_to >= doc_len) {
       vio.ndone = doc_len;
@@ -723,7 +723,7 @@ Lread : {
   if (vio.ndone >= (int64_t)doc_len)
     // reached the end of the document and the user still wants more
     return calluser(VC_EVENT_EOS);
-  last_collision    = 0;
+  last_collision    = nullptr;
   writer_lock_retry = 0;
   // if the state machine calls reenable on the callback from the cache,
   // we set up a schedule_imm event. The openReadReadDone discards
@@ -743,7 +743,7 @@ Lread : {
     return EVENT_CONT;
   } else if (write_vc) {
     if (writer_done()) {
-      last_collision = NULL;
+      last_collision = nullptr;
       while (dir_probe(&earliest_key, vol, &dir, &last_collision)) {
         if (dir_offset(&dir) == dir_offset(&earliest_dir)) {
           DDebug("cache_read_agg", "%p: key: %X ReadMain complete: %d", this, first_key.slice32(1), (int)vio.ndone);
@@ -770,7 +770,7 @@ Lread : {
 Leos:
   return calluser(VC_EVENT_EOS);
 Lcallreturn:
-  return handleEvent(AIO_EVENT_DONE, 0);
+  return handleEvent(AIO_EVENT_DONE, nullptr);
 }
 
 /*
@@ -781,7 +781,7 @@ int
 CacheVC::openReadStartEarliest(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
 {
   int ret  = 0;
-  Doc *doc = NULL;
+  Doc *doc = nullptr;
   cancel_trigger();
   set_io_not_in_progress();
   if (_action.cancelled)
@@ -799,7 +799,7 @@ CacheVC::openReadStartEarliest(int /* event ATS_UNUSED */, Event * /* e ATS_UNUS
     if (!dir_agg_valid(vol, &dir)) {
       // a directory entry which is nolonger valid may have been overwritten
       if (!dir_valid(vol, &dir))
-        last_collision = NULL;
+        last_collision = nullptr;
       goto Lread;
     }
     doc = (Doc *)buf->data();
@@ -818,7 +818,7 @@ CacheVC::openReadStartEarliest(int /* event ATS_UNUSED */, Event * /* e ATS_UNUS
       // in case the dir entry we deleted doesnt correspond
       // to the key we are looking for. This is possible
       // because of directory collisions
-      last_collision = NULL;
+      last_collision = nullptr;
       goto Lread;
     }
     if (!(doc->key == key)) // collisiion
@@ -836,7 +836,7 @@ CacheVC::openReadStartEarliest(int /* event ATS_UNUSED */, Event * /* e ATS_UNUS
     }
     goto Lsuccess;
   Lread:
-    if (dir_probe(&key, vol, &earliest_dir, &last_collision) || dir_lookaside_probe(&key, vol, &earliest_dir, NULL)) {
+    if (dir_probe(&key, vol, &earliest_dir, &last_collision) || dir_lookaside_probe(&key, vol, &earliest_dir, nullptr)) {
       dir = earliest_dir;
       if ((ret = do_read_call(&key)) == EVENT_RETURN)
         goto Lcallreturn;
@@ -859,8 +859,8 @@ CacheVC::openReadStartEarliest(int /* event ATS_UNUSED */, Event * /* e ATS_UNUS
           // (cannot assert on the return value)
           dir_delete(&first_key, vol, &first_dir);
         } else {
-          buf             = NULL;
-          last_collision  = NULL;
+          buf             = nullptr;
+          last_collision  = nullptr;
           write_len       = 0;
           header_len      = write_vector->marshal_length();
           f.evac_vector   = 1;
@@ -906,7 +906,7 @@ CacheVC::openReadStartEarliest(int /* event ATS_UNUSED */, Event * /* e ATS_UNUS
   _action.continuation->handleEvent(CACHE_EVENT_OPEN_READ_FAILED, (void *)-ECACHE_NO_DOC);
   return free_CacheVC(this);
 Lcallreturn:
-  return handleEvent(AIO_EVENT_DONE, 0); // hopefully a tail call
+  return handleEvent(AIO_EVENT_DONE, nullptr); // hopefully a tail call
 Lsuccess:
   if (write_vc)
     CACHE_INCREMENT_DYN_STAT(cache_read_busy_success_stat);
@@ -925,7 +925,7 @@ CacheVC::openReadVecWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */
   ink_assert(od);
   od->writing_vec = 0;
   if (_action.cancelled)
-    return openWriteCloseDir(EVENT_IMMEDIATE, 0);
+    return openWriteCloseDir(EVENT_IMMEDIATE, nullptr);
   {
     CACHE_TRY_LOCK(lock, vol->mutex, mutex->thread_holding);
     if (!lock.is_locked())
@@ -935,7 +935,7 @@ CacheVC::openReadVecWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */
       ink_assert(frag_type == CACHE_FRAG_TYPE_HTTP);
       ink_assert(!buf);
       f.evac_vector   = false;
-      last_collision  = NULL;
+      last_collision  = nullptr;
       f.update        = 0;
       alternate_index = CACHE_ALT_INDEX_DEFAULT;
       f.use_first_key = 0;
@@ -962,7 +962,7 @@ CacheVC::openReadVecWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */
   return free_CacheVC(this);
 Lrestart:
   SET_HANDLER(&CacheVC::openReadStartHead);
-  return openReadStartHead(EVENT_IMMEDIATE, 0);
+  return openReadStartHead(EVENT_IMMEDIATE, nullptr);
 }
 #endif
 
@@ -974,7 +974,7 @@ int
 CacheVC::openReadStartHead(int event, Event *e)
 {
   intptr_t err = ECACHE_NO_DOC;
-  Doc *doc     = NULL;
+  Doc *doc     = nullptr;
   cancel_trigger();
   set_io_not_in_progress();
   if (_action.cancelled)
@@ -992,7 +992,7 @@ CacheVC::openReadStartHead(int event, Event *e)
     if (!dir_agg_valid(vol, &dir)) {
       // a directory entry which is nolonger valid may have been overwritten
       if (!dir_valid(vol, &dir))
-        last_collision = NULL;
+        last_collision = nullptr;
       goto Lread;
     }
     doc = (Doc *)buf->data();
@@ -1011,7 +1011,7 @@ CacheVC::openReadStartHead(int event, Event *e)
       // in case the dir entry we deleted doesnt correspond
       // to the key we are looking for. This is possible
       // because of directory collisions
-      last_collision = NULL;
+      last_collision = nullptr;
       goto Lread;
     }
     if (!(doc->first_key == key))
@@ -1132,7 +1132,7 @@ CacheVC::openReadStartHead(int event, Event *e)
       od = cod;
       MUTEX_RELEASE(lock);
       SET_HANDLER(&CacheVC::openReadFromWriter);
-      return handleEvent(EVENT_IMMEDIATE, 0);
+      return handleEvent(EVENT_IMMEDIATE, nullptr);
     }
     if (dir_probe(&key, vol, &dir, &last_collision)) {
       first_dir = dir;
@@ -1152,19 +1152,19 @@ CacheVC::openReadStartHead(int event, Event *e)
   }
   return free_CacheVC(this);
 Lcallreturn:
-  return handleEvent(AIO_EVENT_DONE, 0); // hopefully a tail call
+  return handleEvent(AIO_EVENT_DONE, nullptr); // hopefully a tail call
 Lsuccess:
   SET_HANDLER(&CacheVC::openReadMain);
   return callcont(CACHE_EVENT_OPEN_READ);
 Lookup:
   CACHE_INCREMENT_DYN_STAT(cache_lookup_success_stat);
-  _action.continuation->handleEvent(CACHE_EVENT_LOOKUP, 0);
+  _action.continuation->handleEvent(CACHE_EVENT_LOOKUP, nullptr);
   return free_CacheVC(this);
 Learliest:
   first_buf      = buf;
-  buf            = NULL;
+  buf            = nullptr;
   earliest_key   = key;
-  last_collision = NULL;
+  last_collision = nullptr;
   SET_HANDLER(&CacheVC::openReadStartEarliest);
   return openReadStartEarliest(event, e);
 }
diff --git a/iocore/cache/CacheTest.cc b/iocore/cache/CacheTest.cc
index 65d368f0252..67bf496f620 100644
--- a/iocore/cache/CacheTest.cc
+++ b/iocore/cache/CacheTest.cc
@@ -33,13 +33,13 @@ CacheTestSM::CacheTestSM(RegressionTest *t, const char *name)
   : RegressionSM(t),
     start_memcpy_on_clone(0),
     cache_test_name(name),
-    timeout(0),
-    cache_action(0),
+    timeout(nullptr),
+    cache_action(nullptr),
     start_time(0),
-    cache_vc(0),
-    cvio(0),
-    buffer(0),
-    buffer_reader(0),
+    cache_vc(nullptr),
+    cvio(nullptr),
+    buffer(nullptr),
+    buffer_reader(nullptr),
     total_size(0),
     nbytes(-1),
     repeat_count(0),
@@ -93,13 +93,13 @@ CacheTestSM::event_handler(int event, void *data)
     cancel_timeout();
     if (cache_action) {
       cache_action->cancel();
-      cache_action = 0;
+      cache_action = nullptr;
     }
     if (cache_vc) {
       cache_vc->do_io_close();
-      cache_vc = 0;
+      cache_vc = nullptr;
     }
-    cvio = 0;
+    cvio = nullptr;
     make_request();
     return EVENT_DONE;
 
@@ -110,7 +110,7 @@ CacheTestSM::event_handler(int event, void *data)
   case CACHE_EVENT_OPEN_READ:
     initial_event = event;
     cancel_timeout();
-    cache_action  = 0;
+    cache_action  = nullptr;
     cache_vc      = (CacheVConnection *)data;
     buffer        = new_empty_MIOBuffer();
     buffer_reader = buffer->alloc_reader();
@@ -141,7 +141,7 @@ CacheTestSM::event_handler(int event, void *data)
   case CACHE_EVENT_OPEN_WRITE:
     initial_event = event;
     cancel_timeout();
-    cache_action  = 0;
+    cache_action  = nullptr;
     cache_vc      = (CacheVConnection *)data;
     buffer        = new_empty_MIOBuffer();
     buffer_reader = buffer->alloc_reader();
@@ -198,7 +198,7 @@ CacheTestSM::event_handler(int event, void *data)
 
 Lcancel_next:
   cancel_timeout();
-  cache_action = 0;
+  cache_action = nullptr;
   goto Lnext;
 Lclose_error_next:
   cache_vc->do_io_close(1);
@@ -206,14 +206,14 @@ CacheTestSM::event_handler(int event, void *data)
 Lclose_next:
   cache_vc->do_io_close();
 Lclose_next_internal:
-  cache_vc = 0;
+  cache_vc = nullptr;
   if (buffer_reader) {
     buffer->dealloc_reader(buffer_reader);
-    buffer_reader = 0;
+    buffer_reader = nullptr;
   }
   if (buffer) {
     free_MIOBuffer(buffer);
-    buffer = 0;
+    buffer = nullptr;
   }
 Lnext:
   if (check_result(event) && repeat_count) {
@@ -353,7 +353,7 @@ EXCLUSIVE_REGRESSION_TEST(cache)(RegressionTest *t, int /* atype ATS_UNUSED */,
            {
              cacheProcessor.open_write(this, &key, false, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_OVERWRITE_SYNC);
            } int open_write_callout() {
-             CacheTestHeader *h = 0;
+             CacheTestHeader *h = nullptr;
              int hlen           = 0;
              if (cache_vc->get_header((void **)&h, &hlen) < 0)
                return -1;
@@ -371,7 +371,7 @@ EXCLUSIVE_REGRESSION_TEST(cache)(RegressionTest *t, int /* atype ATS_UNUSED */,
   replace_test.content_salt         = 1;
 
   CACHE_SM(t, replace_read_test, { cacheProcessor.open_read(this, &key, false); } int open_read_callout() {
-    CacheTestHeader *h = 0;
+    CacheTestHeader *h = nullptr;
     int hlen           = 0;
     if (cache_vc->get_header((void **)&h, &hlen) < 0)
       return -1;
@@ -415,7 +415,7 @@ EXCLUSIVE_REGRESSION_TEST(cache)(RegressionTest *t, int /* atype ATS_UNUSED */,
       replace_read_test.clone(),
       large_write_test.clone(),
       pread_test.clone(),
-      NULL_PTR)
+      nullptr)
   ->run(pstatus);
   // clang-format on
 
@@ -460,12 +460,12 @@ REGRESSION_TEST(cache_disk_replacement_stability)(RegressionTest *t, int level,
     MD5Context().hash_immediate(vols[i].hash_id, buff, strlen(buff));
   }
 
-  hr1.vol_hash_table = 0;
+  hr1.vol_hash_table = nullptr;
   hr1.vols           = vol_ptrs;
   hr1.num_vols       = MAX_VOLS;
   build_vol_hash_table(&hr1);
 
-  hr2.vol_hash_table = 0;
+  hr2.vol_hash_table = nullptr;
   hr2.vols           = vol_ptrs;
   hr2.num_vols       = MAX_VOLS;
 
@@ -495,8 +495,8 @@ REGRESSION_TEST(cache_disk_replacement_stability)(RegressionTest *t, int level,
           to + from, VOL_HASH_TABLE_SIZE, to, from, then, now, now - then, to - from);
   *pstatus = REGRESSION_TEST_PASSED;
 
-  hr1.vols = 0;
-  hr2.vols = 0;
+  hr1.vols = nullptr;
+  hr2.vols = nullptr;
 }
 
 static double zipf_alpha        = 1.2;
@@ -504,7 +504,7 @@ static int64_t zipf_bucket_size = 1;
 
 #define ZIPF_SIZE (1 << 20)
 
-static double *zipf_table = NULL;
+static double *zipf_table = nullptr;
 
 static void
 build_zipf()
diff --git a/iocore/cache/CacheVol.cc b/iocore/cache/CacheVol.cc
index ea923304633..b53f412b6ad 100644
--- a/iocore/cache/CacheVol.cc
+++ b/iocore/cache/CacheVol.cc
@@ -31,12 +31,12 @@ Cache::scan(Continuation *cont, const char *hostname, int host_len, int KB_per_s
 {
   Debug("cache_scan_truss", "inside scan");
   if (!CacheProcessor::IsCacheReady(CACHE_FRAG_TYPE_HTTP)) {
-    cont->handleEvent(CACHE_EVENT_SCAN_FAILED, 0);
+    cont->handleEvent(CACHE_EVENT_SCAN_FAILED, nullptr);
     return ACTION_RESULT_DONE;
   }
 
   CacheVC *c = new_CacheVC(cont);
-  c->vol     = NULL;
+  c->vol     = nullptr;
   /* do we need to make a copy */
   c->hostname        = const_cast(hostname);
   c->host_len        = host_len;
@@ -81,7 +81,7 @@ CacheVC::scanVol(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
   eventProcessor.schedule_in(this, HRTIME_MSECONDS(scan_msec_delay));
   return EVENT_CONT;
 Ldone:
-  _action.continuation->handleEvent(CACHE_EVENT_SCAN_DONE, NULL);
+  _action.continuation->handleEvent(CACHE_EVENT_SCAN_DONE, nullptr);
   return free_CacheVC(this);
 }
 
@@ -154,8 +154,8 @@ CacheVC::scanObject(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
 {
   Debug("cache_scan_truss", "inside %p:scanObject", this);
 
-  Doc *doc     = NULL;
-  void *result = NULL;
+  Doc *doc     = nullptr;
+  void *result = nullptr;
 #ifdef HTTP_CACHE
   int hlen = 0;
   char hname[500];
@@ -222,7 +222,7 @@ CacheVC::scanObject(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
     if (doc->doc_type != CACHE_FRAG_TYPE_HTTP || !doc->hlen)
       goto Lskip;
 
-    last_collision = NULL;
+    last_collision = nullptr;
     while (1) {
       if (!dir_probe(&doc->first_key, vol, &dir, &last_collision))
         goto Lskip;
@@ -265,7 +265,7 @@ CacheVC::scanObject(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
       alternate_index = i;
       // verify that the earliest block exists, reducing 'false hit' callbacks
       if (!(key == doc->key)) {
-        last_collision = NULL;
+        last_collision = nullptr;
         if (!dir_probe(&key, vol, &earliest_dir, &last_collision))
           continue;
       }
@@ -316,7 +316,7 @@ CacheVC::scanObject(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
         earliest_key      = zero_key;
         writer_lock_retry = 0;
         SET_HANDLER(&CacheVC::scanOpenWrite);
-        return scanOpenWrite(EVENT_NONE, 0);
+        return scanOpenWrite(EVENT_NONE, nullptr);
       }
     }
     continue;
@@ -381,7 +381,7 @@ CacheVC::scanRemoveDone(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
   alternate.destroy();
 #endif
   SET_HANDLER(&CacheVC::scanObject);
-  return handleEvent(EVENT_IMMEDIATE, 0);
+  return handleEvent(EVENT_IMMEDIATE, nullptr);
 }
 
 int
@@ -391,7 +391,7 @@ CacheVC::scanOpenWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
   cancel_trigger();
   // get volume lock
   if (writer_lock_retry > SCAN_WRITER_LOCK_MAX_RETRY) {
-    int r = _action.continuation->handleEvent(CACHE_EVENT_SCAN_OPERATION_BLOCKED, 0);
+    int r = _action.continuation->handleEvent(CACHE_EVENT_SCAN_OPERATION_BLOCKED, nullptr);
     Debug("cache_scan", "still havent got the writer lock, asking user..");
     switch (r) {
     case CACHE_SCAN_RESULT_RETRY:
@@ -399,7 +399,7 @@ CacheVC::scanOpenWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
       break;
     case CACHE_SCAN_RESULT_CONTINUE:
       SET_HANDLER(&CacheVC::scanObject);
-      return scanObject(EVENT_IMMEDIATE, 0);
+      return scanObject(EVENT_IMMEDIATE, nullptr);
     }
   }
   int ret = 0;
@@ -429,7 +429,7 @@ CacheVC::scanOpenWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
     // check that the directory entry was not overwritten
     // if so return failure
     Debug("cache_scan", "got writer lock");
-    Dir *l = NULL;
+    Dir *l = nullptr;
     Dir d;
     Doc *doc = (Doc *)(buf->data() + offset);
     offset   = (char *)doc - buf->data() + vol->round_to_approx_size(doc->len);
@@ -447,9 +447,9 @@ CacheVC::scanOpenWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
     while (1) {
       if (!dir_probe(&first_key, vol, &d, &l)) {
         vol->close_write(this);
-        _action.continuation->handleEvent(CACHE_EVENT_SCAN_OPERATION_FAILED, 0);
+        _action.continuation->handleEvent(CACHE_EVENT_SCAN_OPERATION_FAILED, nullptr);
         SET_HANDLER(&CacheVC::scanObject);
-        return handleEvent(EVENT_IMMEDIATE, 0);
+        return handleEvent(EVENT_IMMEDIATE, nullptr);
       }
       if (memcmp(&dir, &d, SIZEOF_DIR)) {
         Debug("cache_scan", "dir entry has changed");
@@ -467,7 +467,7 @@ CacheVC::scanOpenWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
     ret = do_write_call();
   }
   if (ret == EVENT_RETURN)
-    return handleEvent(AIO_EVENT_DONE, 0);
+    return handleEvent(AIO_EVENT_DONE, nullptr);
   return ret;
 }
 
@@ -488,7 +488,7 @@ CacheVC::scanUpdateDone(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
     ink_assert(this->od);
     vol->close_write(this);
     SET_HANDLER(&CacheVC::scanObject);
-    return handleEvent(EVENT_IMMEDIATE, 0);
+    return handleEvent(EVENT_IMMEDIATE, nullptr);
   } else {
     mutex->thread_holding->schedule_in_local(this, HRTIME_MSECONDS(cache_config_mutex_retry_delay));
     return EVENT_CONT;
diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc
index 7cd3cff693d..5a4cbeef698 100644
--- a/iocore/cache/CacheWrite.cc
+++ b/iocore/cache/CacheWrite.cc
@@ -85,7 +85,7 @@ CacheVC::updateVector(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
         // deleted it. Just close this writer
         if (alternate_index != CACHE_ALT_REMOVED || !write_vector->count()) {
           SET_HANDLER(&CacheVC::openWriteCloseDir);
-          return openWriteCloseDir(EVENT_IMMEDIATE, 0);
+          return openWriteCloseDir(EVENT_IMMEDIATE, nullptr);
         }
       }
       if (update_key == od->single_doc_key && (total_len || !vec))
@@ -136,7 +136,7 @@ CacheVC::updateVector(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
     ret = do_write_call();
   }
   if (ret == EVENT_RETURN)
-    return handleEvent(AIO_EVENT_DONE, 0);
+    return handleEvent(AIO_EVENT_DONE, nullptr);
   return ret;
 }
 #endif
@@ -201,7 +201,7 @@ CacheVC::handleWrite(int event, Event * /* e ATS_UNUSED */)
     io.aio_result = AIO_SOFT_FAILURE;
     if (event == EVENT_CALL)
       return EVENT_RETURN;
-    return handleEvent(AIO_EVENT_DONE, 0);
+    return handleEvent(AIO_EVENT_DONE, nullptr);
   }
   ink_assert(agg_len <= AGG_SIZE);
   if (f.evac_vector)
@@ -342,7 +342,7 @@ Vol::aggWriteDone(int event, Event *e)
   }
   set_io_not_in_progress();
   // callback ready sync CacheVCs
-  CacheVC *c = 0;
+  CacheVC *c = nullptr;
   while ((c = sync.dequeue())) {
     if (UINT_WRAP_LTE(c->write_serial + 2, header->write_serial))
       c->initial_thread->schedule_imm_signal(c, AIO_EVENT_DONE);
@@ -353,7 +353,7 @@ Vol::aggWriteDone(int event, Event *e)
   }
   if (dir_sync_waiting) {
     dir_sync_waiting = 0;
-    cacheDirSync->handleEvent(EVENT_IMMEDIATE, 0);
+    cacheDirSync->handleEvent(EVENT_IMMEDIATE, nullptr);
   }
   if (agg.head || sync.head)
     return aggWrite(event, e);
@@ -383,19 +383,19 @@ CacheVC::evacuateReadHead(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */
   cancel_trigger();
   Doc *doc = (Doc *)buf->data();
 #ifdef HTTP_CACHE
-  CacheHTTPInfo *alternate_tmp = 0;
+  CacheHTTPInfo *alternate_tmp = nullptr;
 #endif
   if (!io.ok())
     goto Ldone;
   // a directory entry which is nolonger valid may have been overwritten
   if (!dir_valid(vol, &dir)) {
-    last_collision = NULL;
+    last_collision = nullptr;
     goto Lcollision;
   }
   if (doc->magic != DOC_MAGIC || !(doc->first_key == first_key))
     goto Lcollision;
 #ifdef HTTP_CACHE
-  alternate_tmp = 0;
+  alternate_tmp = nullptr;
   if (doc->doc_type == CACHE_FRAG_TYPE_HTTP && doc->hlen) {
     // its an http document
     if (this->load_http_info(&vector, doc) != doc->hlen) {
@@ -432,7 +432,7 @@ CacheVC::evacuateReadHead(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */
   if (dir_probe(&first_key, vol, &dir, &last_collision)) {
     int ret = do_read_call(&first_key);
     if (ret == EVENT_RETURN)
-      return handleEvent(AIO_EVENT_DONE, 0);
+      return handleEvent(AIO_EVENT_DONE, nullptr);
     return ret;
   }
 Ldone:
@@ -469,7 +469,7 @@ CacheVC::evacuateDocDone(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
           break;
         if (evac->earliest_key.fold()) {
           DDebug("cache_evac", "evacdocdone: evacuating key %X earliest %X", evac->key.slice32(0), evac->earliest_key.slice32(0));
-          EvacuationBlock *eblock = 0;
+          EvacuationBlock *eblock = nullptr;
           Dir dir_tmp;
           dir_lookaside_probe(&evac->earliest_key, vol, &dir_tmp, &eblock);
           if (eblock) {
@@ -518,7 +518,7 @@ CacheVC::evacuateDocDone(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
             SET_HANDLER(&CacheVC::evacuateReadHead);
             int ret = do_read_call(&first_key);
             if (ret == EVENT_RETURN)
-              return handleEvent(AIO_EVENT_DONE, 0);
+              return handleEvent(AIO_EVENT_DONE, nullptr);
             return ret;
           }
         }
@@ -532,7 +532,7 @@ CacheVC::evacuateDocDone(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
 static int
 evacuate_fragments(CacheKey *key, CacheKey *earliest_key, int force, Vol *vol)
 {
-  Dir dir, *last_collision = 0;
+  Dir dir, *last_collision = nullptr;
   int i = 0;
   while (dir_probe(key, vol, &dir, &last_collision)) {
     // next fragment cannot be a head...if it is, it must have been a
@@ -573,7 +573,7 @@ Vol::evacuateWrite(CacheVC *evacuator, int event, Event *e)
   agg_todo_size += evacuator->agg_len;
   /* insert the evacuator after all the other evacuators */
   CacheVC *cur   = (CacheVC *)agg.head;
-  CacheVC *after = NULL;
+  CacheVC *after = nullptr;
   for (; cur && cur->f.evacuator; cur = (CacheVC *)cur->link.next)
     after = cur;
   ink_assert(evacuator->agg_len <= AGG_SIZE);
@@ -592,7 +592,7 @@ Vol::evacuateDocReadDone(int event, Event *e)
   ink_assert(mutex->thread_holding == this_ethread());
   Doc *doc = (Doc *)doc_evacuator->buf->data();
   CacheKey next_key;
-  EvacuationBlock *b = NULL;
+  EvacuationBlock *b = nullptr;
   if (doc->magic != DOC_MAGIC) {
     Debug("cache_evac", "DOC magic: %X %d", (int)dir_tag(&doc_evacuator->overwrite_dir),
           (int)dir_offset(&doc_evacuator->overwrite_dir));
@@ -662,7 +662,7 @@ Vol::evacuateDocReadDone(int event, Event *e)
   return evacuateWrite(doc_evacuator, event, e);
 Ldone:
   free_CacheVC(doc_evacuator);
-  doc_evacuator = 0;
+  doc_evacuator = nullptr;
   return aggWrite(event, e);
 }
 
@@ -676,7 +676,7 @@ Vol::evac_range(off_t low, off_t high, int evac_phase)
 
   for (int i = si; i <= ei; i++) {
     EvacuationBlock *b     = evacuate[i].head;
-    EvacuationBlock *first = 0;
+    EvacuationBlock *first = nullptr;
     int64_t first_offset   = INT64_MAX;
     for (; b; b = b->link.next) {
       int64_t offset = dir_offset(&b->dir);
@@ -717,7 +717,7 @@ agg_copy(char *p, CacheVC *vc)
 
   if (!vc->f.evacuator) {
     Doc *doc                   = (Doc *)p;
-    IOBufferBlock *res_alt_blk = 0;
+    IOBufferBlock *res_alt_blk = nullptr;
 
     uint32_t len = vc->write_len + vc->header_len + vc->frag_len + sizeofDoc;
     ink_assert(vc->frag_type != CACHE_FRAG_TYPE_HTTP || len != sizeofDoc);
@@ -968,7 +968,7 @@ Vol::aggWrite(int event, void * /* e ATS_UNUSED */)
         last = (CacheVC *)last->link.prev;
       sync.insert(c, last);
     } else if (c->f.evacuator)
-      c->handleEvent(AIO_EVENT_DONE, 0);
+      c->handleEvent(AIO_EVENT_DONE, nullptr);
     else
       tocall.enqueue(c);
     c = n;
@@ -985,7 +985,7 @@ Vol::aggWrite(int event, void * /* e ATS_UNUSED */)
       ink_assert(false);
       while ((c = agg.dequeue())) {
         agg_todo_size -= c->agg_len;
-        if (c->initial_thread != NULL)
+        if (c->initial_thread != nullptr)
           c->initial_thread->schedule_imm_signal(c, AIO_EVENT_DONE);
         else
           eventProcessor.schedule_imm_signal(c, ET_CALL, AIO_EVENT_DONE);
@@ -1047,7 +1047,7 @@ Vol::aggWrite(int event, void * /* e ATS_UNUSED */)
   while ((c = tocall.dequeue())) {
     if (event == EVENT_CALL && c->mutex->thread_holding == mutex->thread_holding)
       ret = EVENT_RETURN;
-    else if (c->initial_thread != NULL)
+    else if (c->initial_thread != nullptr)
       c->initial_thread->schedule_imm_signal(c, AIO_EVENT_DONE);
     else
       eventProcessor.schedule_imm_signal(c, ET_CALL, AIO_EVENT_DONE);
@@ -1177,7 +1177,7 @@ CacheVC::openWriteCloseHead(int event, Event *e)
 #ifdef HTTP_CACHE
   if (frag_type == CACHE_FRAG_TYPE_HTTP) {
     SET_HANDLER(&CacheVC::updateVector);
-    return updateVector(EVENT_IMMEDIATE, 0);
+    return updateVector(EVENT_IMMEDIATE, nullptr);
   } else {
 #endif
     header_len = header_to_write_len;
@@ -1232,7 +1232,7 @@ CacheVC::openWriteCloseDataDone(int event, Event *e)
     return openWriteCloseHead(event, e); // must be called under vol lock from here
   }
 Lcallreturn:
-  return handleEvent(AIO_EVENT_DONE, 0);
+  return handleEvent(AIO_EVENT_DONE, nullptr);
 }
 
 int
@@ -1392,7 +1392,7 @@ CacheVC::openWriteMain(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
   if (towrite == ntodo && f.close_complete) {
     closed = 1;
     SET_HANDLER(&CacheVC::openWriteClose);
-    return openWriteClose(EVENT_NONE, NULL);
+    return openWriteClose(EVENT_NONE, nullptr);
   }
   SET_HANDLER(&CacheVC::openWriteWriteDone);
   return do_write_lock_call();
@@ -1405,9 +1405,9 @@ CacheVC::openWriteOverwrite(int event, Event *e)
   cancel_trigger();
   if (event != AIO_EVENT_DONE) {
     if (event == EVENT_IMMEDIATE)
-      last_collision = 0;
+      last_collision = nullptr;
   } else {
-    Doc *doc = NULL;
+    Doc *doc = nullptr;
     set_io_not_in_progress();
     if (_action.cancelled)
       return openWriteCloseDir(event, e);
@@ -1435,7 +1435,7 @@ Lcollision : {
   SET_HANDLER(&CacheVC::openWriteMain);
   return callcont(CACHE_EVENT_OPEN_WRITE);
 Lcallreturn:
-  return handleEvent(AIO_EVENT_DONE, 0); // hopefully a tail call
+  return handleEvent(AIO_EVENT_DONE, nullptr); // hopefully a tail call
 }
 
 #ifdef HTTP_CACHE
@@ -1469,12 +1469,12 @@ CacheVC::openWriteStartDone(int event, Event *e)
       /* INKqa07123.
          A directory entry which is no longer valid may have been overwritten.
          We need to start afresh from the beginning by setting last_collision
-         to NULL.
+         to nullptr.
        */
       if (!dir_valid(vol, &dir)) {
         DDebug("cache_write", "OpenReadStartDone: Dir not valid: Write Head: %" PRId64 ", Dir: %" PRId64,
                (int64_t)offset_to_vol_offset(vol, vol->header->write_pos), dir_offset(&dir));
-        last_collision = NULL;
+        last_collision = nullptr;
         goto Lcollision;
       }
       if (!(doc->first_key == first_key))
@@ -1539,7 +1539,7 @@ CacheVC::openWriteStartDone(int event, Event *e)
   } else
     return free_CacheVC(this);
 Lcallreturn:
-  return handleEvent(AIO_EVENT_DONE, 0); // hopefully a tail call
+  return handleEvent(AIO_EVENT_DONE, nullptr); // hopefully a tail call
 }
 #endif
 
@@ -1561,7 +1561,7 @@ CacheVC::openWriteStartBegin(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED
     VC_SCHED_LOCK_RETRY();
   if (f.overwrite) {
     SET_HANDLER(&CacheVC::openWriteOverwrite);
-    return openWriteOverwrite(EVENT_IMMEDIATE, 0);
+    return openWriteOverwrite(EVENT_IMMEDIATE, nullptr);
   } else {
     // write by key
     SET_HANDLER(&CacheVC::openWriteMain);
@@ -1604,7 +1604,7 @@ Cache::open_write(Continuation *cont, const CacheKey *key, CacheFragType frag_ty
   } while (DIR_MASK_TAG(c->key.slice32(2)) == DIR_MASK_TAG(c->first_key.slice32(2)));
   c->earliest_key = c->key;
 #ifdef HTTP_CACHE
-  c->info = 0;
+  c->info = nullptr;
 #endif
   c->f.overwrite      = (options & CACHE_WRITE_OPT_OVERWRITE) != 0;
   c->f.close_complete = (options & CACHE_WRITE_OPT_CLOSE_COMPLETE) != 0;
@@ -1629,7 +1629,7 @@ Cache::open_write(Continuation *cont, const CacheKey *key, CacheFragType frag_ty
     return ACTION_RESULT_DONE;
   } else {
     SET_CONTINUATION_HANDLER(c, &CacheVC::openWriteOverwrite);
-    if (c->openWriteOverwrite(EVENT_IMMEDIATE, 0) == EVENT_DONE)
+    if (c->openWriteOverwrite(EVENT_IMMEDIATE, nullptr) == EVENT_DONE)
       return ACTION_RESULT_DONE;
     else
       return &c->_action;
@@ -1758,14 +1758,14 @@ Cache::open_write(Continuation *cont, const CacheKey *key, CacheHTTPInfo *info,
   CACHE_INCREMENT_DYN_STAT(c->base_stat + CACHE_STAT_FAILURE);
   cont->handleEvent(CACHE_EVENT_OPEN_WRITE_FAILED, (void *)-err);
   if (c->od) {
-    c->openWriteCloseDir(EVENT_IMMEDIATE, 0);
+    c->openWriteCloseDir(EVENT_IMMEDIATE, nullptr);
     return ACTION_RESULT_DONE;
   }
   free_CacheVC(c);
   return ACTION_RESULT_DONE;
 
 Lcallreturn:
-  if (c->handleEvent(AIO_EVENT_DONE, 0) == EVENT_DONE)
+  if (c->handleEvent(AIO_EVENT_DONE, nullptr) == EVENT_DONE)
     return ACTION_RESULT_DONE;
   return &c->_action;
 }
diff --git a/iocore/cache/I_Cache.h b/iocore/cache/I_Cache.h
index 94f76307a92..cbe541b14ae 100644
--- a/iocore/cache/I_Cache.h
+++ b/iocore/cache/I_Cache.h
@@ -119,7 +119,7 @@ struct CacheProcessor : public Processor {
 
   /** Find the storage for a @a path.
       If @a len is 0 then @a path is presumed null terminated.
-      @return @c NULL if the path does not match any defined storage.
+      @return @c nullptr if the path does not match any defined storage.
    */
   CacheDisk *find_by_path(const char *path, int len = 0);
 
diff --git a/iocore/cache/I_Store.h b/iocore/cache/I_Store.h
index 3a9a8aea20d..de6ceb75558 100644
--- a/iocore/cache/I_Store.h
+++ b/iocore/cache/I_Store.h
@@ -176,7 +176,7 @@ struct Span {
       pathname = ats_strdup(that.pathname);
     if (that.hash_base_string)
       hash_base_string = ats_strdup(that.hash_base_string);
-    link.next          = NULL;
+    link.next          = nullptr;
   }
 
   ~Span();
@@ -201,11 +201,11 @@ struct Store {
     alloc(s, blocks, true, mmapable);
     if (s.n_disks) {
       Span *t   = s.disk[0];
-      s.disk[0] = NULL;
+      s.disk[0] = nullptr;
       return t;
     }
 
-    return NULL;
+    return nullptr;
   }
   // try to allocate, return (s == gotten, diff == not gotten)
   void try_realloc(Store &s, Store &diff);
@@ -223,7 +223,7 @@ struct Store {
     if (i > n_disks) {
       disk = (Span **)ats_realloc(disk, i * sizeof(Span *));
       for (unsigned j = n_disks; j < i; j++) {
-        disk[j] = NULL;
+        disk[j] = nullptr;
       }
       n_disks = i;
     }
@@ -259,7 +259,7 @@ struct Store {
   unsigned n_disks;
   Span **disk;
   //
-  // returns NULL on success
+  // returns nullptr on success
   // if fd >= 0 then on failure it returns an error string
   //            otherwise on failure it returns (char *)-1
   //
diff --git a/iocore/cache/P_CacheArray.h b/iocore/cache/P_CacheArray.h
index 9a7c7dda2cc..705ea171e82 100644
--- a/iocore/cache/P_CacheArray.h
+++ b/iocore/cache/P_CacheArray.h
@@ -55,7 +55,7 @@ template  struct CacheArray {
 template 
 TS_INLINE
 CacheArray::CacheArray(const T *val, int initial_size)
-  : data(NULL), default_val(val), size(0), pos(-1)
+  : data(nullptr), default_val(val), size(0), pos(-1)
 {
   if (initial_size > 0) {
     int i = 1;
@@ -125,7 +125,7 @@ CacheArray::detach()
   T *d;
 
   d    = data;
-  data = NULL;
+  data = nullptr;
 
   return d;
 }
@@ -145,7 +145,7 @@ CacheArray::clear()
     if (data != fast_data) {
       delete[] data;
     }
-    data = NULL;
+    data = nullptr;
   }
 
   size = 0;
diff --git a/iocore/cache/P_CacheDisk.h b/iocore/cache/P_CacheDisk.h
index 8d631e8e6fe..b2a0909540b 100644
--- a/iocore/cache/P_CacheDisk.h
+++ b/iocore/cache/P_CacheDisk.h
@@ -58,7 +58,7 @@ struct DiskVolBlockQueue {
   int new_block; /* whether an existing vol or a new one */
   LINK(DiskVolBlockQueue, link);
 
-  DiskVolBlockQueue() : b(NULL), new_block(0) {}
+  DiskVolBlockQueue() : b(nullptr), new_block(0) {}
 };
 
 struct DiskVol {
@@ -105,8 +105,8 @@ struct CacheDisk : public Continuation {
 
   CacheDisk()
     : Continuation(new_ProxyMutex()),
-      header(NULL),
-      path(NULL),
+      header(nullptr),
+      path(nullptr),
       header_len(0),
       len(0),
       start(0),
@@ -115,8 +115,8 @@ struct CacheDisk : public Continuation {
       fd(-1),
       free_space(0),
       wasted_space(0),
-      disk_vols(NULL),
-      free_blocks(NULL),
+      disk_vols(nullptr),
+      free_blocks(nullptr),
       num_errors(0),
       cleared(0),
       read_only_p(false),
diff --git a/iocore/cache/P_CacheHosting.h b/iocore/cache/P_CacheHosting.h
index fca667d55f8..075c50df1e9 100644
--- a/iocore/cache/P_CacheHosting.h
+++ b/iocore/cache/P_CacheHosting.h
@@ -56,12 +56,12 @@ struct CacheHostRecord {
 
   CacheHostRecord()
     : type(CACHE_NONE_TYPE),
-      vols(NULL),
+      vols(nullptr),
       good_num_vols(0),
       num_vols(0),
       num_initialized(0),
       vol_hash_table(0),
-      cp(NULL),
+      cp(nullptr),
       num_cachevols(0)
   {
   }
@@ -72,7 +72,7 @@ void build_vol_hash_table(CacheHostRecord *cp);
 struct CacheHostResult {
   CacheHostRecord *record;
 
-  CacheHostResult() : record(NULL) {}
+  CacheHostResult() : record(nullptr) {}
 };
 
 class CacheHostMatcher
@@ -157,7 +157,7 @@ struct CacheHostTableConfig;
 typedef int (CacheHostTableConfig::*CacheHostTabHandler)(int, void *);
 struct CacheHostTableConfig : public Continuation {
   CacheHostTable **ppt;
-  CacheHostTableConfig(CacheHostTable **appt) : Continuation(NULL), ppt(appt)
+  CacheHostTableConfig(CacheHostTable **appt) : Continuation(nullptr), ppt(appt)
   {
     SET_HANDLER((CacheHostTabHandler)&CacheHostTableConfig::mainEvent);
   }
diff --git a/iocore/cache/P_CacheHttp.h b/iocore/cache/P_CacheHttp.h
index 2b2e78e813a..1958c74f343 100644
--- a/iocore/cache/P_CacheHttp.h
+++ b/iocore/cache/P_CacheHttp.h
@@ -76,7 +76,7 @@ struct CacheHTTPInfoVector {
 
   int marshal_length();
   int marshal(char *buf, int length);
-  uint32_t get_handles(const char *buf, int length, RefCountObj *block_ptr = NULL);
+  uint32_t get_handles(const char *buf, int length, RefCountObj *block_ptr = nullptr);
   int unmarshal(const char *buf, int length, RefCountObj *block_ptr);
 
   CacheArray data;
diff --git a/iocore/cache/P_CacheInternal.h b/iocore/cache/P_CacheInternal.h
index ec506b062f2..ce7e2ed488b 100644
--- a/iocore/cache/P_CacheInternal.h
+++ b/iocore/cache/P_CacheInternal.h
@@ -367,13 +367,13 @@ struct CacheVC : public CacheVConnection {
   virtual void get_http_info(CacheHTTPInfo **info);
   /** Get the fragment table.
       @return The address of the start of the fragment table,
-      or @c NULL if there is no fragment table.
+      or @c nullptr if there is no fragment table.
   */
   virtual HTTPInfo::FragOffset *get_frag_table();
   /** Load alt pointers and do fixups if needed.
       @return Length of header data used for alternates.
    */
-  virtual uint32_t load_http_info(CacheHTTPInfoVector *info, struct Doc *doc, RefCountObj *block_ptr = NULL);
+  virtual uint32_t load_http_info(CacheHTTPInfoVector *info, struct Doc *doc, RefCountObj *block_ptr = nullptr);
 #endif
   virtual bool is_pread_capable();
   virtual bool set_pin_in_cache(time_t time_pin);
@@ -524,7 +524,7 @@ struct CacheVC : public CacheVConnection {
 struct CacheRemoveCont : public Continuation {
   int event_handler(int event, void *data);
 
-  CacheRemoveCont() : Continuation(NULL) {}
+  CacheRemoveCont() : Continuation(nullptr) {}
 };
 
 // Global Data
@@ -549,10 +549,10 @@ new_CacheVC(Continuation *cont)
   c->vector.data.data = &c->vector.data.fast_data[0];
 #endif
   c->_action        = cont;
-  c->initial_thread = t->tt == DEDICATED ? NULL : t;
+  c->initial_thread = t->tt == DEDICATED ? nullptr : t;
   c->mutex          = cont->mutex;
   c->start_time     = Thread::get_hrtime();
-  ink_assert(c->trigger == NULL);
+  ink_assert(c->trigger == nullptr);
   Debug("cache_new", "new %p", c);
 #ifdef CACHE_STAT_PAGES
   ink_assert(!c->stat_link.next);
@@ -579,11 +579,11 @@ free_CacheVC(CacheVC *cont)
     cont->trigger->cancel();
   ink_assert(!cont->is_io_in_progress());
   ink_assert(!cont->od);
-  /* calling cont->io.action = NULL causes compile problem on 2.6 solaris
+  /* calling cont->io.action = nullptr causes compile problem on 2.6 solaris
      release build....wierd??? For now, null out continuation and mutex
      of the action separately */
-  cont->io.action.continuation = NULL;
-  cont->io.action.mutex        = NULL;
+  cont->io.action.continuation = nullptr;
+  cont->io.action.mutex        = nullptr;
   cont->io.mutex.clear();
   cont->io.aio_result        = 0;
   cont->io.aiocb.aio_nbytes  = 0;
@@ -671,7 +671,7 @@ CacheVC::cancel_trigger()
 {
   if (trigger) {
     trigger->cancel_action();
-    trigger = NULL;
+    trigger = nullptr;
   }
 }
 
@@ -687,7 +687,7 @@ CacheVC::die()
     if (!is_io_in_progress()) {
       SET_HANDLER(&CacheVC::openWriteClose);
       if (!recursive)
-        openWriteClose(EVENT_NONE, NULL);
+        openWriteClose(EVENT_NONE, nullptr);
     } // else catch it at the end of openWriteWriteDone
     return EVENT_CONT;
   } else {
@@ -696,7 +696,7 @@ CacheVC::die()
     else {
       SET_HANDLER(&CacheVC::openReadClose);
       if (!recursive)
-        openReadClose(EVENT_NONE, NULL);
+        openReadClose(EVENT_NONE, nullptr);
     }
     return EVENT_CONT;
   }
@@ -741,7 +741,7 @@ CacheVC::writer_done()
   OpenDirEntry *cod = od;
   if (!cod)
     cod      = vol->open_read(&first_key);
-  CacheVC *w = (cod) ? cod->writers.head : NULL;
+  CacheVC *w = (cod) ? cod->writers.head : nullptr;
   // If the write vc started after the reader, then its not the
   // original writer, since we never choose a writer that started
   // after the reader. The original writer was deallocated and then
@@ -816,7 +816,7 @@ Vol::open_read_lock(INK_MD5 *key, EThread *t)
 {
   CACHE_TRY_LOCK(lock, mutex, t);
   if (!lock.is_locked())
-    return NULL;
+    return nullptr;
   return open_dir.open_read(key);
 }
 
@@ -928,7 +928,7 @@ new_CacheRemoveCont()
 TS_INLINE void
 free_CacheRemoveCont(CacheRemoveCont *cache_rm)
 {
-  cache_rm->mutex = NULL;
+  cache_rm->mutex = nullptr;
   cacheRemoveContAllocator.free(cache_rm);
 }
 
@@ -981,7 +981,7 @@ struct Cache {
   Action *open_read(Continuation *cont, const CacheKey *key, CacheHTTPHdr *request, CacheLookupHttpConfig *params,
                     CacheFragType type, const char *hostname, int host_len);
   Action *open_write(Continuation *cont, const CacheKey *key, CacheHTTPInfo *old_info, time_t pin_in_cache = (time_t)0,
-                     const CacheKey *key1 = NULL, CacheFragType type = CACHE_FRAG_TYPE_HTTP, const char *hostname = 0,
+                     const CacheKey *key1 = nullptr, CacheFragType type = CACHE_FRAG_TYPE_HTTP, const char *hostname = 0,
                      int host_len = 0);
   static void generate_key(INK_MD5 *md5, CacheURL *url);
   static void generate_key(HttpCacheKey *md5, CacheURL *url, cache_generation_t generation = -1);
@@ -1003,7 +1003,7 @@ struct Cache {
       total_nvol(0),
       ready(CACHE_INITIALIZING),
       cache_size(0), // in store block size
-      hosttable(NULL),
+      hosttable(nullptr),
       total_initialized_vol(0),
       scheme(CACHE_NONE_TYPE)
   {
diff --git a/iocore/cache/P_CacheTest.h b/iocore/cache/P_CacheTest.h
index b1dddc583fd..9e291e868f3 100644
--- a/iocore/cache/P_CacheTest.h
+++ b/iocore/cache/P_CacheTest.h
@@ -54,7 +54,7 @@ struct CacheTestHost {
   double xprev_host_prob;
   double xnext_host_prob;
 
-  CacheTestHost() : name(NULL), xlast_cachable_id(0), xprev_host_prob(0), xnext_host_prob(0) {}
+  CacheTestHost() : name(nullptr), xlast_cachable_id(0), xprev_host_prob(0), xnext_host_prob(0) {}
 };
 
 struct CacheTestHeader {
diff --git a/iocore/cache/P_CacheVol.h b/iocore/cache/P_CacheVol.h
index c9d24863761..77cf8327dcf 100644
--- a/iocore/cache/P_CacheVol.h
+++ b/iocore/cache/P_CacheVol.h
@@ -247,7 +247,7 @@ struct Vol : public Continuation {
 
   Vol()
     : Continuation(new_ProxyMutex()),
-      path(NULL),
+      path(nullptr),
       fd(-1),
       dir(0),
       buckets(0),
@@ -263,7 +263,7 @@ struct Vol : public Continuation {
       agg_buf_pos(0),
       trigger(0),
       evacuate_size(0),
-      disk(NULL),
+      disk(nullptr),
       last_sync_serial(0),
       last_write_serial(0),
       recover_wrapped(false),
@@ -297,7 +297,7 @@ struct CacheVol {
   // per volume stats
   RecRawStatBlock *vol_rsb;
 
-  CacheVol() : vol_number(-1), scheme(0), size(0), num_vols(0), vols(NULL), disk_vols(0), vol_rsb(0) {}
+  CacheVol() : vol_number(-1), scheme(0), size(0), num_vols(0), vols(nullptr), disk_vols(0), vol_rsb(0) {}
 };
 
 // Note : hdr() needs to be 8 byte aligned.
@@ -466,7 +466,7 @@ Vol::cancel_trigger()
 {
   if (trigger) {
     trigger->cancel_action();
-    trigger = NULL;
+    trigger = nullptr;
   }
 }
 
diff --git a/iocore/cache/RamCacheCLFUS.cc b/iocore/cache/RamCacheCLFUS.cc
index 66d83a02e9b..1f1d7b02cd7 100644
--- a/iocore/cache/RamCacheCLFUS.cc
+++ b/iocore/cache/RamCacheCLFUS.cc
@@ -105,15 +105,15 @@ struct RamCacheCLFUS : public RamCache {
     : max_bytes(0),
       bytes(0),
       objects(0),
-      vol(0),
+      vol(nullptr),
       average_value(0),
       history(0),
       ibuckets(0),
       nbuckets(0),
-      bucket(0),
-      seen(0),
+      bucket(nullptr),
+      seen(nullptr),
       ncompressed(0),
-      compressed(0)
+      compressed(nullptr)
   {
   }
 };
@@ -185,7 +185,7 @@ RamCacheCLFUS::resize_hashtable()
   memset(new_bucket, 0, s);
   if (bucket) {
     for (int64_t i = 0; i < nbuckets; i++) {
-      RamCacheCLFUSEntry *e = 0;
+      RamCacheCLFUSEntry *e = nullptr;
       while ((e = bucket[i].pop()))
         new_bucket[e->key.slice32(3) % anbuckets].push(e);
     }
@@ -204,7 +204,7 @@ RamCacheCLFUS::resize_hashtable()
 void
 RamCacheCLFUS::init(int64_t abytes, Vol *avol)
 {
-  ink_assert(avol != 0);
+  ink_assert(avol != nullptr);
   vol       = avol;
   max_bytes = abytes;
   DDebug("ram_cache", "initializing ram_cache %" PRId64 " bytes", abytes);
@@ -247,7 +247,7 @@ RamCacheCLFUS::get(INK_MD5 *key, Ptr *ret_data, uint32_t auxkey1,
     return 0;
   int64_t i             = key->slice32(3) % nbuckets;
   RamCacheCLFUSEntry *e = bucket[i].head;
-  char *b               = 0;
+  char *b               = nullptr;
   while (e) {
     if (e->key == *key && e->auxkey1 == auxkey1 && e->auxkey2 == auxkey2) {
       move_compressed(e);
@@ -283,7 +283,7 @@ RamCacheCLFUS::get(INK_MD5 *key, Ptr *ret_data, uint32_t auxkey1,
           case CACHE_COMPRESSION_LIBLZMA: {
             size_t l = (size_t)e->len, ipos = 0, opos = 0;
             uint64_t memlimit = e->len * 2 + LZMA_BASE_MEMLIMIT;
-            if (LZMA_OK != lzma_stream_buffer_decode(&memlimit, 0, NULL, (uint8_t *)e->data->data(), &ipos, e->compressed_len,
+            if (LZMA_OK != lzma_stream_buffer_decode(&memlimit, 0, nullptr, (uint8_t *)e->data->data(), &ipos, e->compressed_len,
                                                      (uint8_t *)b, &opos, l))
               goto Lfailed;
             ram_hit_state = RAM_HIT_COMPRESS_LIBLZMA;
@@ -350,7 +350,7 @@ RamCacheCLFUS::tick()
     return;
   e = lru[1].dequeue();
 Lfree:
-  if (!e) // e may be NULL after e= lru[1].dequeue()
+  if (!e) // e may be nullptr after e= lru[1].dequeue()
     return;
   e->flag_bits.lru = 0;
   history--;
@@ -365,7 +365,7 @@ RamCacheCLFUS::victimize(RamCacheCLFUSEntry *e)
 {
   objects--;
   DDebug("ram_cache", "put %X %d %d size %d VICTIMIZED", e->key.slice32(3), e->auxkey1, e->auxkey2, e->size);
-  e->data          = NULL;
+  e->data          = nullptr;
   e->flag_bits.lru = 1;
   lru[1].enqueue(e);
   history++;
@@ -394,7 +394,7 @@ RamCacheCLFUS::destroy(RamCacheCLFUSEntry *e)
     objects--;
     bytes -= e->size + ENTRY_OVERHEAD;
     CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat, -(int64_t)e->size);
-    e->data = NULL;
+    e->data = nullptr;
   } else
     history--;
   uint32_t b = e->key.slice32(3) % nbuckets;
@@ -409,7 +409,7 @@ RamCacheCLFUS::compress_entries(EThread *thread, int do_at_most)
 {
   if (!cache_config_ram_cache_compress)
     return;
-  ink_assert(vol != 0);
+  ink_assert(vol != nullptr);
   MUTEX_TAKE_LOCK(vol->mutex, thread);
   if (!compressed) {
     compressed  = lru[0].head;
@@ -417,7 +417,7 @@ RamCacheCLFUS::compress_entries(EThread *thread, int do_at_most)
   }
   float target = (cache_config_ram_cache_compress_percent / 100.0) * objects;
   int n        = 0;
-  char *b = 0, *bb = 0;
+  char *b = nullptr, *bb = nullptr;
   while (compressed && target > ncompressed) {
     RamCacheCLFUSEntry *e = compressed;
     if (e->flag_bits.incompressible || e->flag_bits.compressed)
@@ -474,7 +474,7 @@ RamCacheCLFUS::compress_entries(EThread *thread, int do_at_most)
 #if TS_HAS_LZMA
       case CACHE_COMPRESSION_LIBLZMA: {
         size_t pos = 0, ll = l;
-        if (LZMA_OK != lzma_easy_buffer_encode(LZMA_PRESET_DEFAULT, LZMA_CHECK_NONE, NULL, (uint8_t *)edata->data(), elen,
+        if (LZMA_OK != lzma_easy_buffer_encode(LZMA_PRESET_DEFAULT, LZMA_CHECK_NONE, nullptr, (uint8_t *)edata->data(), elen,
                                                (uint8_t *)b, &pos, ll))
           failed = true;
         l        = (int)pos;
@@ -546,7 +546,7 @@ RamCacheCLFUS::compress_entries(EThread *thread, int do_at_most)
 
 void RamCacheCLFUS::requeue_victims(Que(RamCacheCLFUSEntry, lru_link) & victims)
 {
-  RamCacheCLFUSEntry *victim = 0;
+  RamCacheCLFUSEntry *victim = nullptr;
   while ((victim = victims.dequeue())) {
     bytes += victim->size + ENTRY_OVERHEAD;
     CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat, victim->size);
@@ -608,7 +608,7 @@ RamCacheCLFUS::put(INK_MD5 *key, IOBufferData *data, uint32_t len, bool copy, ui
     }
   }
   Que(RamCacheCLFUSEntry, lru_link) victims;
-  RamCacheCLFUSEntry *victim = 0;
+  RamCacheCLFUSEntry *victim = nullptr;
   int requeue_limit          = REQUEUE_LIMIT;
   if (!lru[1].head) // initial fill
     if (bytes + size <= max_bytes)
@@ -643,7 +643,7 @@ RamCacheCLFUS::put(INK_MD5 *key, IOBufferData *data, uint32_t len, bool copy, ui
     CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat, -(int64_t)victim->size);
     victims.enqueue(victim);
     if (victim == compressed)
-      compressed = 0;
+      compressed = nullptr;
     else
       ncompressed--;
     victim_value += CACHE_VALUE(victim);
diff --git a/iocore/cache/RamCacheLRU.cc b/iocore/cache/RamCacheLRU.cc
index 2a44512f6bd..74c83c112c2 100644
--- a/iocore/cache/RamCacheLRU.cc
+++ b/iocore/cache/RamCacheLRU.cc
@@ -58,7 +58,7 @@ struct RamCacheLRU : public RamCache {
   void resize_hashtable();
   RamCacheLRUEntry *remove(RamCacheLRUEntry *e);
 
-  RamCacheLRU() : bytes(0), objects(0), seen(0), bucket(0), nbuckets(0), ibuckets(0), vol(NULL) {}
+  RamCacheLRU() : bytes(0), objects(0), seen(nullptr), bucket(nullptr), nbuckets(0), ibuckets(0), vol(nullptr) {}
 };
 
 int64_t
@@ -90,7 +90,7 @@ RamCacheLRU::resize_hashtable()
   memset(new_bucket, 0, s);
   if (bucket) {
     for (int64_t i = 0; i < nbuckets; i++) {
-      RamCacheLRUEntry *e = 0;
+      RamCacheLRUEntry *e = nullptr;
       while ((e = bucket[i].pop()))
         new_bucket[e->key.slice32(3) % anbuckets].push(e);
     }
@@ -150,7 +150,7 @@ RamCacheLRU::remove(RamCacheLRUEntry *e)
   bytes -= ENTRY_OVERHEAD + e->data->block_size();
   CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat, -(ENTRY_OVERHEAD + e->data->block_size()));
   DDebug("ram_cache", "put %X %d %d FREED", e->key.slice32(3), e->auxkey1, e->auxkey2);
-  e->data = NULL;
+  e->data = nullptr;
   THREAD_FREE(e, ramCacheLRUEntryAllocator, this_thread());
   objects--;
   return ret;
diff --git a/iocore/cache/Store.cc b/iocore/cache/Store.cc
index 0d08f01f898..e922d3bdf90 100644
--- a/iocore/cache/Store.cc
+++ b/iocore/cache/Store.cc
@@ -71,7 +71,7 @@ span_file_typename(mode_t st_mode)
 }
 
 Ptr tmp_p;
-Store::Store() : n_disks_in_config(0), n_disks(0), disk(NULL)
+Store::Store() : n_disks_in_config(0), n_disks(0), disk(nullptr)
 {
 }
 
@@ -122,7 +122,7 @@ Store::sort()
   memset(vec, 0, sizeof(Span *) * n_disks);
   for (unsigned i = 0; i < n_disks; i++) {
     vec[i]  = disk[i];
-    disk[i] = NULL;
+    disk[i] = nullptr;
   }
 
   // sort by device
@@ -148,7 +148,7 @@ Store::sort()
 
   for (unsigned i = 0; i < n_disks; i++) {
   Lagain:
-    Span *prev = 0;
+    Span *prev = nullptr;
     for (Span *sd = disk[i]; sd;) {
       Span *next = sd->link.next;
       if (next &&
@@ -235,7 +235,7 @@ Span::path(char *filename, int64_t *aoffset, char *buf, int buflen)
 void
 Span::hash_base_string_set(const char *s)
 {
-  hash_base_string = s ? ats_strdup(s) : NULL;
+  hash_base_string = s ? ats_strdup(s) : nullptr;
 }
 
 void
@@ -253,7 +253,7 @@ Store::delete_all()
   }
   n_disks = 0;
   ats_free(disk);
-  disk = NULL;
+  disk = nullptr;
 }
 
 Store::~Store()
@@ -288,7 +288,7 @@ Store::remove(char *n)
   bool found = false;
 Lagain:
   for (unsigned i = 0; i < n_disks; i++) {
-    Span *p = NULL;
+    Span *p = nullptr;
     for (Span *sd = disk[i]; sd; sd = sd->link.next) {
       if (!strcmp(n, sd->pathname)) {
         found = true;
@@ -296,7 +296,7 @@ Store::remove(char *n)
           p->link.next = sd->link.next;
         else
           disk[i]     = sd->link.next;
-        sd->link.next = NULL;
+        sd->link.next = nullptr;
         delete sd;
         goto Lagain;
       }
@@ -312,8 +312,8 @@ Store::read_config()
   int n_dsstore   = 0;
   int ln          = 0;
   int i           = 0;
-  const char *err = NULL;
-  Span *sd = NULL, *cur = NULL;
+  const char *err = nullptr;
+  Span *sd = nullptr, *cur = nullptr;
   Span *ns;
   ats_scoped_fd fd;
   ats_scoped_str storage_path(RecConfigReadConfigPath("proxy.config.cache.storage_filename", "storage.config"));
@@ -331,7 +331,7 @@ Store::read_config()
   int len;
   while ((len = ink_file_fd_readline(fd, sizeof(line), line)) > 0) {
     const char *path;
-    const char *seed = 0;
+    const char *seed = nullptr;
     // update lines
 
     ++ln;
@@ -345,7 +345,7 @@ Store::read_config()
 
     // skip comments and blank lines
     path = tokens.getNext();
-    if (0 == path || '#' == path[0])
+    if (nullptr == path || '#' == path[0])
       continue;
 
     // parse
@@ -355,7 +355,7 @@ Store::read_config()
     int64_t size   = -1;
     int volume_num = -1;
     const char *e;
-    while (0 != (e = tokens.getNext())) {
+    while (nullptr != (e = tokens.getNext())) {
       if (ParseRules::is_digit(*e)) {
         if ((size = ink_atoi64(e)) <= 0) {
           err = "error parsing size";
@@ -415,13 +415,13 @@ Store::read_config()
   cur = sd;
   while (cur) {
     Span *next     = cur->link.next;
-    cur->link.next = NULL;
+    cur->link.next = nullptr;
     disk[i++]      = cur;
     cur            = next;
   }
-  sd = 0; // these are all used.
+  sd = nullptr; // these are all used.
   sort();
-  return NULL;
+  return nullptr;
 
 Lfail:
   // Do clean up.
@@ -577,7 +577,7 @@ Span::init(const char *path, int64_t size)
   Debug("cache_init", "hw_sector_size=%d, size=%" PRId64 ", blocks=%" PRId64 ", disk_id=%" PRId64 "/%" PRId64 ", file_pathname=%d",
         this->hw_sector_size, this->size(), this->blocks, this->disk_id[0], this->disk_id[1], this->file_pathname);
 
-  return NULL;
+  return nullptr;
 
 fail:
   return Span::errorstr(serr);
@@ -598,7 +598,7 @@ static unsigned int
 try_alloc(Store &target, Span *source, unsigned int start_blocks, bool one_only = false)
 {
   unsigned int blocks = start_blocks;
-  Span *ds            = NULL;
+  Span *ds            = nullptr;
   while (source && blocks) {
     if (source->blocks) {
       unsigned int a; // allocated
@@ -665,7 +665,7 @@ void
 Store::try_realloc(Store &s, Store &diff)
 {
   for (unsigned i = 0; i < s.n_disks; i++) {
-    Span *prev = 0;
+    Span *prev = nullptr;
     for (Span *sd = s.disk[i]; sd;) {
       for (unsigned j = 0; j < n_disks; j++)
         for (Span *d = disk[j]; d; d = d->link.next)
@@ -772,7 +772,7 @@ Store::write(int fd, const char *name) const
 
   for (unsigned i = 0; i < n_disks; i++) {
     int n    = 0;
-    Span *sd = NULL;
+    Span *sd = nullptr;
     for (sd = disk[i]; sd; sd = sd->link.next) {
       n++;
     }
@@ -874,7 +874,7 @@ Store::read(int fd, char *aname)
     if (sscanf(buf, "%d\n", &n) != 1)
       return (-1);
 
-    Span *sd = NULL;
+    Span *sd = nullptr;
     while (n--) {
       Span *last = sd;
       sd         = new Span;
@@ -927,7 +927,7 @@ Store::clear(char *filename, bool clear_dirs)
       Span *d = ds->nth(j);
       if (!clear_dirs && !d->file_pathname)
         continue;
-      int r = d->path(filename, NULL, path, PATH_NAME_MAX);
+      int r = d->path(filename, nullptr, path, PATH_NAME_MAX);
       if (r < 0)
         return -1;
       int fd = ::open(path, O_RDWR | O_CREAT, 0644);
diff --git a/iocore/cluster/ClusterAPI.cc b/iocore/cluster/ClusterAPI.cc
index 97e1467d8db..8926debf68a 100644
--- a/iocore/cluster/ClusterAPI.cc
+++ b/iocore/cluster/ClusterAPI.cc
@@ -193,7 +193,7 @@ typedef int (ClusterAPIPeriodicSM::*ClusterAPIPeriodicSMHandler)(int, void *);
 class ClusterAPIPeriodicSM : public Continuation
 {
 public:
-  ClusterAPIPeriodicSM(ProxyMutex *m) : Continuation(m), _active_msmp(0)
+  ClusterAPIPeriodicSM(ProxyMutex *m) : Continuation(m), _active_msmp(nullptr)
   {
     SET_HANDLER((ClusterAPIPeriodicSMHandler)&ClusterAPIPeriodicSM::ClusterAPIPeriodicSMEvent);
   }
@@ -221,7 +221,7 @@ ClusterAPIPeriodicSM::GetNextSM()
       if (msmp) {
         while (msmp) {
           msmp_next       = (MachineStatusSM *)msmp->link.next;
-          msmp->link.next = 0;
+          msmp->link.next = nullptr;
           status_callout_q.push(msmp);
           msmp = msmp_next;
         }
@@ -260,7 +260,7 @@ ClusterAPIPeriodicSM::ClusterAPIPeriodicSMEvent(int e, void *d)
 void
 clusterAPI_init()
 {
-  MachineStatusSM *mssmp = 0;
+  MachineStatusSM *mssmp = nullptr;
   ink_atomiclist_init(&status_callout_atomic_q, "cluster API status_callout_q", (char *)&mssmp->link.next - (char *)mssmp);
   ClusterAPI_mutex = new_ProxyMutex();
   MUTEX_TRY_LOCK(lock, ClusterAPI_mutex, this_ethread());
@@ -319,8 +319,8 @@ TSDeleteClusterStatusFunction(TSClusterStatusHandle_t *h)
   Debug("cluster_api", "TSDeleteClusterStatusFunction: n %d", n);
 
   MUTEX_TAKE_LOCK(ClusterAPI_mutex, e);
-  status_callouts[n].mutex = 0;
-  status_callouts[n].func  = (TSClusterStatusFunction)0;
+  status_callouts[n].mutex = nullptr;
+  status_callouts[n].func  = (TSClusterStatusFunction) nullptr;
   status_callouts[n].state = NE_STATE_FREE;
   MUTEX_UNTAKE_LOCK(ClusterAPI_mutex, e);
 
@@ -452,7 +452,7 @@ TSDeleteClusterRPCFunction(TSClusterRPCHandle_t *rpch)
   Debug("cluster_api", "TSDeleteClusterRPCFunction: n %d", h->u.internal.cluster_function);
 
   MUTEX_TAKE_LOCK(ClusterAPI_mutex, e);
-  RPC_Functions[h->u.internal.cluster_function] = 0;
+  RPC_Functions[h->u.internal.cluster_function] = nullptr;
   MUTEX_UNTAKE_LOCK(ClusterAPI_mutex, e);
   return 0;
 }
@@ -503,7 +503,7 @@ TSAllocClusterRPCMsg(TSClusterRPCHandle_t *h, int data_size)
   ink_assert(data_size >= 4);
   if (data_size < 4) {
     /* Message must be at least 4 bytes in length */
-    return (TSClusterRPCMsg_t *)0;
+    return (TSClusterRPCMsg_t *)nullptr;
   }
 
   TSClusterRPCMsg_t *rpcm;
diff --git a/iocore/cluster/ClusterCache.cc b/iocore/cluster/ClusterCache.cc
index 2fb3ad6b05a..68abf241da0 100644
--- a/iocore/cluster/ClusterCache.cc
+++ b/iocore/cluster/ClusterCache.cc
@@ -176,7 +176,7 @@ class ClusterVConnectionCache
     INK_MD5 key;
     ClusterVConnection *vc;
 
-    Entry() : mark_for_delete(0), vc(0) {}
+    Entry() : mark_for_delete(0), vc(nullptr) {}
     ~Entry() {}
   };
 
@@ -191,7 +191,7 @@ class ClusterVConnectionCache
 
 static ClassAllocator ClusterVCCacheEntryAlloc("ClusterVConnectionCache::Entry");
 
-ClusterVConnectionCache *GlobalOpenWriteVCcache = 0;
+ClusterVConnectionCache *GlobalOpenWriteVCcache = nullptr;
 
 /////////////////////////////////////////////////////////////////
 // Perform periodic purges of ClusterVConnectionCache entries
@@ -267,7 +267,7 @@ ClusterVConnectionCache::lookup(INK_MD5 *key)
 {
   int index = MD5ToIndex(key);
   Entry *e;
-  ClusterVConnection *vc = 0;
+  ClusterVConnection *vc = nullptr;
   EThread *thread        = this_ethread();
   ProxyMutex *mutex      = thread->mutex.get();
 
@@ -361,9 +361,9 @@ Action *
 CacheContinuation::do_op(Continuation *c, ClusterMachine *mp, void *args, int user_opcode, char *data, int data_len, int nbytes,
                          MIOBuffer *b)
 {
-  CacheContinuation *cc = 0;
-  Action *act           = 0;
-  char *msg             = 0;
+  CacheContinuation *cc = nullptr;
+  Action *act           = nullptr;
+  char *msg             = nullptr;
   ClusterHandler *ch    = mp->pop_ClusterHandler();
 
   /////////////////////////////////////////////////////////////////////
@@ -437,7 +437,7 @@ CacheContinuation::do_op(Continuation *c, ClusterMachine *mp, void *args, int us
   }
   case CACHE_OPEN_WRITE:
   case CACHE_OPEN_READ: {
-    ink_release_assert(c != NULL);
+    ink_release_assert(c != nullptr);
     //////////////////////
     // Use short format //
     //////////////////////
@@ -481,7 +481,7 @@ CacheContinuation::do_op(Continuation *c, ClusterMachine *mp, void *args, int us
       // Unable to setup local VC, request aborted.
       // Remove request from pending list and deallocate.
       /////////////////////////////////////////////////////
-      cc->remove_and_delete(0, (Event *)0);
+      cc->remove_and_delete(0, (Event *)nullptr);
       return act;
 
     } else if (res != -1) {
@@ -500,7 +500,7 @@ CacheContinuation::do_op(Continuation *c, ClusterMachine *mp, void *args, int us
 
   case CACHE_OPEN_READ_LONG:
   case CACHE_OPEN_WRITE_LONG: {
-    ink_release_assert(c != NULL);
+    ink_release_assert(c != nullptr);
     //////////////////////
     // Use long format  //
     //////////////////////
@@ -534,7 +534,7 @@ CacheContinuation::do_op(Continuation *c, ClusterMachine *mp, void *args, int us
       // Unable to setup local VC, request aborted.
       // Remove request from pending list and deallocate.
       /////////////////////////////////////////////////////
-      cc->remove_and_delete(0, (Event *)0);
+      cc->remove_and_delete(0, (Event *)nullptr);
       return act;
 
     } else if (res != -1) {
@@ -585,7 +585,7 @@ CacheContinuation::do_op(Continuation *c, ClusterMachine *mp, void *args, int us
     break;
   }
   default:
-    msg = 0;
+    msg = nullptr;
     break;
   }
 #ifdef CACHE_MSG_TRACE
@@ -598,7 +598,7 @@ CacheContinuation::do_op(Continuation *c, ClusterMachine *mp, void *args, int us
   if (c) {
     return act;
   } else {
-    return (Action *)0;
+    return (Action *)nullptr;
   }
 }
 
@@ -642,7 +642,7 @@ CacheContinuation::setup_local_vc(char *data, int data_len, CacheContinuation *c
     cc->freeMsgBuffer();
     if (cc->timeout)
       cc->timeout->cancel();
-    cc->timeout = NULL;
+    cc->timeout = nullptr;
 
     // Post async failure callback on a different continuation.
     *act = callback_failure(&cc->action, (read_op ? CACHE_EVENT_OPEN_READ_FAILED : CACHE_EVENT_OPEN_WRITE_FAILED), 0);
@@ -696,7 +696,7 @@ CacheContinuation::lookupOpenWriteVC()
 
   vc = GlobalOpenWriteVCcache->lookup(&ml->url_md5);
 
-  if (vc == ((ClusterVConnection *)0)) {
+  if (vc == ((ClusterVConnection *)nullptr)) {
     // Retry lookup
     SET_CONTINUATION_HANDLER(this, (CacheContHandler)&CacheContinuation::lookupOpenWriteVCEvent);
     //
@@ -732,7 +732,7 @@ CacheContinuation::lookupOpenWriteVC()
     SET_CONTINUATION_HANDLER(this, (CacheContHandler)&CacheContinuation::localVCsetupEvent);
     vc = clusterProcessor.open_local(this, from, open_local_token, (CLUSTER_OPT_ALLOW_IMMEDIATE | CLUSTER_OPT_CONN_WRITE));
     if (!vc) {
-      this->handleEvent(CLUSTER_EVENT_OPEN_FAILED, 0);
+      this->handleEvent(CLUSTER_EVENT_OPEN_FAILED, nullptr);
 
     } else if (vc != CLUSTER_DELAYED_OPEN) {
       this->handleEvent(CLUSTER_EVENT_OPEN, vc);
@@ -825,7 +825,7 @@ CacheContinuation::localVCsetupEvent(int event, ClusterVConnection *vc)
       //       open_local() callback.
       /////////////////////////////////////////////////////////////////
       if (!action.cancelled)
-        action.continuation->handleEvent((read_op ? CACHE_EVENT_OPEN_READ_FAILED : CACHE_EVENT_OPEN_WRITE_FAILED), 0);
+        action.continuation->handleEvent((read_op ? CACHE_EVENT_OPEN_READ_FAILED : CACHE_EVENT_OPEN_WRITE_FAILED), nullptr);
       return EVENT_DONE;
     }
 
@@ -882,7 +882,7 @@ CacheContinuation::localVCsetupEvent(int event, ClusterVConnection *vc)
 
     } else {
       Debug("cache_proto", "4open_local cancelled due to timeout, seqno=%d", seq_number);
-      this->timeout = 0;
+      this->timeout = nullptr;
 
       // Deallocate VC if successfully acquired
 
@@ -896,7 +896,7 @@ CacheContinuation::localVCsetupEvent(int event, ClusterVConnection *vc)
 
     if (this->timeout)
       this->timeout->cancel();
-    this->timeout = NULL;
+    this->timeout = nullptr;
 
     freeMsgBuffer();
     if (send_failure_callback) {
@@ -908,7 +908,7 @@ CacheContinuation::localVCsetupEvent(int event, ClusterVConnection *vc)
       this->use_deferred_callback = true;
       this->result                = (read_op ? CACHE_EVENT_OPEN_READ_FAILED : CACHE_EVENT_OPEN_WRITE_FAILED);
       this->result_error          = 0;
-      remove_and_delete(0, (Event *)0);
+      remove_and_delete(0, (Event *)nullptr);
 
     } else {
       cacheContAllocator_free(this);
@@ -1068,7 +1068,7 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
     //
     // Establish the remote side of the ClusterVConnection
     //
-    c->write_cluster_vc = clusterProcessor.connect_local((Continuation *)0, &c->token, c->cluster_vc_channel,
+    c->write_cluster_vc = clusterProcessor.connect_local((Continuation *)nullptr, &c->token, c->cluster_vc_channel,
                                                          (CLUSTER_OPT_IMMEDIATE | CLUSTER_OPT_CONN_READ));
     if (!c->write_cluster_vc) {
       // Unable to setup channel, abort processing.
@@ -1094,7 +1094,7 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
 #endif
     CacheKey key(msg->md5);
 
-    char *hostname = NULL;
+    char *hostname = nullptr;
     int host_len   = len - op_to_sizeof_fixedlen_msg(opcode);
     if (host_len) {
       hostname = (char *)msg->moi.byte;
@@ -1119,7 +1119,7 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
     //
     // Establish the remote side of the ClusterVConnection
     //
-    c->write_cluster_vc = clusterProcessor.connect_local((Continuation *)0, &c->token, c->cluster_vc_channel,
+    c->write_cluster_vc = clusterProcessor.connect_local((Continuation *)nullptr, &c->token, c->cluster_vc_channel,
                                                          (CLUSTER_OPT_IMMEDIATE | CLUSTER_OPT_CONN_READ));
     if (!c->write_cluster_vc) {
       // Unable to setup channel, abort processing.
@@ -1148,7 +1148,7 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
     ink_assert(moi_len > 0);
 
     // Unmarshal CacheHTTPHdr
-    res = c->ic_request.unmarshal((char *)p, moi_len, NULL);
+    res = c->ic_request.unmarshal((char *)p, moi_len, nullptr);
     ink_assert(res > 0);
     ink_assert(c->ic_request.valid());
     c->request_purge =
@@ -1166,7 +1166,7 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
 
     CacheKey key(msg->url_md5);
 
-    char *hostname = NULL;
+    char *hostname = nullptr;
     int host_len   = 0;
 
     if (moi_len) {
@@ -1200,7 +1200,7 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
     //
     // Establish the remote side of the ClusterVConnection
     //
-    c->read_cluster_vc = clusterProcessor.connect_local((Continuation *)0, &c->token, c->cluster_vc_channel,
+    c->read_cluster_vc = clusterProcessor.connect_local((Continuation *)nullptr, &c->token, c->cluster_vc_channel,
                                                         (CLUSTER_OPT_IMMEDIATE | CLUSTER_OPT_CONN_WRITE));
     if (!c->read_cluster_vc) {
       // Unable to setup channel, abort processing.
@@ -1219,7 +1219,7 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
 
     CacheKey key(msg->md5);
 
-    char *hostname = NULL;
+    char *hostname = nullptr;
     int host_len   = len - op_to_sizeof_fixedlen_msg(opcode);
     if (host_len) {
       hostname = (char *)msg->moi.byte;
@@ -1249,7 +1249,7 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
     //
     // Establish the remote side of the ClusterVConnection
     //
-    c->read_cluster_vc = clusterProcessor.connect_local((Continuation *)0, &c->token, c->cluster_vc_channel,
+    c->read_cluster_vc = clusterProcessor.connect_local((Continuation *)nullptr, &c->token, c->cluster_vc_channel,
                                                         (CLUSTER_OPT_IMMEDIATE | CLUSTER_OPT_CONN_WRITE));
     if (!c->read_cluster_vc) {
       // Unable to setup channel, abort processing.
@@ -1266,14 +1266,14 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
     }
     ink_release_assert(c->read_cluster_vc != CLUSTER_DELAYED_OPEN);
 
-    CacheHTTPInfo *ci = 0;
+    CacheHTTPInfo *ci = nullptr;
     const char *p     = (const char *)msg + flen;
     int res           = 0;
     int moi_len       = len - flen;
 
     if (moi_len && c->cfl_flags & CFL_LOPENWRITE_HAVE_OLDINFO) {
       // Unmarshal old CacheHTTPInfo
-      res = HTTPInfo::unmarshal((char *)p, moi_len, NULL);
+      res = HTTPInfo::unmarshal((char *)p, moi_len, nullptr);
       ink_assert(res > 0);
       c->ic_old_info.get_handle((char *)p, moi_len);
       ink_assert(c->ic_old_info.valid());
@@ -1287,14 +1287,14 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
     p += res;
 
     CacheKey key(msg->url_md5);
-    char *hostname = NULL;
+    char *hostname = nullptr;
 
     if (moi_len) {
       hostname = (char *)p;
     }
 
     Cache *call_cache = caches[c->frag_type];
-    Action *a         = call_cache->open_write(c, &key, ci, c->pin_in_cache, NULL, c->frag_type, hostname, moi_len);
+    Action *a         = call_cache->open_write(c, &key, ci, c->pin_in_cache, nullptr, c->frag_type, hostname, moi_len);
     if (a != ACTION_RESULT_DONE) {
       c->cache_action = a;
     }
@@ -1309,7 +1309,7 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
 #endif
     CacheKey key(msg->md5);
 
-    char *hostname = NULL;
+    char *hostname = nullptr;
     int host_len   = len - op_to_sizeof_fixedlen_msg(opcode);
     if (host_len) {
       hostname = (char *)msg->moi.byte;
@@ -1333,7 +1333,7 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
     CacheKey key1(msg->md5_1);
     CacheKey key2(msg->md5_2);
 
-    char *hostname = NULL;
+    char *hostname = nullptr;
     int host_len   = len - op_to_sizeof_fixedlen_msg(opcode);
     if (host_len) {
       hostname = (char *)msg->moi.byte;
@@ -1356,7 +1356,7 @@ cache_op_ClusterFunction(ClusterHandler *ch, void *data, int len)
 
     CacheKey key(msg->md5);
 
-    char *hostname = NULL;
+    char *hostname = nullptr;
     int host_len   = len - op_to_sizeof_fixedlen_msg(opcode);
     if (host_len) {
       hostname = (char *)msg->moi.byte;
@@ -1464,7 +1464,7 @@ CacheContinuation::VCdataRead(int event, VIO *target_vio)
       MIOBuffer *mbuf = target_vio->buffer.writer();
       vc->do_io(VIO::CLOSE);
       free_MIOBuffer(mbuf);
-      readahead_vio = 0;
+      readahead_vio = nullptr;
     }
     SET_HANDLER((CacheContHandler)&CacheContinuation::replyOpEvent);
     handleEvent(reply, vc);
@@ -1480,7 +1480,7 @@ CacheContinuation::VCdataRead(int event, VIO *target_vio)
     MIOBuffer *mbuf = target_vio->buffer.writer();
     vc->do_io(VIO::CLOSE);
     free_MIOBuffer(mbuf);
-    readahead_vio = 0;
+    readahead_vio = nullptr;
     reply         = CACHE_EVENT_OPEN_READ_FAILED;
 
     SET_HANDLER((CacheContHandler)&CacheContinuation::replyOpEvent);
@@ -1511,14 +1511,14 @@ CacheContinuation::setupReadWriteVC(int event, VConnection *vc)
       CacheKey key(url_md5);
 
       Cache *call_cache = caches[frag_type];
-      Action *a = call_cache->open_write(this, &key, 0, pin_in_cache, NULL, frag_type, ic_hostname ? ic_hostname->data() : NULL,
-                                         ic_hostname_len);
+      Action *a         = call_cache->open_write(this, &key, nullptr, pin_in_cache, nullptr, frag_type,
+                                         ic_hostname ? ic_hostname->data() : nullptr, ic_hostname_len);
       if (a != ACTION_RESULT_DONE) {
         cache_action = a;
       }
     } else {
       SET_HANDLER((CacheContHandler)&CacheContinuation::replyOpEvent);
-      return handleEvent(CACHE_EVENT_OPEN_READ_FAILED, 0);
+      return handleEvent(CACHE_EVENT_OPEN_READ_FAILED, nullptr);
     }
     break;
   }
@@ -1528,7 +1528,7 @@ CacheContinuation::setupReadWriteVC(int event, VConnection *vc)
     ink_assert(!read_cluster_vc && write_cluster_vc);
     read_cluster_vc = write_cluster_vc;
     read_cluster_vc->set_type(CLUSTER_OPT_CONN_WRITE);
-    write_cluster_vc = 0;
+    write_cluster_vc = nullptr;
 
     SET_HANDLER((CacheContHandler)&CacheContinuation::replyOpEvent);
     return handleEvent(event, vc);
@@ -1537,7 +1537,7 @@ CacheContinuation::setupReadWriteVC(int event, VConnection *vc)
   case CACHE_EVENT_OPEN_WRITE_FAILED:
   default: {
     SET_HANDLER((CacheContHandler)&CacheContinuation::replyOpEvent);
-    return handleEvent(CACHE_EVENT_OPEN_READ_FAILED, 0);
+    return handleEvent(CACHE_EVENT_OPEN_READ_FAILED, nullptr);
     break;
   }
   } // end of switch
@@ -1616,7 +1616,7 @@ CacheContinuation::replyOpEvent(int event, VConnection *cvc)
       msg->token = token; // Tell sender conn established
 
       OneWayTunnel *pOWT = OneWayTunnel::OneWayTunnel_alloc();
-      pOWT->init(read_cluster_vc, cache_vc, NULL, nbytes ? nbytes : DEFAULT_MAX_BUFFER_SIZE, this->mutex.get());
+      pOWT->init(read_cluster_vc, cache_vc, nullptr, nbytes ? nbytes : DEFAULT_MAX_BUFFER_SIZE, this->mutex.get());
       read_cluster_vc->allow_remote_close();
       results_expected--;
     }
@@ -1761,8 +1761,8 @@ CacheContinuation::tunnelClosedEvent(int /* event ATS_UNUSED */, void *c)
 
   if (real_cc) {
     // Notify the real continuation of the tunnel closed event
-    real_cc->tunnel        = 0;
-    real_cc->tunnel_cont   = 0;
+    real_cc->tunnel        = nullptr;
+    real_cc->tunnel_cont   = nullptr;
     real_cc->tunnel_closed = true;
   }
   OneWayTunnel::OneWayTunnel_free(tc->tunnel);
@@ -1818,7 +1818,7 @@ CacheContinuation::disposeOfDataBuffer(void *d)
     cc->write_cluster_vc->pending_remote_fill = 0;
     cc->write_cluster_vc->remote_closed       = 1;
     cc->write_cluster_vc->do_io(VIO::CLOSE);
-    cc->readahead_data = 0;
+    cc->readahead_data = nullptr;
 
     cacheContAllocator_free(cc);
 
@@ -1844,7 +1844,7 @@ CacheContinuation::handleDisposeEvent(int /* event ATS_UNUSED */, CacheContinuat
     if (!cc->tunnel_closed) {
       // Start tunnel by reenabling source and target VCs.
 
-      cc->tunnel->vioSource->nbytes = getObjectSize(cc->tunnel->vioSource->vc_server, cc->request_opcode, 0);
+      cc->tunnel->vioSource->nbytes = getObjectSize(cc->tunnel->vioSource->vc_server, cc->request_opcode, nullptr);
       cc->tunnel->vioSource->reenable_re();
 
       // Tunnel may be closed by vioSource->reenable_re(),
@@ -1853,7 +1853,7 @@ CacheContinuation::handleDisposeEvent(int /* event ATS_UNUSED */, CacheContinuat
         cc->tunnel->vioTarget->reenable();
 
         // Tell tunnel event we are gone
-        cc->tunnel_cont->action.continuation = 0;
+        cc->tunnel_cont->action.continuation = nullptr;
       }
     }
     cacheContAllocator_free(cc);
@@ -1907,7 +1907,7 @@ cache_op_result_ClusterFunction(ClusterHandler *ch, void *d, int l)
       int res;
 
       // Unmarshal CacheHTTPInfo
-      res = HTTPInfo::unmarshal(p, len, NULL);
+      res = HTTPInfo::unmarshal(p, len, nullptr);
       ci.get_handle(p, len);
       ink_assert(res > 0);
       ink_assert(ci.valid());
@@ -2105,7 +2105,7 @@ CacheContinuation::remoteOpEvent(int event_code, Event *e)
   }
   // for CACHE_EVENT_RESPONSE/XXX the lock was acquired at the higher level
   intptr_t return_error  = 0;
-  ClusterVCToken *pToken = NULL;
+  ClusterVCToken *pToken = nullptr;
 
 retry:
 
@@ -2140,7 +2140,7 @@ CacheContinuation::remoteOpEvent(int event_code, Event *e)
       Debug("cluster_timeout", "cluster op timeout %d", seq_number);
       CLUSTER_INCREMENT_DYN_STAT(CLUSTER_REMOTE_OP_TIMEOUTS_STAT);
       request_timeout = true;
-      timeout         = 0;
+      timeout         = nullptr;
       //
       // Post error completion now and defer deallocation of
       // the continuation until we receive the reply or the
@@ -2175,7 +2175,7 @@ CacheContinuation::remoteOpEvent(int event_code, Event *e)
 
     if (timeout) {
       timeout->cancel();
-      timeout = 0;
+      timeout = nullptr;
     }
     // remove from the pending queue
     unsigned int hash = FOLDHASH(target_ip, seq_number);
@@ -2205,7 +2205,7 @@ CacheContinuation::remoteOpEvent(int event_code, Event *e)
     // handle response
 
     if (result == CACHE_EVENT_LOOKUP) {
-      callback_user(result, 0);
+      callback_user(result, nullptr);
       return EVENT_DONE;
 
     } else if (event_is_open(result)) {
@@ -2268,7 +2268,7 @@ CacheContinuation::remoteOpEvent(int event_code, Event *e)
     // the local machine.  Also if PROBE_LOCAL_CACHE_LAST.
     //
     int len        = getMsgBufferLen();
-    char *hostname = (len ? getMsgBuffer() : 0);
+    char *hostname = (len ? getMsgBuffer() : nullptr);
 
     if (!m || PROBE_LOCAL_CACHE_LAST) {
       SET_HANDLER((CacheContHandler)&CacheContinuation::probeLookupEvent);
@@ -2279,7 +2279,7 @@ CacheContinuation::remoteOpEvent(int event_code, Event *e)
       return EVENT_DONE;
     }
     if (PROBE_LOCAL_CACHE_FIRST) {
-      callback_user(CACHE_EVENT_LOOKUP_FAILED, 0);
+      callback_user(CACHE_EVENT_LOOKUP_FAILED, nullptr);
     } else {
       SET_HANDLER((CacheContHandler)&CacheContinuation::probeLookupEvent);
       CacheKey key(url_md5);
@@ -2292,7 +2292,7 @@ CacheContinuation::remoteOpEvent(int event_code, Event *e)
   } else {
     // Handle failure of all ops except for lookup
 
-    ClusterVConnection *cacheable_vc = 0;
+    ClusterVConnection *cacheable_vc = nullptr;
     if ((request_opcode == CACHE_OPEN_READ_LONG) && !pToken->is_clear()) {
       ink_assert(read_cluster_vc && !write_cluster_vc);
       //
@@ -2309,28 +2309,28 @@ CacheContinuation::remoteOpEvent(int event_code, Event *e)
       read_cluster_vc->set_type(CLUSTER_OPT_CONN_WRITE);
       // FIX ME. ajitb 12/21/99
       // Compiler bug in CC: WorkShop Compilers 5.0 98/12/15 C++ 5.0
-      // Does not accept assignment of ((Continuation *) NULL)
+      // Does not accept assignment of ((Continuation *) nullptr)
       {
-        Continuation *temp       = NULL;
+        Continuation *temp       = nullptr;
         read_cluster_vc->action_ = temp;
       }
       if (!GlobalOpenWriteVCcache->insert(&url_md5, read_cluster_vc)) {
         // Unable to insert VC into cache, try later
         cacheable_vc = read_cluster_vc;
       }
-      read_cluster_vc = 0;
+      read_cluster_vc = nullptr;
     }
     if (read_cluster_vc) {
       read_cluster_vc->remote_closed = 0; // send remote close
       read_cluster_vc->allow_remote_close();
       read_cluster_vc->do_io(VIO::ABORT);
-      read_cluster_vc = 0;
+      read_cluster_vc = nullptr;
     }
     if (write_cluster_vc) {
       write_cluster_vc->remote_closed = 0; // send remote close
       write_cluster_vc->allow_remote_close();
       write_cluster_vc->do_io(VIO::ABORT);
-      write_cluster_vc = 0;
+      write_cluster_vc = nullptr;
     }
     if (!request_timeout) {
       if (!return_error) {
@@ -2346,7 +2346,7 @@ CacheContinuation::remoteOpEvent(int event_code, Event *e)
       if (cacheable_vc) {
         cacheable_vc->allow_remote_close();
         cacheable_vc->do_io(VIO::CLOSE);
-        cacheable_vc = 0;
+        cacheable_vc = nullptr;
       }
       cacheContAllocator_free(this);
     }
@@ -2363,7 +2363,7 @@ int
 CacheContinuation::probeLookupEvent(int event, void * /* d ATS_UNUSED */)
 {
   ink_assert(magicno == (int)MagicNo);
-  callback_user(event, 0);
+  callback_user(event, nullptr);
   return EVENT_DONE;
 }
 
@@ -2389,7 +2389,7 @@ CacheContinuation::do_remote_lookup(Continuation *cont, const CacheKey *key, Cac
                                     const char *hostname, int hostname_len)
 {
   int probe_depth                                                = 0;
-  ClusterMachine *past_probes[CONFIGURATION_HISTORY_PROBE_DEPTH] = {0};
+  ClusterMachine *past_probes[CONFIGURATION_HISTORY_PROBE_DEPTH] = {nullptr};
   int mlen            = op_to_sizeof_fixedlen_msg(CACHE_LOOKUP_OP) + ((hostname && hostname_len) ? hostname_len : 0);
   CacheLookupMsg *msg = (CacheLookupMsg *)ALLOCA_DOUBLE(mlen);
   msg->init();
@@ -2401,7 +2401,7 @@ CacheContinuation::do_remote_lookup(Continuation *cont, const CacheKey *key, Cac
     msg->url_md5 = c->url_md5;
   }
 
-  ClusterMachine *m = NULL;
+  ClusterMachine *m = nullptr;
 
   if (cache_migrate_on_demand) {
     m = cluster_machine_at_depth(cache_hash(msg->url_md5), c ? &c->probe_depth : &probe_depth, c ? c->past_probes : past_probes);
@@ -2409,17 +2409,17 @@ CacheContinuation::do_remote_lookup(Continuation *cont, const CacheKey *key, Cac
     // If migrate-on-demand is off, do not probe beyond one level.
 
     if (c && c->probe_depth)
-      return (Action *)0;
+      return (Action *)nullptr;
     m = cluster_machine_at_depth(cache_hash(msg->url_md5));
     if (c)
       c->probe_depth = 1;
   }
 
   if (!m)
-    return (Action *)0;
+    return (Action *)nullptr;
   ClusterHandler *ch = m->pop_ClusterHandler();
   if (!ch)
-    return (Action *)0;
+    return (Action *)nullptr;
 
   // If we do not have a continuation, build one
 
@@ -2541,7 +2541,7 @@ cache_lookup_ClusterFunction(ClusterHandler *ch, void *data, int len)
 
   char *hostname;
   int hostname_len = len - op_to_sizeof_fixedlen_msg(CACHE_LOOKUP_OP);
-  hostname         = (hostname_len ? (char *)msg->moi.byte : 0);
+  hostname         = (hostname_len ? (char *)msg->moi.byte : nullptr);
 
   // Note: Hostname data invalid after return from lookup
   Cache *call_cache = caches[msg->frag_type];
@@ -2594,7 +2594,7 @@ CacheContinuation::replyLookupEvent(int event, void * /* d ATS_UNUSED */)
 int32_t
 CacheContinuation::getObjectSize(VConnection *vc, int opcode, CacheHTTPInfo *ret_ci)
 {
-  CacheHTTPInfo *ci   = 0;
+  CacheHTTPInfo *ci   = nullptr;
   int64_t object_size = 0;
 
   if ((opcode == CACHE_OPEN_READ_LONG) || (opcode == CACHE_OPEN_READ_BUFFER_LONG)) {
@@ -2603,7 +2603,7 @@ CacheContinuation::getObjectSize(VConnection *vc, int opcode, CacheHTTPInfo *ret
       object_size = ci->object_size_get();
 
     } else {
-      ci          = 0;
+      ci          = nullptr;
       object_size = 0;
     }
 
@@ -2734,15 +2734,15 @@ CacheContinuation::cacheContAllocator_free(CacheContinuation *c)
   c->start_time = 0;
 #endif
   c->free();
-  c->mutex = NULL;
+  c->mutex = nullptr;
   // FIX ME. ajitb 12/21/99
   // Compiler bug in CC: WorkShop Compilers 5.0 98/12/15 C++ 5.0
-  // Does not accept assignment of ((Continuation *) NULL)
+  // Does not accept assignment of ((Continuation *) nullptr)
   {
-    Continuation *temp = NULL;
+    Continuation *temp = nullptr;
     c->action          = temp;
   }
-  c->tunnel_mutex = NULL;
+  c->tunnel_mutex = nullptr;
   cacheContAllocator.free(c);
 }
 
@@ -2795,8 +2795,8 @@ static CacheContinuation *
 find_cache_continuation(unsigned int seq_number, unsigned int from_ip)
 {
   unsigned int hash        = FOLDHASH(from_ip, seq_number);
-  CacheContinuation *c     = NULL;
-  CacheContinuation *lastc = NULL;
+  CacheContinuation *c     = nullptr;
+  CacheContinuation *lastc = nullptr;
   for (c = (CacheContinuation *)remoteCacheContQueue[hash].head; c; c = (CacheContinuation *)c->link.next) {
     if (seq_number == c->seq_number && from_ip == c->target_ip) {
       if (lastc) {
@@ -2879,8 +2879,8 @@ CacheContinuation::forwardWaitEvent(int event, VConnection *c)
 {
   int ret         = EVENT_CONT;
   int res         = CACHE_EVENT_OPEN_READ_FAILED;
-  void *res_data  = NULL;
-  VConnection *vc = NULL;
+  void *res_data  = nullptr;
+  VConnection *vc = nullptr;
 
   switch (event) {
   default:
@@ -2950,7 +2950,7 @@ CacheContinuation::tunnelEvent(int event, VConnection *vc)
 
       } else {
         OneWayTunnel *pOWT = OneWayTunnel::OneWayTunnel_alloc();
-        pOWT->init(cluster_vc, vc, NULL, nbytes, this->mutex);
+        pOWT->init(cluster_vc, vc, nullptr, nbytes, this->mutex);
         --expect_reply;
       }
 
@@ -2982,7 +2982,7 @@ CacheContinuation::tunnelEvent(int event, VConnection *vc)
 
     } else {
       OneWayTunnel *pOWT = OneWayTunnelAllocator.alloc();
-      pOWT->init(vc, cluster_vc, NULL, nbytes, this->mutex);
+      pOWT->init(vc, cluster_vc, nullptr, nbytes, this->mutex);
       --expect_reply;
     }
     ret = EVENT_CONT;
diff --git a/iocore/cluster/ClusterConfig.cc b/iocore/cluster/ClusterConfig.cc
index e9b789661a1..6894c7ecbac 100644
--- a/iocore/cluster/ClusterConfig.cc
+++ b/iocore/cluster/ClusterConfig.cc
@@ -31,13 +31,13 @@
 int cluster_port = DEFAULT_CLUSTER_PORT_NUMBER;
 
 ClusterAccept::ClusterAccept(int *port, int send_bufsize, int recv_bufsize)
-  : Continuation(0),
+  : Continuation(nullptr),
     p_cluster_port(port),
     socket_send_bufsize(send_bufsize),
     socket_recv_bufsize(recv_bufsize),
     current_cluster_port(-1),
-    accept_action(0),
-    periodic_event(0)
+    accept_action(nullptr),
+    periodic_event(nullptr)
 {
   mutex = new_ProxyMutex();
   SET_HANDLER(&ClusterAccept::ClusterAcceptEvent);
@@ -45,7 +45,7 @@ ClusterAccept::ClusterAccept(int *port, int send_bufsize, int recv_bufsize)
 
 ClusterAccept::~ClusterAccept()
 {
-  mutex = 0;
+  mutex = nullptr;
 }
 
 void
@@ -55,7 +55,7 @@ ClusterAccept::Init()
   // where cluster accept port has changed.
 
   current_cluster_port = ~*p_cluster_port;
-  ClusterAcceptEvent(EVENT_INTERVAL, 0);
+  ClusterAcceptEvent(EVENT_INTERVAL, nullptr);
 
   // Setup periodic event to handle changing cluster accept port.
   periodic_event = eventProcessor.schedule_every(this, HRTIME_SECONDS(60));
@@ -72,11 +72,11 @@ ClusterAccept::ShutdownDelete()
   // Kill all events and delete.
   if (accept_action) {
     accept_action->cancel();
-    accept_action = 0;
+    accept_action = nullptr;
   }
   if (periodic_event) {
     periodic_event->cancel();
-    periodic_event = 0;
+    periodic_event = nullptr;
   }
   delete this;
 }
@@ -96,7 +96,7 @@ ClusterAccept::ClusterAcceptEvent(int event, void *data)
       // Configuration changed cluster port, redo accept on new port.
       if (accept_action) {
         accept_action->cancel();
-        accept_action = 0;
+        accept_action = nullptr;
       }
 
       NetProcessor::AcceptOptions opt;
@@ -142,7 +142,7 @@ ClusterAccept::ClusterAcceptMachine(NetVConnection *NetVC)
 
   Debug(CL_NOTE, "Accepting machine %u.%u.%u.%u", DOT_SEPARATED(remote_ip));
   ClusterHandler *ch = new ClusterHandler;
-  ch->machine        = new ClusterMachine(NULL, remote_ip);
+  ch->machine        = new ClusterMachine(nullptr, remote_ip);
   ch->ip             = remote_ip;
   ch->net_vc         = NetVC;
   eventProcessor.schedule_imm_signal(ch, ET_CLUSTER);
@@ -185,7 +185,7 @@ machine_config_change(const char * /* name ATS_UNUSED */, RecDataT /* data_type
   //
   char *filename   = (char *)data.rec_string;
   MachineList *l   = read_MachineList(filename);
-  MachineList *old = NULL;
+  MachineList *old = nullptr;
 #ifdef USE_SEPARATE_MACHINE_CONFIG
   switch ((int)cookie) {
   case MACHINE_CONFIG:
@@ -241,7 +241,7 @@ struct ConfigurationContinuation : public Continuation {
   int
   zombieEvent(int /* event ATS_UNUSED */, Event *e)
   {
-    prev->link.next = NULL; // remove that next pointer
+    prev->link.next = nullptr; // remove that next pointer
     SET_HANDLER((CfgContHandler)&ConfigurationContinuation::dieEvent);
     e->schedule_in(CLUSTER_CONFIGURATION_ZOMBIE);
     return EVENT_CONT;
@@ -257,7 +257,7 @@ struct ConfigurationContinuation : public Continuation {
     return EVENT_DONE;
   }
 
-  ConfigurationContinuation(ClusterConfiguration *cc, ClusterConfiguration *aprev) : Continuation(NULL), c(cc), prev(aprev)
+  ConfigurationContinuation(ClusterConfiguration *cc, ClusterConfiguration *aprev) : Continuation(nullptr), c(cc), prev(aprev)
   {
     mutex = new_ProxyMutex();
     SET_HANDLER((CfgContHandler)&ConfigurationContinuation::zombieEvent);
@@ -353,7 +353,7 @@ configuration_remove_machine(ClusterConfiguration *c, ClusterMachine *m)
 //   Find a machine at a particular depth into the past.
 //   We don't want to probe the current machine or machines
 //   we have probed before, so we store a list of "past_probes".
-//   If probe_depth and past_probes are NULL we only want the
+//   If probe_depth and past_probes are nullptr we only want the
 //   owner (machine now as opposed to in the past).
 //
 ClusterMachine *
@@ -361,7 +361,7 @@ cluster_machine_at_depth(unsigned int hash, int *pprobe_depth, ClusterMachine **
 {
 #ifdef CLUSTER_TOMCAT
   if (!cache_clustering_enabled)
-    return NULL;
+    return nullptr;
 #endif
   ClusterConfiguration *cc      = this_cluster()->current_configuration();
   ClusterConfiguration *next_cc = cc;
@@ -423,9 +423,9 @@ cluster_machine_at_depth(unsigned int hash, int *pprobe_depth, ClusterMachine **
       continue;
     }
 
-    return (m != this_cluster_machine()) ? m : NULL;
+    return (m != this_cluster_machine()) ? m : nullptr;
   }
-  return NULL;
+  return nullptr;
 }
 
 //
diff --git a/iocore/cluster/ClusterHandler.cc b/iocore/cluster/ClusterHandler.cc
index 476bf70d706..bf2f1144113 100644
--- a/iocore/cluster/ClusterHandler.cc
+++ b/iocore/cluster/ClusterHandler.cc
@@ -36,7 +36,7 @@
 unsigned SIZE_clusterFunction = countof(clusterFunction);
 
 // hook for testing
-ClusterFunction *ptest_ClusterFunction = NULL;
+ClusterFunction *ptest_ClusterFunction = nullptr;
 
 // global bit buckets for closed channels
 static char channel_dummy_input[DEFAULT_MAX_BUFFER_SIZE];
@@ -133,12 +133,12 @@ verify_peters_data(char *ap, int l)
 /*************************************************************************/
 
 ClusterHandler::ClusterHandler()
-  : net_vc(0),
-    thread(0),
+  : net_vc(nullptr),
+    thread(nullptr),
     ip(0),
     port(0),
-    hostname(NULL),
-    machine(NULL),
+    hostname(nullptr),
+    machine(nullptr),
     ifd(-1),
     id(-1),
     dead(true),
@@ -146,13 +146,13 @@ ClusterHandler::ClusterHandler()
     active(false),
     on_stolen_thread(false),
     n_channels(0),
-    channels(NULL),
-    channel_data(NULL),
+    channels(nullptr),
+    channel_data(nullptr),
     connector(false),
     cluster_connect_state(ClusterHandler::CLCON_INITIAL),
     needByteSwap(false),
     configLookupFails(0),
-    cluster_periodic_event(0),
+    cluster_periodic_event(nullptr),
     read(this, true),
     write(this, false),
     current_time(0),
@@ -161,7 +161,7 @@ ClusterHandler::ClusterHandler()
     n_since_last_report(0),
     last_cluster_op_enable(0),
     last_trace_dump(0),
-    clm(0),
+    clm(nullptr),
     disable_remote_cluster_ops(0),
     pw_write_descriptors_built(0),
     pw_freespace_descriptors_built(0),
@@ -238,7 +238,7 @@ ClusterHandler::~ClusterHandler()
   bool free_m = false;
   if (net_vc) {
     net_vc->do_io(VIO::CLOSE);
-    net_vc = 0;
+    net_vc = nullptr;
   }
   if (machine) {
     MUTEX_TAKE_LOCK(the_cluster_config_mutex, this_ethread());
@@ -248,35 +248,35 @@ ClusterHandler::~ClusterHandler()
     if (free_m)
       free_ClusterMachine(machine);
   }
-  machine = NULL;
+  machine = nullptr;
   ats_free(hostname);
-  hostname = NULL;
+  hostname = nullptr;
   ats_free(channels);
-  channels = NULL;
+  channels = nullptr;
   if (channel_data) {
     for (int i = 0; i < n_channels; ++i) {
       if (channel_data[i]) {
         ats_free(channel_data[i]);
-        channel_data[i] = 0;
+        channel_data[i] = nullptr;
       }
     }
     ats_free(channel_data);
-    channel_data = NULL;
+    channel_data = nullptr;
   }
   if (read_vcs)
     delete[] read_vcs;
-  read_vcs = NULL;
+  read_vcs = nullptr;
 
   if (write_vcs)
     delete[] write_vcs;
-  write_vcs = NULL;
+  write_vcs = nullptr;
 
   if (clm) {
     delete clm;
-    clm = NULL;
+    clm = nullptr;
   }
 #ifdef CLUSTER_STATS
-  message_blk = 0;
+  message_blk = nullptr;
 #endif
 }
 
@@ -294,8 +294,8 @@ ClusterHandler::close_ClusterVConnection(ClusterVConnection *vc)
     ClusterVC_remove_read(vc);
   if (vc->write.queue)
     ClusterVC_remove_write(vc);
-  vc->read.vio.mutex  = NULL;
-  vc->write.vio.mutex = NULL;
+  vc->read.vio.mutex  = nullptr;
+  vc->write.vio.mutex = nullptr;
 
   ink_assert(!vc->read_locked);
   ink_assert(!vc->write_locked);
@@ -311,7 +311,7 @@ ClusterHandler::close_ClusterVConnection(ClusterVConnection *vc)
       ByteBankDescriptor::ByteBankDescriptor_free(d);
     }
   }
-  vc->read_block = 0;
+  vc->read_block = nullptr;
 
   ink_assert(!vc->write_list);
   ink_assert(!vc->write_list_tail);
@@ -371,11 +371,11 @@ ClusterHandler::close_free_lock(ClusterVConnection *vc, ClusterVConnState *s)
   if (s == &vc->read) {
     if (vc->read_locked)
       MUTEX_UNTAKE_LOCK(vc->read_locked, thread);
-    vc->read_locked = NULL;
+    vc->read_locked = nullptr;
   } else {
     if (vc->write_locked)
       MUTEX_UNTAKE_LOCK(vc->write_locked, thread);
-    vc->write_locked = NULL;
+    vc->write_locked = nullptr;
   }
   close_ClusterVConnection(vc);
 }
@@ -392,7 +392,7 @@ ClusterHandler::build_data_vector(char *d, int len, bool read_flag)
   ink_assert(s.iov);
 
   s.msg.count       = 1;
-  s.iov[0].iov_base = 0;
+  s.iov[0].iov_base = nullptr;
   s.iov[0].iov_len  = len;
   s.block[0]        = new_IOBufferBlock();
   s.block[0]->set(new_constant_IOBufferData(d, len));
@@ -465,7 +465,7 @@ ClusterHandler::build_initial_vector(bool read_flag)
     // Setup vector for write of header, descriptors and control data
     //////////////////////////////////////////////////////////////////////
     len                       = sizeof(ClusterMsgHeader) + (s.msg.count * sizeof(Descriptor)) + s.msg.control_bytes;
-    s.iov[new_n_iov].iov_base = 0;
+    s.iov[new_n_iov].iov_base = nullptr;
     s.iov[new_n_iov].iov_len  = len;
     s.block[new_n_iov]        = s.msg.get_block_header();
 
@@ -481,7 +481,7 @@ ClusterHandler::build_initial_vector(bool read_flag)
       // Setup vector for read of header
       ////////////////////////////////////
       len                       = sizeof(ClusterMsgHeader);
-      s.iov[new_n_iov].iov_base = 0;
+      s.iov[new_n_iov].iov_base = nullptr;
       s.iov[new_n_iov].iov_len  = len;
       s.block[new_n_iov]        = s.msg.get_block_header();
 
@@ -496,7 +496,7 @@ ClusterHandler::build_initial_vector(bool read_flag)
       // Setup vector for read of Descriptors+control data
       /////////////////////////////////////////////////////////
       len                       = (s.msg.count * sizeof(Descriptor)) + s.msg.control_bytes;
-      s.iov[new_n_iov].iov_base = 0;
+      s.iov[new_n_iov].iov_base = nullptr;
       s.iov[new_n_iov].iov_len  = len;
       s.block[new_n_iov]        = s.msg.get_block_descriptor();
 
@@ -539,7 +539,7 @@ ClusterHandler::build_initial_vector(bool read_flag)
             *((uint32_t *)ic->data) = UNDEFINED_CLUSTER_FUNCTION;
             incoming_control.enqueue(ic);
           }
-          s.iov[new_n_iov].iov_base = 0;
+          s.iov[new_n_iov].iov_base = nullptr;
           s.iov[new_n_iov].iov_len  = ic->len;
           s.block[new_n_iov]        = ic->get_block();
           to_do += s.iov[new_n_iov].iov_len;
@@ -550,7 +550,7 @@ ClusterHandler::build_initial_vector(bool read_flag)
           // Outgoing Control
           ///////////////////////
           ink_assert(oc);
-          s.iov[new_n_iov].iov_base = 0;
+          s.iov[new_n_iov].iov_base = nullptr;
           s.iov[new_n_iov].iov_len  = oc->len;
           s.block[new_n_iov]        = oc->get_block();
           to_do += s.iov[new_n_iov].iov_len;
@@ -577,7 +577,7 @@ ClusterHandler::build_initial_vector(bool read_flag)
             if (!MUTEX_TAKE_TRY_LOCK_FOR_SPIN(vc->read.vio.mutex, thread, vc->read.vio._cont, READ_LOCK_SPIN_COUNT))
 #endif
             {
-              vc->read_locked = 0;
+              vc->read_locked = nullptr;
             } else {
               vc->read_locked = vc->read.vio.mutex;
             }
@@ -600,12 +600,12 @@ ClusterHandler::build_initial_vector(bool read_flag)
               int64_t index  = buffer_size_to_index(s.msg.descriptor[i].length, MAX_BUFFER_SIZE_INDEX);
               vc->read_block->alloc(index);
 
-              s.iov[new_n_iov].iov_base = 0;
+              s.iov[new_n_iov].iov_base = nullptr;
               s.block[new_n_iov]        = vc->read_block->clone();
 
             } else {
               Debug(CL_NOTE, "dumping cluster read data");
-              s.iov[new_n_iov].iov_base = 0;
+              s.iov[new_n_iov].iov_base = nullptr;
               s.block[new_n_iov]        = new_IOBufferBlock();
               s.block[new_n_iov]->set(new_constant_IOBufferData(channel_dummy_input, DEFAULT_MAX_BUFFER_SIZE));
             }
@@ -621,12 +621,12 @@ ClusterHandler::build_initial_vector(bool read_flag)
             }
             if (vc_ok_write(vc) || remote_write_fill) {
               if (remote_write_fill) {
-                s.iov[new_n_iov].iov_base = 0;
+                s.iov[new_n_iov].iov_base = nullptr;
                 ink_release_assert((int)s.msg.descriptor[i].length == bytes_IOBufferBlockList(vc->remote_write_block, 1));
                 s.block[new_n_iov] = vc->remote_write_block;
 
               } else {
-                s.iov[new_n_iov].iov_base = 0;
+                s.iov[new_n_iov].iov_base = nullptr;
                 ink_release_assert((int)s.msg.descriptor[i].length <= vc->write_list_bytes);
                 s.block[new_n_iov] = vc->write_list;
                 vc->write_list     = consume_IOBufferBlockList(vc->write_list, (int)s.msg.descriptor[i].length);
@@ -640,7 +640,7 @@ ClusterHandler::build_initial_vector(bool read_flag)
               }
             } else {
               Debug(CL_NOTE, "faking cluster write data");
-              s.iov[new_n_iov].iov_base = 0;
+              s.iov[new_n_iov].iov_base = nullptr;
               s.block[new_n_iov]        = new_IOBufferBlock();
               s.block[new_n_iov]->set(new_constant_IOBufferData(channel_dummy_output, DEFAULT_MAX_BUFFER_SIZE));
               // Make block read_avail == descriptor[].length
@@ -649,7 +649,7 @@ ClusterHandler::build_initial_vector(bool read_flag)
           }
         } else {
           // VC has been deleted, need to dump the bits...
-          s.iov[new_n_iov].iov_base = 0;
+          s.iov[new_n_iov].iov_base = nullptr;
           s.block[new_n_iov]        = new_IOBufferBlock();
 
           if (read_flag) {
@@ -673,7 +673,7 @@ ClusterHandler::build_initial_vector(bool read_flag)
   }
   // Release IOBufferBlock references used in previous i/o operation
   for (n = new_n_iov; n < MAX_TCOUNT; ++n) {
-    s.block[n] = 0;
+    s.block[n] = nullptr;
   }
 
   // Initialize i/o state variables
@@ -768,14 +768,14 @@ ClusterHandler::get_read_locks()
           !MUTEX_TAKE_TRY_LOCK_FOR_SPIN(vc->read.vio.mutex, thread, vc->read.vio._cont, READ_LOCK_SPIN_COUNT)) {
         // Pending byte bank completions or lock acquire failure.
 
-        vc->read_locked = NULL;
+        vc->read_locked = nullptr;
         continue;
       }
       // Since we now have the mutex, really see if reads are allowed.
 
       if (!vc_ok_read(vc)) {
         MUTEX_UNTAKE_LOCK(vc->read.vio.mutex, thread);
-        vc->read_locked = NULL;
+        vc->read_locked = nullptr;
         continue;
       }
       // Lock acquire success, move read bytes into VC
@@ -825,7 +825,7 @@ ClusterHandler::get_write_locks()
       if (!MUTEX_TAKE_TRY_LOCK_FOR_SPIN(vc->write.vio.mutex, thread, vc->write.vio._cont, WRITE_LOCK_SPIN_COUNT)) {
 #endif
         // write lock acquire failed, free all acquired locks and retry later
-        vc->write_locked = 0;
+        vc->write_locked = nullptr;
         free_locks(CLUSTER_WRITE, i);
         return false;
       }
@@ -995,7 +995,7 @@ ClusterHandler::process_large_control_msgs()
   // Place non cluster large incoming messages on external
   // incoming queue for processing by callout threads.
   ////////////////////////////////////////////////////////////////
-  IncomingControl *ic = NULL;
+  IncomingControl *ic = nullptr;
   uint32_t cluster_function_index;
 
   while ((ic = incoming_control.dequeue())) {
@@ -1081,7 +1081,7 @@ ClusterHandler::add_to_byte_bank(ClusterVConnection *vc)
   } else {
     CLUSTER_INCREMENT_DYN_STAT(CLUSTER_MULTILEVEL_BANK_STAT);
   }
-  vc->read_block = 0;
+  vc->read_block = nullptr;
 }
 
 void
@@ -1166,14 +1166,14 @@ ClusterHandler::process_incoming_callouts(ProxyMutex *mutex)
 
     while (ic_ext) {
       ic_ext_next       = (IncomingControl *)ic_ext->link.next;
-      ic_ext->link.next = NULL;
+      ic_ext->link.next = nullptr;
       local_incoming_control.push(ic_ext);
       ic_ext = ic_ext_next;
     }
 
     // Perform callout actions for each message.
     int small_control_msg;
-    IncomingControl *ic = NULL;
+    IncomingControl *ic = nullptr;
 
     while ((ic = local_incoming_control.pop())) {
       LOG_EVENT_TIME(ic->recognized_time, inmsg_time_dist, inmsg_events);
@@ -1386,7 +1386,7 @@ ClusterHandler::finish_delayed_reads()
   // the node to node connection. For explanation of "delayed read" see
   // comments at the beginning of the member functions for ClusterHandler.
   //
-  ClusterVConnection *vc = NULL;
+  ClusterVConnection *vc = nullptr;
   DLL l;
   while ((vc = (ClusterVConnection *)delayed_reads.pop())) {
     MUTEX_TRY_LOCK_SPIN(lock, vc->read.vio.mutex, thread, READ_LOCK_SPIN_COUNT);
@@ -1439,8 +1439,8 @@ ClusterHandler::update_channels_written()
             Debug(CL_TRACE, "update_channels_written chan=%d seqno=%d len=%d", write.msg.descriptor[i].channel,
                   write.msg.descriptor[i].sequence_number, write.msg.descriptor[i].length);
             vc->pending_remote_fill = 0;
-            vc->remote_write_block  = 0; // free data block
-            continue;                    // ignore remote write fill VC(s)
+            vc->remote_write_block  = nullptr; // free data block
+            continue;                          // ignore remote write fill VC(s)
           }
 
           ClusterVConnState *s = &vc->write;
@@ -1464,7 +1464,7 @@ ClusterHandler::update_channels_written()
         //
         OutgoingControl *oc = write.msg.outgoing_control.dequeue();
         oc->free_data();
-        oc->mutex = NULL;
+        oc->mutex = nullptr;
         now       = Thread::get_hrtime();
         CLUSTER_SUM_DYN_STAT(CLUSTER_CTRL_MSGS_SEND_TIME_STAT, now - oc->submit_time);
         LOG_EVENT_TIME(oc->submit_time, cluster_send_time_dist, cluster_send_events);
@@ -1485,12 +1485,12 @@ ClusterHandler::update_channels_written()
 
     // Free data descriptor
     args->data_oc->free_data(); // invoke memory free callback
-    args->data_oc->mutex = NULL;
+    args->data_oc->mutex = nullptr;
     args->data_oc->freeall();
 
     // Free descriptor
     hdr_oc->free_data();
-    hdr_oc->mutex = NULL;
+    hdr_oc->mutex = nullptr;
     now           = Thread::get_hrtime();
     CLUSTER_SUM_DYN_STAT(CLUSTER_CTRL_MSGS_SEND_TIME_STAT, now - hdr_oc->submit_time);
     LOG_EVENT_TIME(hdr_oc->submit_time, cluster_send_time_dist, cluster_send_events);
@@ -1520,7 +1520,7 @@ ClusterHandler::build_write_descriptors()
   while (vc) {
     enter_exit(&cls_build_writes_entered, &cls_writes_exited);
     vc_next              = (ClusterVConnection *)vc->ready_alink.next;
-    vc->ready_alink.next = NULL;
+    vc->ready_alink.next = nullptr;
     list_len++;
     if (VC_CLUSTER_CLOSED == vc->type) {
       vc->in_vcs = false;
@@ -1591,7 +1591,7 @@ ClusterHandler::build_write_descriptors()
 
       } else {
         MUTEX_UNTAKE_LOCK(vc->write_locked, thread);
-        vc->write_locked = NULL;
+        vc->write_locked = nullptr;
 
         if (channels[vc->channel] == vc)
           CLUSTER_INCREMENT_DYN_STAT(CLUSTER_NO_REMOTE_SPACE_STAT);
@@ -1624,7 +1624,7 @@ ClusterHandler::build_freespace_descriptors()
   while (vc) {
     enter_exit(&cls_build_reads_entered, &cls_reads_exited);
     vc_next              = (ClusterVConnection *)vc->ready_alink.next;
-    vc->ready_alink.next = NULL;
+    vc->ready_alink.next = nullptr;
     list_len++;
     if (VC_CLUSTER_CLOSED == vc->type) {
       vc->in_vcs = false;
@@ -1701,7 +1701,7 @@ ClusterHandler::build_controlmsg_descriptors()
   //
   // Build descriptors for control messages
   //
-  OutgoingControl *c = NULL;
+  OutgoingControl *c = nullptr;
   int control_bytes  = 0;
   int q              = 0;
 
@@ -1711,7 +1711,7 @@ ClusterHandler::build_controlmsg_descriptors()
       // Move elements from global outgoing_control to local queue
       OutgoingControl *c_next;
       c = (OutgoingControl *)ink_atomiclist_popall(&outgoing_control_al[q]);
-      if (c == 0) {
+      if (c == nullptr) {
         if (++q >= CLUSTER_CMSG_QUEUES) {
           break;
         } else {
@@ -1720,7 +1720,7 @@ ClusterHandler::build_controlmsg_descriptors()
       }
       while (c) {
         c_next       = (OutgoingControl *)c->link.next;
-        c->link.next = NULL;
+        c->link.next = nullptr;
         outgoing_control[q].push(c);
         c = c_next;
       }
@@ -1803,17 +1803,17 @@ ClusterHandler::build_controlmsg_descriptors()
 
         // Free compound message
         oc_header->free_data();
-        oc_header->mutex = NULL;
+        oc_header->mutex = nullptr;
         oc_header->freeall();
 
         // Free response message
         oc_msg->free_data();
-        oc_msg->mutex = 0;
+        oc_msg->mutex = nullptr;
         oc_msg->freeall();
 
         // Free data descriptor
         oc_data->free_data(); // invoke memory free callback
-        oc_data->mutex = 0;
+        oc_data->mutex = nullptr;
         oc_data->freeall();
       }
 
@@ -1848,14 +1848,14 @@ ClusterHandler::add_small_controlmsg_descriptors()
   // Move small control message data to free space after descriptors
   //
   char *p            = (char *)&write.msg.descriptor[write.msg.count];
-  OutgoingControl *c = NULL;
+  OutgoingControl *c = nullptr;
 
   while ((c = write.msg.outgoing_small_control.dequeue())) {
     *(int32_t *)p = c->len;
     p += sizeof(int32_t);
     memcpy(p, c->data, c->len);
     c->free_data();
-    c->mutex = NULL;
+    c->mutex = nullptr;
     p += c->len;
     ink_hrtime now = Thread::get_hrtime();
     CLUSTER_SUM_DYN_STAT(CLUSTER_CTRL_MSGS_SEND_TIME_STAT, now - c->submit_time);
@@ -1883,7 +1883,7 @@ struct DestructorLock {
     if (have_lock && m) {
       Mutex_unlock(m, t);
     }
-    m = 0;
+    m = nullptr;
   }
   EThread *t;
   Ptr m;
@@ -1925,7 +1925,7 @@ ClusterHandler::valid_for_data_write(ClusterVConnection *vc)
       ink_assert(lock.m);
 #endif
       vc->write_locked = lock.m;
-      lock.m           = 0;
+      lock.m           = nullptr;
       lock.have_lock   = false;
       return 1;
     } else {
@@ -2069,7 +2069,7 @@ ClusterHandler::valid_for_data_write(ClusterVConnection *vc)
     ink_assert(s->vio.mutex);
 #endif
     vc->write_locked = lock.m;
-    lock.m           = 0;
+    lock.m           = nullptr;
     lock.have_lock   = false;
     return 1;
   } else {
@@ -2179,7 +2179,7 @@ ClusterHandler::valid_for_freespace_write(ClusterVConnection *vc)
       Debug("cluster_vc_xfer", "finish initial data push ch %d bytes %" PRId64, vc->channel, vc->read_block->read_avail());
 
       s->vio.buffer.writer()->append_block(vc->read_block->clone());
-      vc->read_block = 0;
+      vc->read_block = nullptr;
 
     } else {
       bytes_to_move = ntodo;
@@ -2318,12 +2318,12 @@ ClusterHandler::free_locks(bool read_flag, int i)
         if (read_flag) {
           if (vc->read_locked) {
             MUTEX_UNTAKE_LOCK(vc->read.vio.mutex, thread);
-            vc->read_locked = NULL;
+            vc->read_locked = nullptr;
           }
         } else {
           if (vc->write_locked) {
             MUTEX_UNTAKE_LOCK(vc->write_locked, thread);
-            vc->write_locked = NULL;
+            vc->write_locked = nullptr;
           }
         }
       }
@@ -2333,7 +2333,7 @@ ClusterHandler::free_locks(bool read_flag, int i)
       if (VALID_CHANNEL(vc)) {
         if (vc->read_locked) {
           MUTEX_UNTAKE_LOCK(vc->read_locked, thread);
-          vc->read_locked = NULL;
+          vc->read_locked = nullptr;
         }
       }
     }
@@ -3030,12 +3030,12 @@ ClusterHandler::do_open_local_requests()
   //
   while (true) {
     cvc_ext = (ClusterVConnection *)ink_atomiclist_popall(&external_incoming_open_local);
-    if (cvc_ext == 0)
+    if (cvc_ext == nullptr)
       break;
 
     while (cvc_ext) {
       cvc_ext_next       = (ClusterVConnection *)cvc_ext->link.next;
-      cvc_ext->link.next = NULL;
+      cvc_ext->link.next = nullptr;
       local_incoming_open_local.push(cvc_ext);
       cvc_ext = cvc_ext_next;
     }
@@ -3048,7 +3048,7 @@ ClusterHandler::do_open_local_requests()
         if (cvc->start(tt) < 0) {
           cvc->token.clear();
           if (cvc->action_.continuation) {
-            cvc->action_.continuation->handleEvent(CLUSTER_EVENT_OPEN_FAILED, 0);
+            cvc->action_.continuation->handleEvent(CLUSTER_EVENT_OPEN_FAILED, nullptr);
             clusterVCAllocator.free(cvc);
           }
         }
diff --git a/iocore/cluster/ClusterHandlerBase.cc b/iocore/cluster/ClusterHandlerBase.cc
index 15abc373843..6202a41d619 100644
--- a/iocore/cluster/ClusterHandlerBase.cc
+++ b/iocore/cluster/ClusterHandlerBase.cc
@@ -39,7 +39,7 @@ extern int num_of_cluster_threads;
 // Incoming message continuation for periodic callout threads
 ///////////////////////////////////////////////////////////////
 
-ClusterCalloutContinuation::ClusterCalloutContinuation(struct ClusterHandler *ch) : Continuation(0), _ch(ch)
+ClusterCalloutContinuation::ClusterCalloutContinuation(struct ClusterHandler *ch) : Continuation(nullptr), _ch(ch)
 {
   mutex = new_ProxyMutex();
   SET_HANDLER((ClstCoutContHandler)&ClusterCalloutContinuation::CalloutHandler);
@@ -47,7 +47,7 @@ ClusterCalloutContinuation::ClusterCalloutContinuation(struct ClusterHandler *ch
 
 ClusterCalloutContinuation::~ClusterCalloutContinuation()
 {
-  mutex = 0;
+  mutex = nullptr;
 }
 
 int
@@ -60,7 +60,14 @@ ClusterCalloutContinuation::CalloutHandler(int /* event ATS_UNUSED */, Event * /
 // ClusterControl member functions (Internal Class)
 /*************************************************************************/
 ClusterControl::ClusterControl()
-  : Continuation(NULL), len(0), size_index(-1), real_data(0), data(0), free_proc(0), free_proc_arg(0), iob_block(0)
+  : Continuation(nullptr),
+    len(0),
+    size_index(-1),
+    real_data(nullptr),
+    data(nullptr),
+    free_proc(nullptr),
+    free_proc_arg(nullptr),
+    iob_block(nullptr)
 {
 }
 
@@ -128,7 +135,7 @@ ClusterControl::free_data()
     if (free_proc) {
       // Free memory via callback proc
       (*free_proc)(free_proc_arg);
-      iob_block = 0; // really free memory
+      iob_block = nullptr; // really free memory
       return;
     }
     if (real_data) {
@@ -140,7 +147,7 @@ ClusterControl::free_data()
       // malloc'ed memory, not alloced via real_alloc_data().
       // Data will be ats_free()'ed when IOBufferBlock is freed
     }
-    iob_block = 0; // free memory
+    iob_block = nullptr; // free memory
   }
 }
 
@@ -173,7 +180,7 @@ OutgoingControl::alloc()
   return outControlAllocator.alloc();
 }
 
-OutgoingControl::OutgoingControl() : ch(NULL), submit_time(0)
+OutgoingControl::OutgoingControl() : ch(nullptr), submit_time(0)
 {
 }
 
@@ -208,7 +215,7 @@ OutgoingControl::freeall()
 // ClusterState member functions (Internal Class)
 /*************************************************************************/
 ClusterState::ClusterState(ClusterHandler *c, bool read_chan)
-  : Continuation(0),
+  : Continuation(nullptr),
     ch(c),
     read_channel(read_chan),
     do_iodone_event(false),
@@ -219,13 +226,13 @@ ClusterState::ClusterState(ClusterHandler *c, bool read_chan)
     n_iov(0),
     io_complete(1),
     io_complete_event(0),
-    v(0),
+    v(nullptr),
     bytes_xfered(0),
     last_ndone(0),
     total_bytes_xfered(0),
-    iov(NULL),
-    iob_iov(NULL),
-    byte_bank(NULL),
+    iov(nullptr),
+    iob_iov(nullptr),
+    byte_bank(nullptr),
     n_byte_bank(0),
     byte_bank_size(0),
     missed(0),
@@ -277,21 +284,21 @@ ClusterState::ClusterState(ClusterHandler *c, bool read_chan)
 
 ClusterState::~ClusterState()
 {
-  mutex = 0;
+  mutex = nullptr;
   if (iov) {
-    iob_iov = 0; // Free memory
+    iob_iov = nullptr; // Free memory
   }
 
   if (msg.descriptor) {
-    msg.iob_descriptor_block = 0; // Free memory
+    msg.iob_descriptor_block = nullptr; // Free memory
   }
   // Deallocate IO Core structures
   int n;
   for (n = 0; n < MAX_TCOUNT; ++n) {
-    block[n] = 0;
+    block[n] = nullptr;
   }
   free_empty_MIOBuffer(mbuf);
-  mbuf = 0;
+  mbuf = nullptr;
 }
 
 void
@@ -303,7 +310,7 @@ ClusterState::build_do_io_vector()
   //
   int bytes_to_xfer = 0;
   int n;
-  IOBufferBlock *last_block = 0;
+  IOBufferBlock *last_block = nullptr;
 
   mbuf->clear();
 
@@ -550,7 +557,7 @@ ClusterState::IOComplete()
   if (do_iodone_event && !ch->mutex->thread_holding) {
     MUTEX_TRY_LOCK(lock, ch->mutex, this_ethread());
     if (lock.is_locked()) {
-      ch->handleEvent(EVENT_IMMEDIATE, (void *)0);
+      ch->handleEvent(EVENT_IMMEDIATE, (void *)nullptr);
     } else {
       eventProcessor.schedule_imm_signal(ch, ET_CLUSTER);
     }
@@ -628,12 +635,12 @@ ClusterHandler::check_channel(int c)
           channel_data[i]->channel_number = i;
           free_local_channels.enqueue(channel_data[i]);
         } else {
-          channels[i]     = NULL;
-          channel_data[i] = NULL;
+          channels[i]     = nullptr;
+          channel_data[i] = nullptr;
         }
       } else {
-        channels[i]     = NULL;
-        channel_data[i] = NULL;
+        channels[i]     = nullptr;
+        channel_data[i] = nullptr;
       }
     }
   }
@@ -646,7 +653,7 @@ ClusterHandler::alloc_channel(ClusterVConnection *vc, int requested)
   //
   // Allocate a channel
   //
-  struct ChannelData *cdp = 0;
+  struct ChannelData *cdp = nullptr;
   int i                   = requested;
 
   if (!i) {
@@ -697,7 +704,7 @@ ClusterHandler::free_channel(ClusterVConnection *vc)
       free_local_channels.enqueue(channel_data[i]);
       Debug(CL_TRACE, "free_channel local chan=%d VC=%p", i, vc);
     } else {
-      channels[i] = 0;
+      channels[i] = nullptr;
       Debug(CL_TRACE, "free_channel remote chan=%d VC=%p", i, vc);
     }
   }
@@ -729,7 +736,7 @@ ClusterHandler::machine_down()
   RecSignalManager(REC_SIGNAL_MACHINE_DOWN, textbuf);
   if (net_vc) {
     net_vc->do_io(VIO::CLOSE);
-    net_vc = 0;
+    net_vc = nullptr;
   }
   // Cancel pending cluster reads and writes
   read.io_complete  = -1;
@@ -737,7 +744,7 @@ ClusterHandler::machine_down()
 
   MUTEX_TAKE_LOCK(the_cluster_config_mutex, this_ethread());
   ClusterConfiguration *c      = this_cluster()->current_configuration();
-  machine->clusterHandlers[id] = NULL;
+  machine->clusterHandlers[id] = nullptr;
   if ((--machine->now_connections == 0) && c->find(ip, port)) {
     ClusterConfiguration *cc = configuration_remove_machine(c, machine);
     CLUSTER_DECREMENT_DYN_STAT(CLUSTER_NODES_STAT);
@@ -763,7 +770,7 @@ ClusterHandler::zombify(Event * /* e ATS_UNUSED */)
   dead = true;
   if (cluster_periodic_event) {
     cluster_periodic_event->cancel(this);
-    cluster_periodic_event = NULL;
+    cluster_periodic_event = nullptr;
   }
   clm->cancel_monitor();
 
@@ -796,7 +803,7 @@ ClusterHandler::connectClusterEvent(int event, Event *e)
       if (this_cluster_machine()->ip != machine->ip)
         Debug(CL_NOTE, "cluster connect aborted, machine %u.%u.%u.%u not in cluster", DOT_SEPARATED(machine->ip));
       delete machine;
-      machine = NULL;
+      machine = nullptr;
       delete this;
       return EVENT_DONE;
     }
@@ -1012,7 +1019,7 @@ ClusterHandler::startClusterEvent(int event, Event *e)
         vc->ep.stop();
         vc->nh->open_list.remove(vc);
         vc->nh->cop_list.remove(vc);
-        vc->thread = NULL;
+        vc->thread = nullptr;
         if (vc->nh->read_ready_list.in(vc))
           vc->nh->read_ready_list.remove(vc);
         if (vc->nh->write_ready_list.in(vc))
@@ -1165,7 +1172,7 @@ ClusterHandler::startClusterEvent(int event, Event *e)
       {
         // No references possible, so just delete it.
         delete machine;
-        machine = NULL;
+        machine = nullptr;
         delete this;
         Debug(CL_NOTE, "Failed cluster connect, deleting");
         return EVENT_DONE;
@@ -1245,7 +1252,7 @@ ClusterHandler::protoZombieEvent(int /* event ATS_UNUSED */, Event *e)
   IncomingControl *ic;
   while ((ic = incoming_control.dequeue())) {
     failed    = true;
-    ic->mutex = NULL;
+    ic->mutex = nullptr;
     ic->freeall();
   }
 
@@ -1276,9 +1283,9 @@ ClusterHandler::protoZombieEvent(int /* event ATS_UNUSED */, Event *e)
       vc = channels[i];
       if (VALID_CHANNEL(vc)) {
         if (vc->closed) {
-          vc->ch                     = 0;
-          vc->write_list             = 0;
-          vc->write_list_tail        = 0;
+          vc->ch                     = nullptr;
+          vc->write_list             = nullptr;
+          vc->write_list_tail        = nullptr;
           vc->write_list_bytes       = 0;
           vc->write_bytes_in_transit = 0;
           close_ClusterVConnection(vc);
@@ -1294,15 +1301,15 @@ ClusterHandler::protoZombieEvent(int /* event ATS_UNUSED */, Event *e)
   //   the completion callbacks.
   ///////////////////////////////////////////////////////////////
   item.data = external_incoming_control.head.data;
-  if (TO_PTR(FREELIST_POINTER(item)) == NULL) {
+  if (TO_PTR(FREELIST_POINTER(item)) == nullptr) {
     for (int n = 0; n < MAX_COMPLETION_CALLBACK_EVENTS; ++n) {
       if (callout_cont[n]) {
         MUTEX_TRY_LOCK(lock, callout_cont[n]->mutex, t);
         if (lock.is_locked()) {
           callout_events[n]->cancel(callout_cont[n]);
-          callout_events[n] = 0;
+          callout_events[n] = nullptr;
           delete callout_cont[n];
-          callout_cont[n] = 0;
+          callout_cont[n] = nullptr;
         } else {
           failed = true;
         }
diff --git a/iocore/cluster/ClusterLib.cc b/iocore/cluster/ClusterLib.cc
index fd3e7aaad4c..ff87d22f6b5 100644
--- a/iocore/cluster/ClusterLib.cc
+++ b/iocore/cluster/ClusterLib.cc
@@ -98,8 +98,8 @@ clone_IOBufferBlockList(IOBufferBlock *b, int start_off, int n, IOBufferBlock **
   int64_t block_read_avail;
   int64_t bytes_to_skip      = start_off;
   IOBufferBlock *bsrc        = b;
-  IOBufferBlock *bclone      = 0;
-  IOBufferBlock *bclone_head = 0;
+  IOBufferBlock *bclone      = nullptr;
+  IOBufferBlock *bclone_head = nullptr;
 
   while (bsrc && nbytes) {
     // Skip zero length blocks
@@ -150,7 +150,7 @@ clone_IOBufferBlockList(IOBufferBlock *b, int start_off, int n, IOBufferBlock **
 IOBufferBlock *
 consume_IOBufferBlockList(IOBufferBlock *b, int64_t n)
 {
-  IOBufferBlock *b_remainder = 0;
+  IOBufferBlock *b_remainder = nullptr;
   int64_t nbytes             = n;
 
   while (b) {
@@ -162,7 +162,7 @@ consume_IOBufferBlockList(IOBufferBlock *b, int64_t n)
         b->fill(nbytes);                       // make read_avail match nbytes
         b_remainder->consume(b->read_avail()); // clone for remaining bytes
         b_remainder->next = b->next;
-        b->next           = 0;
+        b->next           = nullptr;
         nbytes            = 0;
 
       } else {
diff --git a/iocore/cluster/ClusterLoadMonitor.cc b/iocore/cluster/ClusterLoadMonitor.cc
index 205a9217a16..92575b3f273 100644
--- a/iocore/cluster/ClusterLoadMonitor.cc
+++ b/iocore/cluster/ClusterLoadMonitor.cc
@@ -39,10 +39,10 @@ int ClusterLoadMonitor::cf_cluster_load_clear_duration;
 int ClusterLoadMonitor::cf_cluster_load_exceed_duration;
 
 ClusterLoadMonitor::ClusterLoadMonitor(ClusterHandler *ch)
-  : Continuation(0),
+  : Continuation(nullptr),
     ch(ch),
     ping_history_buf_head(0),
-    periodic_action(0),
+    periodic_action(nullptr),
     cluster_overloaded(0),
     cancel_periodic(0),
     cluster_load_msg_sequence_number(0),
@@ -109,11 +109,11 @@ ClusterLoadMonitor::~ClusterLoadMonitor()
   ink_release_assert(!periodic_action);
   if (ping_response_buckets) {
     ats_free(ping_response_buckets);
-    ping_response_buckets = 0;
+    ping_response_buckets = nullptr;
   }
   if (ping_response_history_buf) {
     ats_free(ping_response_history_buf);
-    ping_response_history_buf = 0;
+    ping_response_history_buf = nullptr;
   }
 }
 
@@ -281,7 +281,7 @@ ClusterLoadMonitor::cluster_load_periodic(int /* event ATS_UNUSED */, Event * /*
 
   if (cancel_periodic) {
     periodic_action->cancel();
-    periodic_action = 0;
+    periodic_action = nullptr;
     return EVENT_DONE;
   }
 
diff --git a/iocore/cluster/ClusterMachine.cc b/iocore/cluster/ClusterMachine.cc
index e48c5a38aca..f809b25b78e 100644
--- a/iocore/cluster/ClusterMachine.cc
+++ b/iocore/cluster/ClusterMachine.cc
@@ -33,8 +33,8 @@
 #include "ts/I_Layout.h"
 extern int num_of_cluster_threads;
 
-MachineList *machines_config = NULL;
-MachineList *cluster_config  = NULL;
+MachineList *machines_config = nullptr;
+MachineList *cluster_config  = nullptr;
 
 ProxyMutex *the_cluster_config_mutex;
 
@@ -76,7 +76,7 @@ ClusterMachine::ClusterMachine(char *ahostname, unsigned int aip, int aport)
     rr_count(0),
     msg_proto_major(0),
     msg_proto_minor(0),
-    clusterHandlers(0)
+    clusterHandlers(nullptr)
 {
   ProxyMutex *mutex = this_ethread()->mutex.get();
   CLUSTER_INCREMENT_DYN_STAT(CLUSTER_MACHINES_ALLOCATED_STAT);
@@ -128,7 +128,7 @@ ClusterMachine::ClusterMachine(char *ahostname, unsigned int aip, int aport)
     ink_gethostbyaddr_r_data data;
     struct hostent *r = ink_gethostbyaddr_r((char *)&ip, sizeof(int), AF_INET, &data);
 
-    if (r == NULL) {
+    if (r == nullptr) {
       Alias32 x;
       memcpy(&x.u32, &ip, sizeof(x.u32));
       Debug("machine_debug", "unable to reverse DNS %u.%u.%u.%u: %d", x.byte[0], x.byte[1], x.byte[2], x.byte[3], data.herrno);
@@ -181,7 +181,7 @@ struct MachineTimeoutContinuation : public Continuation {
     return EVENT_DONE;
   }
 
-  MachineTimeoutContinuation(ClusterMachine *am) : Continuation(NULL), m(am)
+  MachineTimeoutContinuation(ClusterMachine *am) : Continuation(nullptr), m(am)
   {
     SET_HANDLER((McTimeoutContHandler)&MachineTimeoutContinuation::dieEvent);
   }
@@ -210,7 +210,7 @@ read_MachineList(const char *filename, int afd)
   int n = -1, i = 0, ln = 0;
   ats_scoped_obj l;
   ink_assert(filename || (afd != -1));
-  ats_scoped_str path(RecConfigReadConfigPath(NULL, filename));
+  ats_scoped_str path(RecConfigReadConfigPath(nullptr, filename));
   ats_scoped_fd sfd;
 
   int fd = ((afd != -1) ? afd : sfd = open(path, O_RDONLY));
@@ -225,7 +225,7 @@ read_MachineList(const char *filename, int afd)
           l    = (MachineList *)operator new(sizeof(MachineList) + (n - 1) * sizeof(MachineListElement));
           l->n = 0;
         } else {
-          l = NULL;
+          l = nullptr;
         }
         continue;
       }
@@ -238,7 +238,7 @@ read_MachineList(const char *filename, int afd)
         if (-1 == (int)l->machine[i].ip) {
           if (afd == -1) {
             Warning("read machine list failure, bad ip, line %d", ln);
-            return NULL;
+            return nullptr;
           } else {
             char s[256];
             snprintf(s, sizeof s, "bad ip, line %d", ln);
@@ -254,7 +254,7 @@ read_MachineList(const char *filename, int afd)
       Lfail:
         if (afd == -1) {
           Warning("read machine list failure, bad port, line %d", ln);
-          return NULL;
+          return nullptr;
         } else {
           char s[256];
           snprintf(s, sizeof s, "bad port, line %d", ln);
@@ -264,21 +264,21 @@ read_MachineList(const char *filename, int afd)
     }
   } else {
     Warning("read machine list failure, open failed");
-    return NULL;
+    return nullptr;
   }
 
   if (n >= 0) {
     if (i != n) {
       if (afd == -1) {
         Warning("read machine list failure, length mismatch");
-        return NULL;
+        return nullptr;
       } else
         return (MachineList *)ats_strdup("number of machines does not match length of list\n");
     }
   }
 
   if (afd != -1) {
-    return (MachineList *)NULL;
+    return (MachineList *)nullptr;
   }
 
   return l.release();
diff --git a/iocore/cluster/ClusterProcessor.cc b/iocore/cluster/ClusterProcessor.cc
index 05fb5ec5f57..2daf5043e18 100644
--- a/iocore/cluster/ClusterProcessor.cc
+++ b/iocore/cluster/ClusterProcessor.cc
@@ -35,10 +35,10 @@ int cache_clustering_enabled = 0;
 int num_of_cluster_threads   = DEFAULT_NUMBER_OF_CLUSTER_THREADS;
 
 ClusterProcessor clusterProcessor;
-RecRawStatBlock *cluster_rsb = NULL;
+RecRawStatBlock *cluster_rsb = nullptr;
 int ET_CLUSTER;
 
-ClusterProcessor::ClusterProcessor() : accept_handler(NULL), this_cluster(NULL)
+ClusterProcessor::ClusterProcessor() : accept_handler(nullptr), this_cluster(nullptr)
 {
 }
 
@@ -46,7 +46,7 @@ ClusterProcessor::~ClusterProcessor()
 {
   if (accept_handler) {
     accept_handler->ShutdownDelete();
-    accept_handler = 0;
+    accept_handler = nullptr;
   }
 }
 
@@ -147,7 +147,7 @@ ClusterProcessor::internal_invoke_remote(ClusterHandler *ch, int cluster_fn, voi
 int
 ClusterProcessor::invoke_remote(ClusterHandler *ch, int cluster_fn, void *data, int len, int options)
 {
-  return internal_invoke_remote(ch, cluster_fn, data, len, options, (void *)NULL);
+  return internal_invoke_remote(ch, cluster_fn, data, len, options, (void *)nullptr);
 }
 
 int
@@ -157,7 +157,7 @@ ClusterProcessor::invoke_remote_data(ClusterHandler *ch, int cluster_fn, void *d
 {
   if (!buf) {
     // No buffer data, translate this into a invoke_remote() request
-    return internal_invoke_remote(ch, cluster_fn, data, data_len, options, (void *)NULL);
+    return internal_invoke_remote(ch, cluster_fn, data, data_len, options, (void *)nullptr);
   }
   ink_assert(data);
   ink_assert(data_len);
@@ -176,7 +176,7 @@ ClusterProcessor::invoke_remote_data(ClusterHandler *ch, int cluster_fn, void *d
 
   // Build OutgoingControl for compound message header
   invoke_remote_data_args mh;
-  mh.msg_oc       = 0;
+  mh.msg_oc       = nullptr;
   mh.data_oc      = bufdata_oc;
   mh.dest_channel = dest_channel;
   mh.token        = *token;
@@ -232,10 +232,10 @@ ClusterProcessor::open_local(Continuation *cont, ClusterMachine * /* m ATS_UNUSE
 
   ClusterHandler *ch = ((CacheContinuation *)cont)->ch;
   if (!ch)
-    return NULL;
+    return nullptr;
   EThread *t = ch->thread;
   if (!t)
-    return NULL;
+    return nullptr;
 
   EThread *thread        = this_ethread();
   ProxyMutex *mutex      = thread->mutex.get();
@@ -255,7 +255,7 @@ ClusterProcessor::open_local(Continuation *cont, ClusterMachine * /* m ATS_UNUSE
 #endif
     if (immediate) {
       clusterVCAllocator_free(vc);
-      return NULL;
+      return nullptr;
     }
     vc->action_ = cont;
     ink_atomiclist_push(&ch->external_incoming_open_local, (void *)vc);
@@ -268,7 +268,7 @@ ClusterProcessor::open_local(Continuation *cont, ClusterMachine * /* m ATS_UNUSE
     if (!(immediate || allow_immediate))
       vc->action_ = cont;
     if (vc->start(thread) < 0) {
-      return NULL;
+      return nullptr;
     }
     if (immediate || allow_immediate) {
       return vc;
@@ -297,15 +297,15 @@ ClusterProcessor::connect_local(Continuation *cont, ClusterVCToken *token, int c
   ClusterMachine *m = this_cluster->current_configuration()->find(token->ip_created);
 #endif
   if (!m)
-    return NULL;
+    return nullptr;
   if (token->ch_id >= (uint32_t)m->num_connections)
-    return NULL;
+    return nullptr;
   ClusterHandler *ch = m->clusterHandlers[token->ch_id];
   if (!ch)
-    return NULL;
+    return nullptr;
   EThread *t = ch->thread;
   if (!t)
-    return NULL;
+    return nullptr;
 
   EThread *thread        = this_ethread();
   ProxyMutex *mutex      = thread->mutex.get();
@@ -324,7 +324,7 @@ ClusterProcessor::connect_local(Continuation *cont, ClusterVCToken *token, int c
 #endif
     if (immediate) {
       clusterVCAllocator_free(vc);
-      return NULL;
+      return nullptr;
     }
     vc->mutex   = ch->mutex;
     vc->action_ = cont;
@@ -335,7 +335,7 @@ ClusterProcessor::connect_local(Continuation *cont, ClusterVCToken *token, int c
     if (!(immediate || allow_immediate))
       vc->action_ = cont;
     if (vc->start(thread) < 0) {
-      return NULL;
+      return nullptr;
     }
     if (immediate || allow_immediate) {
       return vc;
diff --git a/iocore/cluster/ClusterRPC.cc b/iocore/cluster/ClusterRPC.cc
index 04f4cc14d3b..016c91c03a8 100644
--- a/iocore/cluster/ClusterRPC.cc
+++ b/iocore/cluster/ClusterRPC.cc
@@ -137,7 +137,7 @@ ChannelToCacheWriteVC(ClusterHandler *ch, int channel, uint32_t channel_seqno, C
   ClusterVConnection *cvc = ch->channels[channel];
   if (!VALID_CHANNEL(cvc) || (channel_seqno != cvc->token.sequence_number) || (cvc->read.vio.op != VIO::READ)) {
     CLUSTER_INCREMENT_DYN_STAT(cluster_setdata_no_CLUSTERVC_STAT);
-    return NULL;
+    return nullptr;
   }
   // Tunneling from cluster to cache (remote write).
   // Get cache VC pointer.
@@ -145,12 +145,12 @@ ChannelToCacheWriteVC(ClusterHandler *ch, int channel, uint32_t channel_seqno, C
   OneWayTunnel *owt = (OneWayTunnel *)cvc->read.vio._cont;
   if (!owt) {
     CLUSTER_INCREMENT_DYN_STAT(CLUSTER_SETDATA_NO_TUNNEL_STAT);
-    return NULL;
+    return nullptr;
   }
   CacheVC *cache_vc = (CacheVC *)owt->vioTarget->vc_server;
   if (!cache_vc) {
     CLUSTER_INCREMENT_DYN_STAT(CLUSTER_SETDATA_NO_CACHEVC_STAT);
-    return NULL;
+    return nullptr;
   }
   *cluster_vc = cvc;
   return cache_vc;
@@ -272,10 +272,10 @@ set_channel_pin_ClusterFunction(ClusterHandler *ch, void *data, int /* len ATS_U
   if (m->NeedByteSwap())
     m->SwapBytes();
 
-  ClusterVConnection *cvc = NULL; // Just to make GCC happy
+  ClusterVConnection *cvc = nullptr; // Just to make GCC happy
   CacheVC *cache_vc;
 
-  if (ch != 0) {
+  if (ch != nullptr) {
     cache_vc = ChannelToCacheWriteVC(ch, m->channel, m->sequence_number, &cvc);
     if (cache_vc) {
       cache_vc->set_pin_in_cache(m->pin_time);
@@ -332,10 +332,10 @@ set_channel_priority_ClusterFunction(ClusterHandler *ch, void *data, int /* len
   if (m->NeedByteSwap())
     m->SwapBytes();
 
-  ClusterVConnection *cvc = NULL; // Just to make GCC happy
+  ClusterVConnection *cvc = nullptr; // Just to make GCC happy
   CacheVC *cache_vc;
 
-  if (ch != 0) {
+  if (ch != nullptr) {
     cache_vc = ChannelToCacheWriteVC(ch, m->channel, m->sequence_number, &cvc);
     if (cache_vc) {
       cache_vc->set_disk_io_priority(m->disk_priority);
diff --git a/iocore/cluster/ClusterVConnection.cc b/iocore/cluster/ClusterVConnection.cc
index f2fdd1a1016..a1a606e6563 100644
--- a/iocore/cluster/ClusterVConnection.cc
+++ b/iocore/cluster/ClusterVConnection.cc
@@ -41,15 +41,15 @@ ByteBankDescriptor::ByteBankDescriptor_alloc(Ptr &iob)
 void
 ByteBankDescriptor::ByteBankDescriptor_free(ByteBankDescriptor *b)
 {
-  b->block = 0;
+  b->block = nullptr;
   byteBankAllocator.free(b);
 }
 
 void
 clusterVCAllocator_free(ClusterVConnection *vc)
 {
-  vc->mutex   = 0;
-  vc->action_ = 0;
+  vc->mutex   = nullptr;
+  vc->action_ = nullptr;
   vc->free();
   if (vc->in_vcs) {
     vc->type = VC_CLUSTER_CLOSED;
@@ -58,12 +58,12 @@ clusterVCAllocator_free(ClusterVConnection *vc)
   clusterVCAllocator.free(vc);
 }
 
-ClusterVConnState::ClusterVConnState() : enabled(0), priority(1), vio(VIO::NONE), queue(0), ifd(-1), delay_timeout(NULL)
+ClusterVConnState::ClusterVConnState() : enabled(0), priority(1), vio(VIO::NONE), queue(nullptr), ifd(-1), delay_timeout(nullptr)
 {
 }
 
 ClusterVConnectionBase::ClusterVConnectionBase()
-  : thread(0), closed(0), inactivity_timeout_in(0), active_timeout_in(0), inactivity_timeout(NULL), active_timeout(NULL)
+  : thread(nullptr), closed(0), inactivity_timeout_in(0), active_timeout_in(0), inactivity_timeout(nullptr), active_timeout(nullptr)
 {
 }
 
@@ -92,7 +92,7 @@ VIO *
 ClusterVConnectionBase::do_io_pread(Continuation * /* acont ATS_UNUSED */, int64_t /* anbytes ATS_UNUSED */,
                                     MIOBuffer * /* abuffer ATS_UNUSED */, int64_t /* off ATS_UNUSED */)
 {
-  return 0;
+  return nullptr;
 }
 
 int
@@ -187,7 +187,7 @@ ClusterVConnectionBase::reenable_re(VIO *vio)
 }
 
 ClusterVConnection::ClusterVConnection(int is_new_connect_read)
-  : ch(NULL),
+  : ch(nullptr),
     new_connect_read(is_new_connect_read),
     remote_free(0),
     last_local_free(0),
@@ -206,9 +206,9 @@ ClusterVConnection::ClusterVConnection(int is_new_connect_read)
     remote_ram_cache_hit(0),
     have_all_data(0),
     initial_data_bytes(0),
-    current_cont(0),
+    current_cont(nullptr),
     iov_map(CLUSTER_IOV_NOT_OPEN),
-    write_list_tail(0),
+    write_list_tail(nullptr),
     write_list_bytes(0),
     write_bytes_in_transit(0),
     alternate(),
@@ -237,11 +237,11 @@ ClusterVConnection::free()
   while ((d = byte_bank_q.dequeue())) {
     ByteBankDescriptor::ByteBankDescriptor_free(d);
   }
-  read_block             = 0;
-  remote_write_block     = 0;
-  marshal_buf            = 0;
-  write_list             = 0;
-  write_list_tail        = 0;
+  read_block             = nullptr;
+  remote_write_block     = nullptr;
+  marshal_buf            = nullptr;
+  write_list             = nullptr;
+  write_list_tail        = nullptr;
   write_list_bytes       = 0;
   write_bytes_in_transit = 0;
 }
@@ -284,10 +284,10 @@ int
 ClusterVConnection::startEvent(int event, Event *e)
 {
   //
-  // Safe to call with e == NULL from the same thread.
+  // Safe to call with e == nullptr from the same thread.
   //
   (void)event;
-  start(e ? e->ethread : (EThread *)NULL);
+  start(e ? e->ethread : (EThread *)nullptr);
   return EVENT_DONE;
 }
 
@@ -396,7 +396,7 @@ ClusterVConnection::start(EThread *t)
   if (action_.continuation) {
     action_.continuation->handleEvent(CLUSTER_EVENT_OPEN, this);
   }
-  mutex = NULL;
+  mutex = nullptr;
   return EVENT_DONE;
 }
 
@@ -444,8 +444,8 @@ ClusterVConnection::schedule_write()
     if ((closed < 0) || remote_closed) {
       // User aborted connection, dump data.
 
-      write_list       = 0;
-      write_list_tail  = 0;
+      write_list       = nullptr;
+      write_list_tail  = nullptr;
       write_list_bytes = 0;
 
       return false;
diff --git a/iocore/cluster/P_ClusterCache.h b/iocore/cluster/P_ClusterCache.h
index eeca3f16bf3..c00790d523b 100644
--- a/iocore/cluster/P_ClusterCache.h
+++ b/iocore/cluster/P_ClusterCache.h
@@ -164,7 +164,7 @@ struct ClusterConfiguration {
     for (int i = 0; i < n_machines; i++)
       if (ip == machines[i]->ip && (!port || !machines[i]->cluster_port || machines[i]->cluster_port == port))
         return machines[i];
-    return NULL;
+    return nullptr;
   }
 
   //
@@ -186,14 +186,14 @@ machine_in_vector(ClusterMachine *m, ClusterMachine **mm, int len)
 }
 
 //
-// Returns either a machine or NULL.
+// Returns either a machine or nullptr.
 // Finds a machine starting at probe_depth going up to
 //    CONFIGURATION_HISTORY_PROBE_DEPTH
 // which is up, not the current machine and has not yet been probed.
 // Updates: probe_depth and past_probes.
 //
-inkcoreapi ClusterMachine *cluster_machine_at_depth(unsigned int hash, int *probe_depth = NULL,
-                                                    ClusterMachine **past_probes = NULL);
+inkcoreapi ClusterMachine *cluster_machine_at_depth(unsigned int hash, int *probe_depth = nullptr,
+                                                    ClusterMachine **past_probes = nullptr);
 
 //
 // Cluster
@@ -433,7 +433,7 @@ ClusterVConnectionBase::cancel_active_timeout()
 {
   if (active_timeout) {
     active_timeout->cancel(this);
-    active_timeout    = NULL;
+    active_timeout    = nullptr;
     active_timeout_in = 0;
   }
 }
@@ -443,7 +443,7 @@ ClusterVConnectionBase::cancel_inactivity_timeout()
 {
   if (inactivity_timeout) {
     inactivity_timeout->cancel(this);
-    inactivity_timeout    = NULL;
+    inactivity_timeout    = nullptr;
     inactivity_timeout_in = 0;
   }
 }
@@ -488,7 +488,7 @@ struct ClusterVConnection : public ClusterVConnectionBase {
   //
   // virtual VIO * do_io(
   //   int                   op,
-  //   Continuation        * c = NULL,
+  //   Continuation        * c = nullptr,
   //   int                   nbytes = INT64_MAX,
   //   MIOBuffer           * buf = 0,
   //   int                   whence = SEEK_CUR);
@@ -666,7 +666,7 @@ struct ClusterProcessor {
 // Options: CLUSTER_OPT_IMMEDIATE, CLUSTER_OPT_ALLOW_IMMEDIATE
 // Returns: pointer for CLUSTER_OPT_IMMEDIATE
 //            or CLUSTER_DELAYED_OPEN on success,
-//          NULL on failure
+//          nullptr on failure
 // calls:  cont->handleEvent( CLUSTER_EVENT_OPEN, ClusterVConnection *)
 //         on delayed success.
 //
@@ -680,7 +680,7 @@ struct ClusterProcessor {
   // allocated with open.
   //
   // Options: CLUSTER_OPT_IMMEDIATE, CLUSTER_OPT_ALLOW_IMMEDIATE
-  // return a pointer or CLUSTER_DELAYED_OPEN success, NULL on failure
+  // return a pointer or CLUSTER_DELAYED_OPEN success, nullptr on failure
   //
   ClusterVConnection *connect_local(Continuation *cont, ClusterVCToken *token, int channel, int options = 0);
   inkcoreapi bool disable_remote_cluster_ops(ClusterMachine *);
@@ -1085,7 +1085,7 @@ struct PingMessage : public ClusterMessageHeader {
     PING_MESSAGE_VERSION = MAX_VERSION,
   };
 
-  PingMessage(uint16_t vers = PING_MESSAGE_VERSION) : ClusterMessageHeader(vers), fn(NULL) { data[0] = '\0'; }
+  PingMessage(uint16_t vers = PING_MESSAGE_VERSION) : ClusterMessageHeader(vers), fn(nullptr) { data[0] = '\0'; }
   /////////////////////////////////////////////////////////////////////////////
   static int
   protoToVersion(int protoMajor)
@@ -1160,7 +1160,7 @@ ClusterVC_remove_read(ClusterVConnectionBase *vc)
   ClusterVConnState *cs = &vc->read;
   ink_assert(cs->queue);
   ((Queue *)cs->queue)->remove(vc);
-  cs->queue = NULL;
+  cs->queue = nullptr;
 }
 
 inline void
@@ -1169,7 +1169,7 @@ ClusterVC_remove_write(ClusterVConnectionBase *vc)
   ClusterVConnState *cs = &vc->write;
   ink_assert(cs->queue);
   ((Queue *)cs->queue)->remove(vc);
-  cs->queue = NULL;
+  cs->queue = nullptr;
 }
 
 #endif /* _Cluster_h */
diff --git a/iocore/cluster/P_ClusterCacheInternal.h b/iocore/cluster/P_ClusterCacheInternal.h
index 15b90d1fc1b..88975c3f6ce 100644
--- a/iocore/cluster/P_ClusterCacheInternal.h
+++ b/iocore/cluster/P_ClusterCacheInternal.h
@@ -276,7 +276,7 @@ struct CacheContinuation : public Continuation {
   }
 
   CacheContinuation()
-    : Continuation(NULL),
+    : Continuation(nullptr),
       magicno(MagicNo),
       callback_data(0),
       callback_data_2(0),
@@ -371,7 +371,7 @@ struct CacheOpArgs_General {
   CacheFragType frag_type;
   uint16_t cfl_flags;
 
-  CacheOpArgs_General() : url_md5(NULL), pin_in_cache(0), frag_type(CACHE_FRAG_TYPE_NONE), cfl_flags(0) {}
+  CacheOpArgs_General() : url_md5(nullptr), pin_in_cache(0), frag_type(CACHE_FRAG_TYPE_NONE), cfl_flags(0) {}
 };
 
 struct CacheOpArgs_Link {
@@ -380,7 +380,7 @@ struct CacheOpArgs_Link {
   uint16_t cfl_flags; // see CFL_XXX defines
   CacheFragType frag_type;
 
-  CacheOpArgs_Link() : from(NULL), to(NULL), cfl_flags(0), frag_type(CACHE_FRAG_TYPE_NONE) {}
+  CacheOpArgs_Link() : from(nullptr), to(nullptr), cfl_flags(0), frag_type(CACHE_FRAG_TYPE_NONE) {}
 };
 
 struct CacheOpArgs_Deref {
@@ -388,7 +388,7 @@ struct CacheOpArgs_Deref {
   uint16_t cfl_flags; // see CFL_XXX defines
   CacheFragType frag_type;
 
-  CacheOpArgs_Deref() : md5(NULL), cfl_flags(0), frag_type(CACHE_FRAG_TYPE_NONE) {}
+  CacheOpArgs_Deref() : md5(nullptr), cfl_flags(0), frag_type(CACHE_FRAG_TYPE_NONE) {}
 };
 
 ///////////////////////////////////
diff --git a/iocore/cluster/P_ClusterHandler.h b/iocore/cluster/P_ClusterHandler.h
index 00bd77090a9..7157ed1266d 100644
--- a/iocore/cluster/P_ClusterHandler.h
+++ b/iocore/cluster/P_ClusterHandler.h
@@ -154,7 +154,7 @@ struct invoke_remote_data_args {
   enum {
     MagicNo = 0x04141998,
   };
-  invoke_remote_data_args() : magicno(MagicNo), msg_oc(NULL), data_oc(NULL), dest_channel(0) {}
+  invoke_remote_data_args() : magicno(MagicNo), msg_oc(nullptr), data_oc(nullptr), dest_channel(0) {}
 };
 
 //
@@ -317,8 +317,8 @@ struct ClusterMsg {
     return cksum;
   }
   ClusterMsg()
-    : descriptor(NULL),
-      iob_descriptor_block(NULL),
+    : descriptor(nullptr),
+      iob_descriptor_block(nullptr),
       count(0),
       control_bytes(0),
       descriptor_cksum(0),
@@ -419,7 +419,7 @@ struct ClusterHandlerBase : public Continuation {
   int min_priority;
   Event *trigger_event;
 
-  ClusterHandlerBase() : Continuation(NULL), read_vcs(NULL), write_vcs(NULL), cur_vcs(0), min_priority(1) {}
+  ClusterHandlerBase() : Continuation(nullptr), read_vcs(nullptr), write_vcs(NULL), cur_vcs(0), min_priority(1) {}
 };
 
 struct ClusterHandler : public ClusterHandlerBase {
@@ -639,7 +639,7 @@ struct ClusterHandler : public ClusterHandlerBase {
   void free_locks(bool read_flag, int i = CLUSTER_FREE_ALL_LOCKS);
   bool get_read_locks();
   bool get_write_locks();
-  int zombify(Event *e = NULL); // optional event to use
+  int zombify(Event *e = nullptr); // optional event to use
 
   int connectClusterEvent(int event, Event *e);
   int startClusterEvent(int event, Event *e);
diff --git a/iocore/cluster/P_ClusterInline.h b/iocore/cluster/P_ClusterInline.h
index 20b8a8071fd..27230dd99cc 100644
--- a/iocore/cluster/P_ClusterInline.h
+++ b/iocore/cluster/P_ClusterInline.h
@@ -48,14 +48,14 @@ Cluster_lookup(Continuation *cont, const CacheKey *key, CacheFragType frag_type,
     } else {
       // not remote, do local lookup
       CacheContinuation::cacheContAllocator_free(cc);
-      return (Action *)NULL;
+      return (Action *)nullptr;
     }
   } else {
     Action a;
     a = cont;
     return CacheContinuation::callback_failure(&a, CACHE_EVENT_LOOKUP_FAILED, 0);
   }
-  return (Action *)NULL;
+  return (Action *)nullptr;
 }
 
 inline Action *
diff --git a/iocore/cluster/P_ClusterMachine.h b/iocore/cluster/P_ClusterMachine.h
index 2696b9b3f1e..64bf13369b5 100644
--- a/iocore/cluster/P_ClusterMachine.h
+++ b/iocore/cluster/P_ClusterMachine.h
@@ -71,7 +71,7 @@ struct ClusterMachine : public Server {
   Link link;
 
   // default for localhost
-  ClusterMachine(char *hostname = NULL, unsigned int ip = 0, int acluster_port = 0);
+  ClusterMachine(char *hostname = nullptr, unsigned int ip = 0, int acluster_port = 0);
   ~ClusterMachine();
   ClusterHandler *pop_ClusterHandler(int no_rr = 0);
 
@@ -98,7 +98,7 @@ struct MachineList {
     for (int i = 0; i < n; i++)
       if (machine[i].ip == ip && (!port || machine[i].port == port))
         return &machine[i];
-    return NULL;
+    return nullptr;
   }
 };
 
@@ -109,7 +109,7 @@ struct clusterConfigFile {
   char *
   parseFile(int fd)
   {
-    return (char *)read_MachineList(NULL, fd);
+    return (char *)read_MachineList(nullptr, fd);
   }
 };
 
diff --git a/iocore/cluster/test_I_Cluster.cc b/iocore/cluster/test_I_Cluster.cc
index ea75e6ba3b9..c05ef8e4ec1 100644
--- a/iocore/cluster/test_I_Cluster.cc
+++ b/iocore/cluster/test_I_Cluster.cc
@@ -39,7 +39,7 @@ main(int argc, char *argv[])
 {
   int i;
   int num_net_threads = ink_number_of_processors();
-  init_diags("", NULL);
+  init_diags("", nullptr);
   RecProcessInit(RECM_STAND_ALONE);
   ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
   eventProcessor.start(num_net_threads);
diff --git a/iocore/cluster/test_P_Cluster.cc b/iocore/cluster/test_P_Cluster.cc
index ea75e6ba3b9..c05ef8e4ec1 100644
--- a/iocore/cluster/test_P_Cluster.cc
+++ b/iocore/cluster/test_P_Cluster.cc
@@ -39,7 +39,7 @@ main(int argc, char *argv[])
 {
   int i;
   int num_net_threads = ink_number_of_processors();
-  init_diags("", NULL);
+  init_diags("", nullptr);
   RecProcessInit(RECM_STAND_ALONE);
   ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
   eventProcessor.start(num_net_threads);
diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc
index 5fe1518614a..132f785083d 100644
--- a/iocore/dns/DNS.cc
+++ b/iocore/dns/DNS.cc
@@ -50,10 +50,10 @@ int dns_validate_qname               = 0;
 unsigned int dns_handler_initialized = 0;
 int dns_ns_rr                        = 0;
 int dns_ns_rr_init_down              = 1;
-char *dns_ns_list                    = NULL;
-char *dns_resolv_conf                = NULL;
-char *dns_local_ipv6                 = NULL;
-char *dns_local_ipv4                 = NULL;
+char *dns_ns_list                    = nullptr;
+char *dns_resolv_conf                = nullptr;
+char *dns_local_ipv6                 = nullptr;
+char *dns_local_ipv4                 = nullptr;
 int dns_thread                       = 0;
 int dns_prefer_ipv6                  = 0;
 namespace
@@ -98,7 +98,7 @@ strnchr(char *s, char c, int len)
 {
   while (*s && *s != c && len)
     ++s, --len;
-  return *s == c ? s : (char *)NULL;
+  return *s == c ? s : (char *)nullptr;
 }
 
 static inline uint16_t
@@ -261,7 +261,7 @@ DNSProcessor::dns_init()
       Debug("dns", "Nameserver list - parsing \"%s\"", ns);
       bool err    = false;
       int prt     = DOMAIN_SERVICE_PORT;
-      char *colon = 0; // where the port colon is.
+      char *colon = nullptr; // where the port colon is.
       // Check for IPv6 notation.
       if ('[' == *ns) {
         char *ndx = strchr(ns + 1, ']');
@@ -300,13 +300,13 @@ DNSProcessor::dns_init()
         ++nserv;
       }
 
-      ns = (char *)strtok_r(NULL, " ,;\t\r", &last);
+      ns = (char *)strtok_r(nullptr, " ,;\t\r", &last);
     }
     ats_free(ns_list);
   }
   // The default domain (5th param) and search list (6th param) will
   // come from /etc/resolv.conf.
-  if (ink_res_init(&l_res, nameserver, nserv, dns_search, NULL, NULL, dns_resolv_conf) < 0)
+  if (ink_res_init(&l_res, nameserver, nserv, dns_search, nullptr, nullptr, dns_resolv_conf) < 0)
     Warning("Failed to build DNS res records for the servers (%s).  Using resolv.conf.", dns_ns_list);
 
   // Check for local forced bindings.
@@ -346,7 +346,7 @@ ink_dn_expand(const u_char *msg, const u_char *eom, const u_char *comp_dn, u_cha
   return ::dn_expand((unsigned char *)msg, (unsigned char *)eom, (unsigned char *)comp_dn, (char *)exp_dn, length);
 }
 
-DNSProcessor::DNSProcessor() : thread(NULL), handler(NULL)
+DNSProcessor::DNSProcessor() : thread(nullptr), handler(nullptr)
 {
   ink_zero(l_res);
   ink_zero(local_ipv6);
@@ -506,7 +506,7 @@ DNSHandler::startEvent(int /* event ATS_UNUSED */, Event *e)
       }
       dns_ns_rr_init_down = 0;
     } else {
-      open_con(0); // use current target address.
+      open_con(nullptr); // use current target address.
       n_con = 1;
     }
     e->ethread->schedule_every(this, DNS_PERIOD);
@@ -539,7 +539,7 @@ DNSHandler::startEvent_sdns(int /* event ATS_UNUSED */, Event *e)
 static inline int
 _ink_res_mkquery(ink_res_state res, char *qname, int qtype, char *buffer)
 {
-  int r = ink_res_mkquery(res, QUERY, qname, C_IN, qtype, NULL, 0, NULL, (unsigned char *)buffer, MAX_DNS_PACKET_LEN);
+  int r = ink_res_mkquery(res, QUERY, qname, C_IN, qtype, nullptr, 0, nullptr, (unsigned char *)buffer, MAX_DNS_PACKET_LEN);
   return r;
 }
 
@@ -723,7 +723,7 @@ good_rcode(char *buff)
 void
 DNSHandler::recv_dns(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
 {
-  DNSConnection *dnsc = NULL;
+  DNSConnection *dnsc = nullptr;
   ip_text_buffer ipbuff1, ipbuff2;
 
   while ((dnsc = (DNSConnection *)triggered.dequeue())) {
@@ -754,7 +754,7 @@ DNSHandler::recv_dns(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
                 ats_ip_ntop(&dnsc->ip.sa, ipbuff2, sizeof ipbuff2));
         continue;
       }
-      hostent_cache    = 0;
+      hostent_cache    = nullptr;
       buf->packet_size = res;
       Debug("dns", "received packet size = %d", res);
       if (dns_ns_rr) {
@@ -851,7 +851,7 @@ get_dns(DNSHandler *h, uint16_t id)
     }
   Lnext:;
   }
-  return NULL;
+  return nullptr;
 }
 
 /** Find a DNSEntry by query name and type. */
@@ -867,7 +867,7 @@ get_entry(DNSHandler *h, char *qname, int qtype)
         return e;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 /** Write up to dns_max_dns_in_flight entries. */
@@ -882,7 +882,7 @@ write_dns(DNSHandler *h)
   if (max_nscount <= 0) {
     Warning("There is no name server found in the resolv.conf");
     if (h->entries.head) {
-      dns_result(h, h->entries.head, NULL, false);
+      dns_result(h, h->entries.head, nullptr, false);
     }
     return;
   }
@@ -964,7 +964,7 @@ write_dns_event(DNSHandler *h, DNSEntry *e)
 
   if ((r = _ink_res_mkquery(h->m_res, e->qname, e->qtype, blob._b)) <= 0) {
     Debug("dns", "cannot build query: %s", e->qname);
-    dns_result(h, e, NULL, false);
+    dns_result(h, e, nullptr, false);
     return true;
   }
 
@@ -1052,7 +1052,7 @@ DNSEntry::mainEvent(int event, Event *e)
         ++domains;
       }
     } else {
-      domains = NULL;
+      domains = nullptr;
     }
     Debug("dns", "enqueing query %s", qname);
     DNSEntry *dup = get_entry(dnsH, qname, qtype);
@@ -1069,7 +1069,7 @@ DNSEntry::mainEvent(int event, Event *e)
   case EVENT_INTERVAL:
     Debug("dns", "timeout for query %s", qname);
     if (dnsH->txn_lookup_timeout) {
-      timeout = NULL;
+      timeout = nullptr;
       dns_result(dnsH, this, result_ent.get(), false); // do not retry -- we are over TXN timeout on DNS alone!
       return EVENT_DONE;
     }
@@ -1079,7 +1079,7 @@ DNSEntry::mainEvent(int event, Event *e)
       --(dnsH->in_flight);
       DNS_DECREMENT_DYN_STAT(dns_in_flight_stat);
     }
-    timeout = NULL;
+    timeout = nullptr;
     dns_result(dnsH, this, result_ent.get(), true);
     return EVENT_DONE;
   }
@@ -1099,7 +1099,7 @@ DNSProcessor::getby(const char *x, int len, int type, Continuation *cont, Option
   if (!lock.is_locked())
     thread->schedule_imm(e);
   else
-    e->handleEvent(EVENT_IMMEDIATE, 0);
+    e->handleEvent(EVENT_IMMEDIATE, nullptr);
   return &e->action;
 }
 
@@ -1158,7 +1158,7 @@ dns_result(DNSHandler *h, DNSEntry *e, HostEnt *ent, bool retry)
     }
   }
   if (ent == BAD_DNS_RESULT)
-    ent = NULL;
+    ent = nullptr;
   if (!cancelled) {
     if (!ent) {
       DNS_SUM_DYN_STAT(dns_fail_time_stat, Thread::get_hrtime() - e->submit_time);
@@ -1193,7 +1193,7 @@ dns_result(DNSHandler *h, DNSEntry *e, HostEnt *ent, bool retry)
     DNS_INCREMENT_DYN_STAT(dns_lookup_fail_stat);
   }
 
-  DNSEntry *dup = NULL;
+  DNSEntry *dup = nullptr;
   while ((dup = e->dups.dequeue())) {
     if (dup->post(h, ent)) {
       e->dups.enqueue(dup);
@@ -1203,7 +1203,7 @@ dns_result(DNSHandler *h, DNSEntry *e, HostEnt *ent, bool retry)
 
   if (e->timeout) {
     e->timeout->cancel(e);
-    e->timeout = NULL;
+    e->timeout = nullptr;
   }
   e->result_ent = ent;
 
@@ -1218,7 +1218,7 @@ dns_result(DNSHandler *h, DNSEntry *e, HostEnt *ent, bool retry)
         break;
       h->release_query_id(e->id[i]);
     }
-    e->postEvent(0, 0);
+    e->postEvent(0, nullptr);
   } else {
     for (int i = 0; i < MAX_DNS_RETRIES; i++) {
       if (e->id[i] < 0)
@@ -1243,7 +1243,7 @@ DNSEntry::post(DNSHandler *h, HostEnt *ent)
 {
   if (timeout) {
     timeout->cancel(this);
-    timeout = NULL;
+    timeout = nullptr;
   }
   result_ent = ent;
   if (h->mutex->thread_holding == submit_thread) {
@@ -1252,7 +1252,7 @@ DNSEntry::post(DNSHandler *h, HostEnt *ent)
       Debug("dns", "failed lock for result %s", qname);
       return 1;
     }
-    postEvent(0, 0);
+    postEvent(0, nullptr);
   } else {
     mutex = action.mutex;
     SET_HANDLER(&DNSEntry::postEvent);
@@ -1268,9 +1268,9 @@ DNSEntry::postEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
     Debug("dns", "called back continuation for %s", qname);
     action.continuation->handleEvent(DNS_EVENT_LOOKUP, result_ent.get());
   }
-  result_ent   = NULL;
-  action.mutex = NULL;
-  mutex        = NULL;
+  result_ent   = nullptr;
+  action.mutex = nullptr;
+  mutex        = nullptr;
   dnsEntryAllocator.free(this);
   return EVENT_DONE;
 }
@@ -1334,7 +1334,7 @@ dns_process(DNSHandler *handler, HostEnt *buf, int len)
     //
     //    struct in_addr host_addr;            unused
     u_char tbuf[MAXDNAME + 1];
-    buf->ent.h_name = NULL;
+    buf->ent.h_name = nullptr;
 
     int ancount       = ntohs(h->ancount);
     unsigned char *bp = buf->hostbuf;
@@ -1392,7 +1392,7 @@ dns_process(DNSHandler *handler, HostEnt *buf, int len)
     u_char **ap          = buf->host_aliases;
     buf->ent.h_aliases   = (char **)buf->host_aliases;
     u_char **hap         = (u_char **)buf->h_addr_ptrs;
-    *hap                 = NULL;
+    *hap                 = nullptr;
     buf->ent.h_addr_list = (char **)buf->h_addr_ptrs;
 
     //
@@ -1573,8 +1573,8 @@ dns_process(DNSHandler *handler, HostEnt *buf, int len)
       ++answer;
     }
     if (answer) {
-      *ap  = NULL;
-      *hap = NULL;
+      *ap  = nullptr;
+      *hap = nullptr;
       //
       // If the named didn't send us the name, insert the one
       // the user gave us...
@@ -1590,7 +1590,7 @@ dns_process(DNSHandler *handler, HostEnt *buf, int len)
   }
 Lerror:;
   DNS_INCREMENT_DYN_STAT(dns_lookup_fail_stat);
-  dns_result(handler, e, NULL, retry);
+  dns_result(handler, e, nullptr, retry);
   return server_ok;
 }
 
diff --git a/iocore/dns/DNSConnection.cc b/iocore/dns/DNSConnection.cc
index 2ccd1b5ccc6..662b36bf500 100644
--- a/iocore/dns/DNSConnection.cc
+++ b/iocore/dns/DNSConnection.cc
@@ -47,7 +47,8 @@ DNSConnection::Options const DNSConnection::DEFAULT_OPTIONS;
 // Functions
 //
 
-DNSConnection::DNSConnection() : fd(NO_FD), num(0), generator((uint32_t)((uintptr_t)time(NULL) ^ (uintptr_t)this)), handler(NULL)
+DNSConnection::DNSConnection()
+  : fd(NO_FD), num(0), generator((uint32_t)((uintptr_t)time(nullptr) ^ (uintptr_t)this)), handler(nullptr)
 {
   memset(&ip, 0, sizeof(ip));
 }
diff --git a/iocore/dns/I_DNSProcessor.h b/iocore/dns/I_DNSProcessor.h
index 7a555bdc3cb..564582d93fa 100644
--- a/iocore/dns/I_DNSProcessor.h
+++ b/iocore/dns/I_DNSProcessor.h
@@ -103,7 +103,7 @@ struct DNSProcessor : public Processor {
 
   // DNS lookup
   //   calls: cont->handleEvent( DNS_EVENT_LOOKUP, HostEnt *ent) on success
-  //          cont->handleEvent( DNS_EVENT_LOOKUP, NULL) on failure
+  //          cont->handleEvent( DNS_EVENT_LOOKUP, nullptr) on failure
   // NOTE: the HostEnt *block is freed when the function returns
   //
 
diff --git a/iocore/dns/P_DNSProcessor.h b/iocore/dns/P_DNSProcessor.h
index ed7acbb7ab5..8fead49d5c6 100644
--- a/iocore/dns/P_DNSProcessor.h
+++ b/iocore/dns/P_DNSProcessor.h
@@ -165,7 +165,7 @@ struct DNSEntry : public Continuation {
   void init(const char *x, int len, int qtype_arg, Continuation *acont, DNSProcessor::Options const &opt);
 
   DNSEntry()
-    : Continuation(NULL),
+    : Continuation(nullptr),
       qtype(0),
       host_res_style(HOST_RES_NONE),
       retries(DEFAULT_DNS_RETRIES),
@@ -314,7 +314,7 @@ struct DNSServer {
 
   DNSHandler *x_dnsH;
 
-  DNSServer() : x_dnsH(NULL)
+  DNSServer() : x_dnsH(nullptr)
   {
     memset(x_server_ip, 0, sizeof(x_server_ip));
 
@@ -326,7 +326,7 @@ struct DNSServer {
 
 TS_INLINE
 DNSHandler::DNSHandler()
-  : Continuation(NULL),
+  : Continuation(nullptr),
     n_con(0),
     in_flight(0),
     name_server(0),
@@ -336,7 +336,7 @@ DNSHandler::DNSHandler()
     last_primary_reopen(0),
     m_res(0),
     txn_lookup_timeout(0),
-    generator((uint32_t)((uintptr_t)time(NULL) ^ (uintptr_t)this))
+    generator((uint32_t)((uintptr_t)time(nullptr) ^ (uintptr_t)this))
 {
   ats_ip_invalidate(&ip);
   for (int i = 0; i < MAX_NAMED; i++) {
diff --git a/iocore/dns/P_SplitDNSProcessor.h b/iocore/dns/P_SplitDNSProcessor.h
index 9486eb44fe5..33e9947976b 100644
--- a/iocore/dns/P_SplitDNSProcessor.h
+++ b/iocore/dns/P_SplitDNSProcessor.h
@@ -173,7 +173,7 @@ DNSRequestData::get_host()
 TS_INLINE sockaddr const *
 DNSRequestData::get_ip()
 {
-  return NULL;
+  return nullptr;
 }
 
 /* --------------------------------------------------------------
@@ -182,7 +182,7 @@ DNSRequestData::get_ip()
 TS_INLINE sockaddr const *
 DNSRequestData::get_client_ip()
 {
-  return NULL;
+  return nullptr;
 }
 
 /* --------------------------------------------------------------
diff --git a/iocore/dns/SplitDNS.cc b/iocore/dns/SplitDNS.cc
index 0ed311977b1..4a043d0343e 100644
--- a/iocore/dns/SplitDNS.cc
+++ b/iocore/dns/SplitDNS.cc
@@ -46,7 +46,7 @@
    -------------------------------------------------------------- */
 static const char modulePrefix[] = "[SplitDNS]";
 
-ConfigUpdateHandler *SplitDNSConfig::splitDNSUpdate = NULL;
+ConfigUpdateHandler *SplitDNSConfig::splitDNSUpdate = nullptr;
 
 static ClassAllocator DNSReqAllocator("DNSRequestDataAllocator");
 
@@ -54,7 +54,7 @@ static ClassAllocator DNSReqAllocator("DNSRequestDataAllocator")
    used by a lot of protocols. We do not have dest ip in most
    cases.
    -------------------------------------------------------------- */
-const matcher_tags sdns_dest_tags = {"dest_host", "dest_domain", NULL, "url_regex", "url", NULL, true};
+const matcher_tags sdns_dest_tags = {"dest_host", "dest_domain", nullptr, "url_regex", "url", nullptr, true};
 
 /* --------------------------------------------------------------
    config Callback Prototypes
@@ -74,14 +74,14 @@ Ptr SplitDNSConfig::dnsHandler_mutex;
 /* --------------------------------------------------------------
    SplitDNSResult::SplitDNSResult()
    -------------------------------------------------------------- */
-inline SplitDNSResult::SplitDNSResult() : r(DNS_SRVR_UNDEFINED), m_line_number(0), m_rec(0), m_wrap_around(false)
+inline SplitDNSResult::SplitDNSResult() : r(DNS_SRVR_UNDEFINED), m_line_number(0), m_rec(nullptr), m_wrap_around(false)
 {
 }
 
 /* --------------------------------------------------------------
    SplitDNS::SplitDNS()
    -------------------------------------------------------------- */
-SplitDNS::SplitDNS() : m_DNSSrvrTable(NULL), m_SplitDNSlEnable(0), m_bEnableFastPath(false), m_pxLeafArray(NULL), m_numEle(0)
+SplitDNS::SplitDNS() : m_DNSSrvrTable(nullptr), m_SplitDNSlEnable(0), m_bEnableFastPath(false), m_pxLeafArray(nullptr), m_numEle(0)
 {
 }
 
@@ -139,15 +139,15 @@ SplitDNSConfig::reconfigure()
   params->m_DNSSrvrTable    = new DNS_table("proxy.config.dns.splitdns.filename", modulePrefix, &sdns_dest_tags);
 
   params->m_numEle = params->m_DNSSrvrTable->getEntryCount();
-  if (0 == params->m_DNSSrvrTable || (0 == params->m_numEle)) {
+  if (nullptr == params->m_DNSSrvrTable || (0 == params->m_numEle)) {
     Warning("No NAMEDs provided! Disabling SplitDNS");
     gsplit_dns_enabled = 0;
     delete params;
     return;
   }
 
-  if (0 != params->m_DNSSrvrTable->getHostMatcher() && 0 == params->m_DNSSrvrTable->getReMatcher() &&
-      0 == params->m_DNSSrvrTable->getIPMatcher() && 4 >= params->m_numEle) {
+  if (nullptr != params->m_DNSSrvrTable->getHostMatcher() && nullptr == params->m_DNSSrvrTable->getReMatcher() &&
+      nullptr == params->m_DNSSrvrTable->getIPMatcher() && 4 >= params->m_numEle) {
     HostLookup *pxHL          = params->m_DNSSrvrTable->getHostMatcher()->getHLookup();
     params->m_pxLeafArray     = (void *)pxHL->getLArray();
     params->m_bEnableFastPath = true;
@@ -196,7 +196,7 @@ SplitDNS::getDNSRecord(const char *hostname)
   }
 
   Debug("splitdns", "Fail to match a valid splitdns rule, fallback to default dns resolver");
-  return NULL;
+  return nullptr;
 }
 
 /* --------------------------------------------------------------
@@ -215,7 +215,7 @@ SplitDNS::findServer(RequestData *rdata, SplitDNSResult *result)
     return;
   }
 
-  result->m_rec         = NULL;
+  result->m_rec         = nullptr;
   result->m_line_number = 0xffffffff;
   result->m_wrap_around = false;
 
@@ -223,9 +223,9 @@ SplitDNS::findServer(RequestData *rdata, SplitDNSResult *result)
      the 'alleged' fast path ...
      --------------------------- */
   if (m_bEnableFastPath) {
-    SplitDNSRecord *data_ptr = 0;
+    SplitDNSRecord *data_ptr = nullptr;
     char *pHost              = (char *)rdata->get_host();
-    if (0 == pHost) {
+    if (nullptr == pHost) {
       Warning("SplitDNS: No host to match !");
       return;
     }
@@ -233,7 +233,7 @@ SplitDNS::findServer(RequestData *rdata, SplitDNSResult *result)
     int len        = strlen(pHost);
     HostLeaf *pxHL = (HostLeaf *)m_pxLeafArray;
     for (int i = 0; i < m_numEle; i++) {
-      if (0 == pxHL)
+      if (nullptr == pxHL)
         break;
 
       if (false == pxHL[i].isNot && pxHL[i].len > len)
@@ -260,7 +260,7 @@ SplitDNS::findServer(RequestData *rdata, SplitDNSResult *result)
   }
 
   rec = result->m_rec;
-  if (rec == NULL) {
+  if (rec == nullptr) {
     result->r = DNS_SRVR_UNDEFINED;
     return;
   } else {
@@ -315,7 +315,7 @@ SplitDNSRecord::ProcessDNSHosts(char *val)
     current = pTok[i];
     tmp     = (char *)strchr(current, ':');
     // coverity[secure_coding]
-    if (tmp != NULL && sscanf(tmp + 1, "%d", &port) != 1) {
+    if (tmp != nullptr && sscanf(tmp + 1, "%d", &port) != 1) {
       return "Malformed DNS port";
     }
 
@@ -356,7 +356,7 @@ SplitDNSRecord::ProcessDNSHosts(char *val)
   }
 
   m_dnsSrvr_cnt = numTok;
-  return NULL;
+  return nullptr;
 }
 
 /* --------------------------------------------------------------
@@ -384,7 +384,7 @@ SplitDNSRecord::ProcessDefDomain(char *val)
     m_servers.x_def_domain[len] = '\0';
   }
 
-  return NULL;
+  return nullptr;
 }
 
 /* --------------------------------------------------------------
@@ -396,7 +396,7 @@ SplitDNSRecord::ProcessDomainSrchList(char *val)
   Tokenizer pTok(",; \t\r");
   int numTok;
   int cnt = 0, sz = 0;
-  char *pSp = 0;
+  char *pSp = nullptr;
   const char *current;
 
   numTok = pTok.Initialize(val, SHARE_TOKS);
@@ -419,7 +419,7 @@ SplitDNSRecord::ProcessDomainSrchList(char *val)
   }
 
   m_domain_srch_list = numTok;
-  return NULL;
+  return nullptr;
 }
 
 /* --------------------------------------------------------------
@@ -431,7 +431,7 @@ SplitDNSRecord::ProcessDomainSrchList(char *val)
 config_parse_error
 SplitDNSRecord::Init(matcher_line *line_info)
 {
-  const char *errPtr = NULL;
+  const char *errPtr = nullptr;
   const char *tmp;
   char *label;
   char *val;
@@ -441,33 +441,33 @@ SplitDNSRecord::Init(matcher_line *line_info)
     label = line_info->line[0][i];
     val   = line_info->line[1][i];
 
-    if (label == NULL) {
+    if (label == nullptr) {
       continue;
     }
 
     if (strcasecmp(label, "def_domain") == 0) {
-      if (NULL != (errPtr = ProcessDefDomain(val))) {
+      if (nullptr != (errPtr = ProcessDefDomain(val))) {
         return config_parse_error("%s %s at line %d", modulePrefix, errPtr, line_num);
       }
-      line_info->line[0][i] = NULL;
+      line_info->line[0][i] = nullptr;
       line_info->num_el--;
       continue;
     }
 
     if (strcasecmp(label, "search_list") == 0) {
-      if (NULL != (errPtr = ProcessDomainSrchList(val))) {
+      if (nullptr != (errPtr = ProcessDomainSrchList(val))) {
         return config_parse_error("%s %s at line %d", modulePrefix, errPtr, line_num);
       }
-      line_info->line[0][i] = NULL;
+      line_info->line[0][i] = nullptr;
       line_info->num_el--;
       continue;
     }
 
     if (strcasecmp(label, "named") == 0) {
-      if (NULL != (errPtr = ProcessDNSHosts(val))) {
+      if (nullptr != (errPtr = ProcessDNSHosts(val))) {
         return config_parse_error("%s %s at line %d", modulePrefix, errPtr, line_num);
       }
-      line_info->line[0][i] = NULL;
+      line_info->line[0][i] = nullptr;
       line_info->num_el--;
       continue;
     }
@@ -482,7 +482,7 @@ SplitDNSRecord::Init(matcher_line *line_info)
 
   memset(res, 0, sizeof(ts_imp_res_state));
   if ((-1 == ink_res_init(res, m_servers.x_server_ip, m_dnsSrvr_cnt, dns_search, m_servers.x_def_domain,
-                          m_servers.x_domain_srch_list, NULL))) {
+                          m_servers.x_domain_srch_list, nullptr))) {
     char ab[INET6_ADDRPORTSTRLEN];
     return config_parse_error("Failed to build res record for the servers %s ...",
                               ats_ip_ntop(&m_servers.x_server_ip[0].sa, ab, sizeof ab));
@@ -502,7 +502,7 @@ SplitDNSRecord::Init(matcher_line *line_info)
      ----------------------------------------------------- */
   if (line_info->num_el > 0) {
     tmp = ProcessModifiers(line_info);
-    if (tmp != NULL) {
+    if (tmp != nullptr) {
       return config_parse_error("%s %s at line %d in splitdns.config", modulePrefix, tmp, line_num);
     }
   }
diff --git a/iocore/dns/test_I_DNS.cc b/iocore/dns/test_I_DNS.cc
index be310ddfdf9..9ba3d863eae 100644
--- a/iocore/dns/test_I_DNS.cc
+++ b/iocore/dns/test_I_DNS.cc
@@ -28,7 +28,7 @@
 
 main()
 {
-  init_diags("net_test", NULL);
+  init_diags("net_test", nullptr);
   ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
 
   signal(SIGPIPE, SIG_IGN);
diff --git a/iocore/dns/test_P_DNS.cc b/iocore/dns/test_P_DNS.cc
index 3b280ad1a93..b5d137ae261 100644
--- a/iocore/dns/test_P_DNS.cc
+++ b/iocore/dns/test_P_DNS.cc
@@ -45,7 +45,7 @@ struct NetTesterSM : public Continuation {
   handle_read(int event, void *data)
   {
     int r;
-    char *str = NULL;
+    char *str = nullptr;
     switch (event) {
     case VC_EVENT_READ_READY:
       r   = reader->read_avail();
diff --git a/iocore/eventsystem/IOBuffer.cc b/iocore/eventsystem/IOBuffer.cc
index c2aa910a350..c7a2b78b78a 100644
--- a/iocore/eventsystem/IOBuffer.cc
+++ b/iocore/eventsystem/IOBuffer.cc
@@ -76,7 +76,7 @@ MIOBuffer::remove_append(IOBufferReader *r)
     l += b->read_avail();
     append_block(b.get());
   }
-  r->mbuf->_writer = NULL;
+  r->mbuf->_writer = nullptr;
   return l;
 }
 
diff --git a/iocore/eventsystem/I_Action.h b/iocore/eventsystem/I_Action.h
index 2ef419d4399..711eb817e71 100644
--- a/iocore/eventsystem/I_Action.h
+++ b/iocore/eventsystem/I_Action.h
@@ -134,7 +134,7 @@ class Action
 
   */
   virtual void
-  cancel(Continuation *c = NULL)
+  cancel(Continuation *c = nullptr)
   {
     ink_assert(!c || c == continuation);
 #ifdef DEBUG
@@ -158,7 +158,7 @@ class Action
 
   */
   void
-  cancel_action(Continuation *c = NULL)
+  cancel_action(Continuation *c = nullptr)
   {
     ink_assert(!c || c == continuation);
 #ifdef DEBUG
@@ -187,7 +187,7 @@ class Action
     Continuation.
 
   */
-  Action() : continuation(NULL), cancelled(false) {}
+  Action() : continuation(nullptr), cancelled(false) {}
 #if defined(__GNUC__)
   virtual ~Action() {}
 #endif
diff --git a/iocore/eventsystem/I_Continuation.h b/iocore/eventsystem/I_Continuation.h
index 9660caba536..9c1521d4bf7 100644
--- a/iocore/eventsystem/I_Continuation.h
+++ b/iocore/eventsystem/I_Continuation.h
@@ -160,7 +160,7 @@ class Continuation : private force_VFPT_to_top
     @param amutex Lock to be set for this Continuation.
 
   */
-  Continuation(ProxyMutex *amutex = NULL);
+  Continuation(ProxyMutex *amutex = nullptr);
   Continuation(Ptr &amutex);
 };
 
@@ -193,9 +193,9 @@ class Continuation : private force_VFPT_to_top
 #endif
 
 inline Continuation::Continuation(Ptr &amutex)
-  : handler(NULL),
+  : handler(nullptr),
 #ifdef DEBUG
-    handler_name(NULL),
+    handler_name(nullptr),
 #endif
     mutex(amutex)
 {
@@ -204,9 +204,9 @@ inline Continuation::Continuation(Ptr &amutex)
 }
 
 inline Continuation::Continuation(ProxyMutex *amutex)
-  : handler(NULL),
+  : handler(nullptr),
 #ifdef DEBUG
-    handler_name(NULL),
+    handler_name(nullptr),
 #endif
     mutex(amutex)
 {
diff --git a/iocore/eventsystem/I_EThread.h b/iocore/eventsystem/I_EThread.h
index 9e673cdac5a..777c759b3b2 100644
--- a/iocore/eventsystem/I_EThread.h
+++ b/iocore/eventsystem/I_EThread.h
@@ -108,8 +108,8 @@ class EThread : public Thread
       of this callback.
 
   */
-  Event *schedule_imm(Continuation *c, int callback_event = EVENT_IMMEDIATE, void *cookie = NULL);
-  Event *schedule_imm_signal(Continuation *c, int callback_event = EVENT_IMMEDIATE, void *cookie = NULL);
+  Event *schedule_imm(Continuation *c, int callback_event = EVENT_IMMEDIATE, void *cookie = nullptr);
+  Event *schedule_imm_signal(Continuation *c, int callback_event = EVENT_IMMEDIATE, void *cookie = nullptr);
 
   /**
     Schedules the continuation on this EThread to receive an event
@@ -130,7 +130,7 @@ class EThread : public Thread
       of this callback.
 
   */
-  Event *schedule_at(Continuation *c, ink_hrtime atimeout_at, int callback_event = EVENT_INTERVAL, void *cookie = NULL);
+  Event *schedule_at(Continuation *c, ink_hrtime atimeout_at, int callback_event = EVENT_INTERVAL, void *cookie = nullptr);
 
   /**
     Schedules the continuation on this EThread to receive an event
@@ -150,7 +150,7 @@ class EThread : public Thread
       of this callback.
 
   */
-  Event *schedule_in(Continuation *c, ink_hrtime atimeout_in, int callback_event = EVENT_INTERVAL, void *cookie = NULL);
+  Event *schedule_in(Continuation *c, ink_hrtime atimeout_in, int callback_event = EVENT_INTERVAL, void *cookie = nullptr);
 
   /**
     Schedules the continuation on this EThread to receive an event
@@ -171,7 +171,7 @@ class EThread : public Thread
       of this callback.
 
   */
-  Event *schedule_every(Continuation *c, ink_hrtime aperiod, int callback_event = EVENT_INTERVAL, void *cookie = NULL);
+  Event *schedule_every(Continuation *c, ink_hrtime aperiod, int callback_event = EVENT_INTERVAL, void *cookie = nullptr);
 
   /**
     Schedules the continuation on this EThread to receive an event
@@ -189,7 +189,7 @@ class EThread : public Thread
       of this callback.
 
   */
-  Event *schedule_imm_local(Continuation *c, int callback_event = EVENT_IMMEDIATE, void *cookie = NULL);
+  Event *schedule_imm_local(Continuation *c, int callback_event = EVENT_IMMEDIATE, void *cookie = nullptr);
 
   /**
     Schedules the continuation on this EThread to receive an event
@@ -210,7 +210,7 @@ class EThread : public Thread
       of this callback.
 
   */
-  Event *schedule_at_local(Continuation *c, ink_hrtime atimeout_at, int callback_event = EVENT_INTERVAL, void *cookie = NULL);
+  Event *schedule_at_local(Continuation *c, ink_hrtime atimeout_at, int callback_event = EVENT_INTERVAL, void *cookie = nullptr);
 
   /**
     Schedules the continuation on this EThread to receive an event
@@ -231,7 +231,7 @@ class EThread : public Thread
       of this callback.
 
   */
-  Event *schedule_in_local(Continuation *c, ink_hrtime atimeout_in, int callback_event = EVENT_INTERVAL, void *cookie = NULL);
+  Event *schedule_in_local(Continuation *c, ink_hrtime atimeout_in, int callback_event = EVENT_INTERVAL, void *cookie = nullptr);
 
   /**
     Schedules the continuation on this EThread to receive an event
@@ -251,7 +251,7 @@ class EThread : public Thread
       of this callback.
 
   */
-  Event *schedule_every_local(Continuation *c, ink_hrtime aperiod, int callback_event = EVENT_INTERVAL, void *cookie = NULL);
+  Event *schedule_every_local(Continuation *c, ink_hrtime aperiod, int callback_event = EVENT_INTERVAL, void *cookie = nullptr);
 
   /* private */
 
diff --git a/iocore/eventsystem/I_Event.h b/iocore/eventsystem/I_Event.h
index cd4820d8513..2a48a184b55 100644
--- a/iocore/eventsystem/I_Event.h
+++ b/iocore/eventsystem/I_Event.h
@@ -201,7 +201,7 @@ class Event : public Action
   void schedule_every(ink_hrtime aperiod, int callback_event = EVENT_INTERVAL);
 
   // inherited from Action::cancel
-  // virtual void cancel(Continuation * c = NULL);
+  // virtual void cancel(Continuation * c = nullptr);
 
   void free();
 
@@ -276,7 +276,7 @@ extern ClassAllocator eventAllocator;
 
 #define EVENT_ALLOC(_a, _t) THREAD_ALLOC(_a, _t)
 #define EVENT_FREE(_p, _a, _t) \
-  _p->mutex = NULL;            \
+  _p->mutex = nullptr;         \
   if (_p->globally_allocated)  \
     ::_a.free(_p);             \
   else                         \
diff --git a/iocore/eventsystem/I_EventProcessor.h b/iocore/eventsystem/I_EventProcessor.h
index 03364d68373..53923d569d5 100644
--- a/iocore/eventsystem/I_EventProcessor.h
+++ b/iocore/eventsystem/I_EventProcessor.h
@@ -141,12 +141,13 @@ class EventProcessor : public Processor
       of this callback.
 
   */
-  Event *schedule_imm(Continuation *c, EventType event_type = ET_CALL, int callback_event = EVENT_IMMEDIATE, void *cookie = NULL);
+  Event *schedule_imm(Continuation *c, EventType event_type = ET_CALL, int callback_event = EVENT_IMMEDIATE,
+                      void *cookie = nullptr);
   /*
     provides the same functionality as schedule_imm and also signals the thread immediately
   */
   Event *schedule_imm_signal(Continuation *c, EventType event_type = ET_CALL, int callback_event = EVENT_IMMEDIATE,
-                             void *cookie = NULL);
+                             void *cookie = nullptr);
   /**
     Schedules the continuation on a specific thread group to receive an
     event at the given timeout. Requests the EventProcessor to schedule
@@ -168,7 +169,7 @@ class EventProcessor : public Processor
 
   */
   Event *schedule_at(Continuation *c, ink_hrtime atimeout_at, EventType event_type = ET_CALL, int callback_event = EVENT_INTERVAL,
-                     void *cookie = NULL);
+                     void *cookie = nullptr);
 
   /**
     Schedules the continuation on a specific thread group to receive an
@@ -190,7 +191,7 @@ class EventProcessor : public Processor
 
   */
   Event *schedule_in(Continuation *c, ink_hrtime atimeout_in, EventType event_type = ET_CALL, int callback_event = EVENT_INTERVAL,
-                     void *cookie = NULL);
+                     void *cookie = nullptr);
 
   /**
     Schedules the continuation on a specific thread group to receive
@@ -212,7 +213,7 @@ class EventProcessor : public Processor
 
   */
   Event *schedule_every(Continuation *c, ink_hrtime aperiod, EventType event_type = ET_CALL, int callback_event = EVENT_INTERVAL,
-                        void *cookie = NULL);
+                        void *cookie = nullptr);
 
   ////////////////////////////////////////////
   // reschedule an already scheduled event. //
diff --git a/iocore/eventsystem/I_IOBuffer.h b/iocore/eventsystem/I_IOBuffer.h
index e071775d02a..30b9079ae9e 100644
--- a/iocore/eventsystem/I_IOBuffer.h
+++ b/iocore/eventsystem/I_IOBuffer.h
@@ -261,10 +261,10 @@ class IOBufferData : public RefCountObj
   IOBufferData()
     : _size_index(BUFFER_SIZE_NOT_ALLOCATED),
       _mem_type(NO_ALLOC),
-      _data(NULL)
+      _data(nullptr)
 #ifdef TRACK_BUFFER_USER
       ,
-      _location(NULL)
+      _location(nullptr)
 #endif
   {
   }
@@ -554,7 +554,7 @@ class IOBufferReader
   /**
     End of inuse area of the first block with unconsumed data. Returns a
     pointer to the end of the first block with unconsumed data for this
-    reader. A NULL pointer indicates there are no blocks with unconsumed
+    reader. A nullptr pointer indicates there are no blocks with unconsumed
     data for this reader.
 
     @return pointer to the end of the first block with unconsumed data.
@@ -791,7 +791,7 @@ class IOBufferReader
   int64_t start_offset;
   int64_t size_limit;
 
-  IOBufferReader() : accessor(NULL), mbuf(NULL), start_offset(0), size_limit(INT64_MAX) {}
+  IOBufferReader() : accessor(nullptr), mbuf(nullptr), start_offset(0), size_limit(INT64_MAX) {}
 };
 
 /**
@@ -915,7 +915,7 @@ class MIOBuffer
 
   /**
     Returns a pointer to the first writable block on the block chain.
-    Returns NULL if there are not currently any writable blocks on the
+    Returns nullptr if there are not currently any writable blocks on the
     block list.
   */
   IOBufferBlock *
@@ -929,7 +929,7 @@ class MIOBuffer
       return _writer.get();
     }
 
-    return NULL;
+    return nullptr;
   }
 
   char *
@@ -1118,7 +1118,7 @@ class MIOBuffer
   void
   dealloc()
   {
-    _writer = NULL;
+    _writer = nullptr;
     dealloc_all_readers();
   }
 
@@ -1212,17 +1212,17 @@ struct MIOBufferAccessor {
   void
   clear()
   {
-    mbuf  = NULL;
-    entry = NULL;
+    mbuf  = nullptr;
+    entry = nullptr;
   }
 
   MIOBufferAccessor()
     :
 #ifdef DEBUG
-      name(NULL),
+      name(nullptr),
 #endif
-      mbuf(NULL),
-      entry(NULL)
+      mbuf(nullptr),
+      entry(nullptr)
   {
   }
 
diff --git a/iocore/eventsystem/I_Lock.h b/iocore/eventsystem/I_Lock.h
index bb55cc07e67..72913931716 100644
--- a/iocore/eventsystem/I_Lock.h
+++ b/iocore/eventsystem/I_Lock.h
@@ -50,7 +50,7 @@
 
 */
 #ifdef DEBUG
-#define SCOPED_MUTEX_LOCK(_l, _m, _t) MutexLock _l(MakeSourceLocation(), NULL, _m, _t)
+#define SCOPED_MUTEX_LOCK(_l, _m, _t) MutexLock _l(MakeSourceLocation(), nullptr, _m, _t)
 #else
 #define SCOPED_MUTEX_LOCK(_l, _m, _t) MutexLock _l(_m, _t)
 #endif // DEBUG
@@ -69,7 +69,7 @@
   @param _t The current EThread executing your code.
 
 */
-#define MUTEX_TRY_LOCK(_l, _m, _t) MutexTryLock _l(MakeSourceLocation(), (char *)NULL, _m, _t)
+#define MUTEX_TRY_LOCK(_l, _m, _t) MutexTryLock _l(MakeSourceLocation(), (char *)nullptr, _m, _t)
 
 /**
   Attempts to acquire the lock to the ProxyMutex.
@@ -85,7 +85,7 @@
   @param _sc The number of attempts or spin count. It must be a positive value.
 
 */
-#define MUTEX_TRY_LOCK_SPIN(_l, _m, _t, _sc) MutexTryLock _l(MakeSourceLocation(), (char *)NULL, _m, _t, _sc)
+#define MUTEX_TRY_LOCK_SPIN(_l, _m, _t, _sc) MutexTryLock _l(MakeSourceLocation(), (char *)nullptr, _m, _t, _sc)
 
 /**
   Attempts to acquire the lock to the ProxyMutex.
@@ -102,7 +102,7 @@
 
 */
 
-#define MUTEX_TRY_LOCK_FOR(_l, _m, _t, _c) MutexTryLock _l(MakeSourceLocation(), NULL, _m, _t)
+#define MUTEX_TRY_LOCK_FOR(_l, _m, _t, _c) MutexTryLock _l(MakeSourceLocation(), nullptr, _m, _t)
 #else // DEBUG
 #define MUTEX_TRY_LOCK(_l, _m, _t) MutexTryLock _l(_m, _t)
 #define MUTEX_TRY_LOCK_SPIN(_l, _m, _t, _sc) MutexTryLock _l(_m, _t, _sc)
@@ -126,9 +126,9 @@
 /////////////////////////////////////
 // DEPRECATED DEPRECATED DEPRECATED
 #ifdef DEBUG
-#define MUTEX_TAKE_TRY_LOCK(_m, _t) Mutex_trylock(MakeSourceLocation(), (char *)NULL, _m, _t)
-#define MUTEX_TAKE_TRY_LOCK_FOR(_m, _t, _c) Mutex_trylock(MakeSourceLocation(), (char *)NULL, _m, _t)
-#define MUTEX_TAKE_TRY_LOCK_FOR_SPIN(_m, _t, _c, _sc) Mutex_trylock_spin(MakeSourceLocation(), NULL, _m, _t, _sc)
+#define MUTEX_TAKE_TRY_LOCK(_m, _t) Mutex_trylock(MakeSourceLocation(), (char *)nullptr, _m, _t)
+#define MUTEX_TAKE_TRY_LOCK_FOR(_m, _t, _c) Mutex_trylock(MakeSourceLocation(), (char *)nullptr, _m, _t)
+#define MUTEX_TAKE_TRY_LOCK_FOR_SPIN(_m, _t, _c, _sc) Mutex_trylock_spin(MakeSourceLocation(), nullptr, _m, _t, _sc)
 #else
 #define MUTEX_TAKE_TRY_LOCK(_m, _t) Mutex_trylock(_m, _t)
 #define MUTEX_TAKE_TRY_LOCK_FOR(_m, _t, _c) Mutex_trylock(_m, _t)
@@ -136,8 +136,8 @@
 #endif
 
 #ifdef DEBUG
-#define MUTEX_TAKE_LOCK(_m, _t) Mutex_lock(MakeSourceLocation(), (char *)NULL, _m, _t)
-#define MUTEX_TAKE_LOCK_FOR(_m, _t, _c) Mutex_lock(MakeSourceLocation(), NULL, _m, _t)
+#define MUTEX_TAKE_LOCK(_m, _t) Mutex_lock(MakeSourceLocation(), (char *)nullptr, _m, _t)
+#define MUTEX_TAKE_LOCK_FOR(_m, _t, _c) Mutex_lock(MakeSourceLocation(), nullptr, _m, _t)
 #else
 #define MUTEX_TAKE_LOCK(_m, _t) Mutex_lock(_m, _t)
 #define MUTEX_TAKE_LOCK_FOR(_m, _t, _c) Mutex_lock(_m, _t)
@@ -235,14 +235,14 @@ class ProxyMutex : public RefCountObj
   */
   ProxyMutex()
 #ifdef DEBUG
-    : srcloc(NULL, NULL, 0)
+    : srcloc(nullptr, nullptr, 0)
 #endif
   {
-    thread_holding  = NULL;
+    thread_holding  = nullptr;
     nthread_holding = 0;
 #ifdef DEBUG
     hold_time = 0;
-    handler   = NULL;
+    handler   = nullptr;
 #ifdef MAX_LOCK_TAKEN
     taken = 0;
 #endif // MAX_LOCK_TAKEN
@@ -458,8 +458,8 @@ Mutex_unlock(ProxyMutex *m, EThread *t)
       if (m->taken > MAX_LOCK_TAKEN)
         lock_taken(m->srcloc, m->handler);
 #endif // MAX_LOCK_TAKEN
-      m->srcloc  = SourceLocation(NULL, NULL, 0);
-      m->handler = NULL;
+      m->srcloc  = SourceLocation(nullptr, nullptr, 0);
+      m->handler = nullptr;
 #endif // DEBUG
       ink_assert(m->thread_holding);
       m->thread_holding = 0;
diff --git a/iocore/eventsystem/I_SocketManager.h b/iocore/eventsystem/I_SocketManager.h
index f79b2e04ae2..3d788b84aec 100644
--- a/iocore/eventsystem/I_SocketManager.h
+++ b/iocore/eventsystem/I_SocketManager.h
@@ -76,19 +76,19 @@ struct SocketManager {
   int open(const char *path, int oflag = O_RDWR | O_NDELAY | O_CREAT, mode_t mode = DEFAULT_OPEN_MODE);
 
   // result is the number of bytes or -errno
-  int64_t read(int fd, void *buf, int len, void *pOLP = NULL);
+  int64_t read(int fd, void *buf, int len, void *pOLP = nullptr);
   int64_t vector_io(int fd, struct iovec *vector, size_t count, int read_request, void *pOLP = 0);
   int64_t readv(int fd, struct iovec *vector, size_t count);
   int64_t read_vector(int fd, struct iovec *vector, size_t count, void *pOLP = 0);
-  int64_t pread(int fd, void *buf, int len, off_t offset, char *tag = NULL);
+  int64_t pread(int fd, void *buf, int len, off_t offset, char *tag = nullptr);
 
   int recv(int s, void *buf, int len, int flags);
   int recvfrom(int fd, void *buf, int size, int flags, struct sockaddr *addr, socklen_t *addrlen);
 
-  int64_t write(int fd, void *buf, int len, void *pOLP = NULL);
+  int64_t write(int fd, void *buf, int len, void *pOLP = nullptr);
   int64_t writev(int fd, struct iovec *vector, size_t count);
   int64_t write_vector(int fd, struct iovec *vector, size_t count, void *pOLP = 0);
-  int64_t pwrite(int fd, void *buf, int len, off_t offset, char *tag = NULL);
+  int64_t pwrite(int fd, void *buf, int len, off_t offset, char *tag = nullptr);
 
   int send(int fd, void *buf, int len, int flags);
   int sendto(int fd, void *buf, int len, int flags, struct sockaddr const *to, int tolen);
diff --git a/iocore/eventsystem/I_Thread.h b/iocore/eventsystem/I_Thread.h
index 007a789d0fa..2b42b52a351 100644
--- a/iocore/eventsystem/I_Thread.h
+++ b/iocore/eventsystem/I_Thread.h
@@ -49,7 +49,7 @@
   in the Event Subsystem are registered with this key. Thus, whenever you
   call this_ethread() you get a pointer to EThread. If you happen to call
   this_ethread() from inside a thread which is not an EThread, you will
-  get a NULL value (since that thread will not be  registered with the
+  get a nullptr value (since that thread will not be  registered with the
   EThread key). This will hopefully make the use of this_ethread() safer.
   Note that an event created with EThread can also call this_thread(),
   in which case, it will get a pointer to Thread (rather than to EThread).
diff --git a/iocore/eventsystem/I_VConnection.h b/iocore/eventsystem/I_VConnection.h
index e7fb12a1b75..b7e890b3581 100644
--- a/iocore/eventsystem/I_VConnection.h
+++ b/iocore/eventsystem/I_VConnection.h
@@ -198,7 +198,7 @@ class VConnection : public Continuation
     @return VIO representing the scheduled IO operation.
 
   */
-  virtual VIO *do_io_read(Continuation *c = NULL, int64_t nbytes = INT64_MAX, MIOBuffer *buf = 0) = 0;
+  virtual VIO *do_io_read(Continuation *c = nullptr, int64_t nbytes = INT64_MAX, MIOBuffer *buf = 0) = 0;
 
   /**
     Write data to the VConnection.
@@ -248,7 +248,7 @@ class VConnection : public Continuation
     @return VIO representing the scheduled IO operation.
 
   */
-  virtual VIO *do_io_write(Continuation *c = NULL, int64_t nbytes = INT64_MAX, IOBufferReader *buf = 0, bool owner = false) = 0;
+  virtual VIO *do_io_write(Continuation *c = nullptr, int64_t nbytes = INT64_MAX, IOBufferReader *buf = 0, bool owner = false) = 0;
 
   /**
     Indicate that the VConnection is no longer needed.
@@ -314,7 +314,7 @@ class VConnection : public Continuation
   VConnection(Ptr &aMutex);
 
   /** @deprecated */
-  VIO *do_io(int op, Continuation *c = NULL, int64_t nbytes = INT64_MAX, MIOBuffer *buf = 0, int data = 0);
+  VIO *do_io(int op, Continuation *c = nullptr, int64_t nbytes = INT64_MAX, MIOBuffer *buf = 0, int data = 0);
 
   // Private
   // Set continuation on a given vio. The public interface
@@ -385,14 +385,14 @@ struct DummyVConnection : public VConnection {
   {
     ink_assert(!"VConnection::do_io_write -- "
                 "cannot use default implementation");
-    return NULL;
+    return nullptr;
   }
   virtual VIO *
   do_io_read(Continuation * /* c ATS_UNUSED */, int64_t /* nbytes ATS_UNUSED */, MIOBuffer * /* buf ATS_UNUSED */)
   {
     ink_assert(!"VConnection::do_io_read -- "
                 "cannot use default implementation");
-    return NULL;
+    return nullptr;
   }
   virtual void
   do_io_close(int /* alerrno ATS_UNUSED */)
diff --git a/iocore/eventsystem/PQ-List.cc b/iocore/eventsystem/PQ-List.cc
index 5710bf61783..100a597cbc2 100644
--- a/iocore/eventsystem/PQ-List.cc
+++ b/iocore/eventsystem/PQ-List.cc
@@ -46,7 +46,7 @@ PriorityEventQueue::check_ready(ink_hrtime now, EThread *t)
     Event *e;
     Que(Event, link) q = after[i];
     after[i].clear();
-    while ((e = q.dequeue()) != NULL) {
+    while ((e = q.dequeue()) != nullptr) {
       if (e->cancelled) {
         e->in_the_priority_queue = 0;
         e->cancelled             = 0;
diff --git a/iocore/eventsystem/P_Freer.h b/iocore/eventsystem/P_Freer.h
index b9d17eab4d7..837c31e1655 100644
--- a/iocore/eventsystem/P_Freer.h
+++ b/iocore/eventsystem/P_Freer.h
@@ -66,7 +66,7 @@ template  struct FreeCallContinuation : public Continuation {
     delete this;
     return EVENT_DONE;
   }
-  FreeCallContinuation(C *ap) : Continuation(NULL), p(ap) { SET_HANDLER(&FreeCallContinuation::dieEvent); }
+  FreeCallContinuation(C *ap) : Continuation(nullptr), p(ap) { SET_HANDLER(&FreeCallContinuation::dieEvent); }
 };
 
 template 
@@ -92,7 +92,7 @@ struct FreerContinuation : public Continuation {
     return EVENT_DONE;
   }
 
-  FreerContinuation(void *ap) : Continuation(NULL), p(ap) { SET_HANDLER((FreerContHandler)&FreerContinuation::dieEvent); }
+  FreerContinuation(void *ap) : Continuation(nullptr), p(ap) { SET_HANDLER((FreerContHandler)&FreerContinuation::dieEvent); }
 };
 
 TS_INLINE void
@@ -116,7 +116,7 @@ template  struct DereferContinuation : public Continuation {
     return EVENT_DONE;
   }
 
-  DereferContinuation(C *ap) : Continuation(NULL), p(ap) { SET_HANDLER(&DereferContinuation::dieEvent); }
+  DereferContinuation(C *ap) : Continuation(nullptr), p(ap) { SET_HANDLER(&DereferContinuation::dieEvent); }
 };
 
 template 
diff --git a/iocore/eventsystem/P_IOBuffer.h b/iocore/eventsystem/P_IOBuffer.h
index a1952d5be53..0f46a513532 100644
--- a/iocore/eventsystem/P_IOBuffer.h
+++ b/iocore/eventsystem/P_IOBuffer.h
@@ -71,8 +71,8 @@ index_to_buffer_size(int64_t idx)
 TS_INLINE IOBufferBlock *
 iobufferblock_clone(IOBufferBlock *src, int64_t offset, int64_t len)
 {
-  IOBufferBlock *start_buf   = NULL;
-  IOBufferBlock *current_buf = NULL;
+  IOBufferBlock *start_buf   = nullptr;
+  IOBufferBlock *current_buf = nullptr;
 
   while (src && len >= 0) {
     char *start       = src->_start;
@@ -416,7 +416,7 @@ IOBufferBlock::alloc(int64_t i)
 TS_INLINE void
 IOBufferBlock::clear()
 {
-  data = NULL;
+  data = nullptr;
 
   IOBufferBlock *p = next.get();
   while (p) {
@@ -436,7 +436,7 @@ IOBufferBlock::clear()
   // because we already manually did that.
   next.detach();
 
-  _buf_end = _end = _start = NULL;
+  _buf_end = _end = _start = nullptr;
 }
 
 TS_INLINE IOBufferBlock *
@@ -707,9 +707,9 @@ TS_INLINE char &IOBufferReader::operator[](int64_t i)
 TS_INLINE void
 IOBufferReader::clear()
 {
-  accessor     = NULL;
-  block        = NULL;
-  mbuf         = NULL;
+  accessor     = nullptr;
+  block        = nullptr;
+  mbuf         = nullptr;
   start_offset = 0;
   size_limit   = INT64_MAX;
 }
@@ -746,7 +746,7 @@ TS_INLINE
 MIOBuffer::MIOBuffer(void *b, int64_t bufsize, int64_t aWater_mark)
 {
 #ifdef TRACK_BUFFER_USER
-  _location = NULL;
+  _location = nullptr;
 #endif
   set(b, bufsize);
   water_mark = aWater_mark;
@@ -760,7 +760,7 @@ MIOBuffer::MIOBuffer(int64_t default_size_index)
   clear();
   size_index = default_size_index;
 #ifdef TRACK_BUFFER_USER
-  _location = NULL;
+  _location = nullptr;
 #endif
   return;
 }
@@ -770,7 +770,7 @@ MIOBuffer::MIOBuffer()
 {
   clear();
 #ifdef TRACK_BUFFER_USER
-  _location = NULL;
+  _location = nullptr;
 #endif
   return;
 }
@@ -778,7 +778,7 @@ MIOBuffer::MIOBuffer()
 TS_INLINE
 MIOBuffer::~MIOBuffer()
 {
-  _writer = NULL;
+  _writer = nullptr;
   dealloc_all_readers();
 }
 
@@ -800,7 +800,7 @@ new_MIOBuffer_internal(
 TS_INLINE void
 free_MIOBuffer(MIOBuffer *mio)
 {
-  mio->_writer = NULL;
+  mio->_writer = nullptr;
   mio->dealloc_all_readers();
   THREAD_FREE(mio, ioAllocator, this_thread());
 }
@@ -834,7 +834,7 @@ MIOBuffer::alloc_accessor(MIOBufferAccessor *anAccessor)
     if (!readers[i].allocated())
       break;
 
-  // TODO refactor code to return NULL at some point
+  // TODO refactor code to return nullptr at some point
   ink_release_assert(i < MAX_MIOBUFFER_READERS);
 
   IOBufferReader *e = &readers[i];
@@ -853,13 +853,13 @@ MIOBuffer::alloc_reader()
     if (!readers[i].allocated())
       break;
 
-  // TODO refactor code to return NULL at some point
+  // TODO refactor code to return nullptr at some point
   ink_release_assert(i < MAX_MIOBUFFER_READERS);
 
   IOBufferReader *e = &readers[i];
   e->mbuf           = this;
   e->reset();
-  e->accessor = NULL;
+  e->accessor = nullptr;
 
   return e;
 }
@@ -877,12 +877,12 @@ MIOBuffer::clone_reader(IOBufferReader *r)
     if (!readers[i].allocated())
       break;
 
-  // TODO refactor code to return NULL at some point
+  // TODO refactor code to return nullptr at some point
   ink_release_assert(i < MAX_MIOBUFFER_READERS);
 
   IOBufferReader *e = &readers[i];
   e->mbuf           = this;
-  e->accessor       = NULL;
+  e->accessor       = nullptr;
   e->block          = r->block;
   e->start_offset   = r->start_offset;
   e->size_limit     = r->size_limit;
@@ -1182,7 +1182,7 @@ MIOBufferAccessor::reader_for(MIOBuffer *abuf)
   if (abuf)
     entry = mbuf->alloc_accessor(this);
   else
-    entry = NULL;
+    entry = nullptr;
 }
 
 TS_INLINE void
@@ -1199,7 +1199,7 @@ TS_INLINE void
 MIOBufferAccessor::writer_for(MIOBuffer *abuf)
 {
   mbuf  = abuf;
-  entry = NULL;
+  entry = nullptr;
 }
 
 TS_INLINE
diff --git a/iocore/eventsystem/P_UnixEThread.h b/iocore/eventsystem/P_UnixEThread.h
index dd696c33290..92810a09d04 100644
--- a/iocore/eventsystem/P_UnixEThread.h
+++ b/iocore/eventsystem/P_UnixEThread.h
@@ -166,7 +166,7 @@ TS_INLINE void
 EThread::free_event(Event *e)
 {
   ink_assert(!e->in_the_priority_queue && !e->in_the_prot_queue);
-  e->mutex = NULL;
+  e->mutex = nullptr;
   EVENT_FREE(e, eventAllocator, this);
 }
 
diff --git a/iocore/eventsystem/P_UnixEvent.h b/iocore/eventsystem/P_UnixEvent.h
index a79cb88ddbf..830defddba5 100644
--- a/iocore/eventsystem/P_UnixEvent.h
+++ b/iocore/eventsystem/P_UnixEvent.h
@@ -38,7 +38,7 @@ Event::init(Continuation *c, ink_hrtime atimeout_at, ink_hrtime aperiod)
 TS_INLINE void
 Event::free()
 {
-  mutex = NULL;
+  mutex = nullptr;
   eventAllocator.free(this);
 }
 
diff --git a/iocore/eventsystem/P_VConnection.h b/iocore/eventsystem/P_VConnection.h
index f390a2a434e..ac8fbfcd414 100644
--- a/iocore/eventsystem/P_VConnection.h
+++ b/iocore/eventsystem/P_VConnection.h
@@ -104,22 +104,22 @@ VConnection::do_io(int op, Continuation *c, int64_t nbytes, MIOBuffer *cb, int d
     return vc_do_io_write(this, c, nbytes, cb, data);
   case VIO::CLOSE:
     do_io_close();
-    return NULL;
+    return nullptr;
   case VIO::ABORT:
     do_io_close(data);
-    return NULL;
+    return nullptr;
   case VIO::SHUTDOWN_READ:
     do_io_shutdown(IO_SHUTDOWN_READ);
-    return NULL;
+    return nullptr;
   case VIO::SHUTDOWN_WRITE:
     do_io_shutdown(IO_SHUTDOWN_WRITE);
-    return NULL;
+    return nullptr;
   case VIO::SHUTDOWN_READWRITE:
     do_io_shutdown(IO_SHUTDOWN_READWRITE);
-    return NULL;
+    return nullptr;
   }
   ink_assert(!"cannot use default implementation for do_io operation");
-  return NULL;
+  return nullptr;
 }
 
 TS_INLINE void
diff --git a/iocore/eventsystem/P_VIO.h b/iocore/eventsystem/P_VIO.h
index 19d39837705..a2e0a2c2611 100644
--- a/iocore/eventsystem/P_VIO.h
+++ b/iocore/eventsystem/P_VIO.h
@@ -26,7 +26,7 @@
 #include "I_VIO.h"
 
 TS_INLINE
-VIO::VIO(int aop) : _cont(NULL), nbytes(0), ndone(0), op(aop), buffer(), vc_server(0), mutex(0)
+VIO::VIO(int aop) : _cont(nullptr), nbytes(0), ndone(0), op(aop), buffer(), vc_server(0), mutex(0)
 {
 }
 
@@ -93,8 +93,8 @@ VIO::set_continuation(Continuation *acont)
     mutex = acont->mutex;
     _cont = acont;
   } else {
-    mutex = NULL;
-    _cont = NULL;
+    mutex = nullptr;
+    _cont = nullptr;
   }
   return;
 }
diff --git a/iocore/eventsystem/Processor.cc b/iocore/eventsystem/Processor.cc
index 5eb843d3427..4932fec600a 100644
--- a/iocore/eventsystem/Processor.cc
+++ b/iocore/eventsystem/Processor.cc
@@ -74,7 +74,7 @@ Thread *
 Processor::create_thread(int /* thread_index */)
 {
   ink_release_assert(!"Processor::create_thread -- no default implementation");
-  return ((Thread *)0);
+  return ((Thread *)nullptr);
 }
 
 //////////////////////////////////////////////////////////////////
diff --git a/iocore/eventsystem/ProtectedQueue.cc b/iocore/eventsystem/ProtectedQueue.cc
index bd56e981eed..80876d5d37b 100644
--- a/iocore/eventsystem/ProtectedQueue.cc
+++ b/iocore/eventsystem/ProtectedQueue.cc
@@ -49,7 +49,7 @@ ProtectedQueue::enqueue(Event *e, bool fast_signal)
   ink_assert(!e->in_the_prot_queue && !e->in_the_priority_queue);
   EThread *e_ethread   = e->ethread;
   e->in_the_prot_queue = 1;
-  bool was_empty       = (ink_atomiclist_push(&al, e) == NULL);
+  bool was_empty       = (ink_atomiclist_push(&al, e) == nullptr);
 
   if (was_empty) {
     EThread *inserting_thread = this_ethread();
@@ -90,7 +90,7 @@ ProtectedQueue::enqueue(Event *e, bool fast_signal)
               }
               // if not overwritten
               if (sig_e[i] && sig_e[i]->id != i)
-                sig_e[i] = 0;
+                sig_e[i] = nullptr;
             }
             t++;
           }
@@ -130,7 +130,7 @@ flush_signals(EThread *thr)
       thr->ethreads_to_be_signalled[i]->EventQueueExternal.signal();
       if (thr->ethreads_to_be_signalled[i]->signal_hook)
         thr->ethreads_to_be_signalled[i]->signal_hook(thr->ethreads_to_be_signalled[i]);
-      thr->ethreads_to_be_signalled[i] = 0;
+      thr->ethreads_to_be_signalled[i] = nullptr;
     }
   }
   thr->n_ethreads_to_be_signalled = 0;
@@ -161,7 +161,7 @@ ProtectedQueue::dequeue_timed(ink_hrtime cur_time, ink_hrtime timeout, bool slee
     if (!e->cancelled)
       localQueue.enqueue(e);
     else {
-      e->mutex = NULL;
+      e->mutex = nullptr;
       eventAllocator.free(e);
     }
   }
diff --git a/iocore/eventsystem/Thread.cc b/iocore/eventsystem/Thread.cc
index 180beadb19d..d0c3712b935 100644
--- a/iocore/eventsystem/Thread.cc
+++ b/iocore/eventsystem/Thread.cc
@@ -83,7 +83,7 @@ spawn_thread_internal(void *a)
   else
     p->me->execute();
   ats_free(a);
-  return NULL;
+  return nullptr;
 }
 
 ink_thread
diff --git a/iocore/eventsystem/UnixEThread.cc b/iocore/eventsystem/UnixEThread.cc
index 131bd69b813..8206e3f9fe4 100644
--- a/iocore/eventsystem/UnixEThread.cc
+++ b/iocore/eventsystem/UnixEThread.cc
@@ -43,11 +43,11 @@ bool shutdown_event_system = false;
 
 EThread::EThread()
   : generator((uint64_t)Thread::get_hrtime_updated() ^ (uint64_t)(uintptr_t)this),
-    ethreads_to_be_signalled(NULL),
+    ethreads_to_be_signalled(nullptr),
     n_ethreads_to_be_signalled(0),
     id(NO_ETHREAD_ID),
     event_types(0),
-    signal_hook(0),
+    signal_hook(nullptr),
     tt(REGULAR)
 {
   memset(thread_private, 0, PER_THREAD_DATA);
@@ -55,13 +55,13 @@ EThread::EThread()
 
 EThread::EThread(ThreadType att, int anid)
   : generator((uint64_t)Thread::get_hrtime_updated() ^ (uint64_t)(uintptr_t)this),
-    ethreads_to_be_signalled(NULL),
+    ethreads_to_be_signalled(nullptr),
     n_ethreads_to_be_signalled(0),
     id(anid),
     event_types(0),
-    signal_hook(0),
+    signal_hook(nullptr),
     tt(att),
-    server_session_pool(NULL)
+    server_session_pool(nullptr)
 {
   ethreads_to_be_signalled = (EThread **)ats_malloc(MAX_EVENT_THREADS * sizeof(EThread *));
   memset((char *)ethreads_to_be_signalled, 0, MAX_EVENT_THREADS * sizeof(EThread *));
@@ -90,12 +90,12 @@ EThread::EThread(ThreadType att, int anid)
 }
 
 EThread::EThread(ThreadType att, Event *e)
-  : generator((uint32_t)((uintptr_t)time(NULL) ^ (uintptr_t)this)),
-    ethreads_to_be_signalled(NULL),
+  : generator((uint32_t)((uintptr_t)time(nullptr) ^ (uintptr_t)this)),
+    ethreads_to_be_signalled(nullptr),
     n_ethreads_to_be_signalled(0),
     id(NO_ETHREAD_ID),
     event_types(0),
-    signal_hook(0),
+    signal_hook(nullptr),
     tt(att),
     oneevent(e)
 {
@@ -198,7 +198,7 @@ EThread::execute()
         } else if (e->timeout_at > 0) // INTERVAL
           EventQueue.enqueue(e, cur_time);
         else { // NEGATIVE
-          Event *p = NULL;
+          Event *p = nullptr;
           Event *a = NegativeQueue.head;
           while (a && a->timeout_at > e->timeout_at) {
             p = a;
@@ -250,7 +250,7 @@ EThread::execute()
               // more than one poll between two executions of a
               // negative event)
               if (e->timeout_at < 0) {
-                Event *p = NULL;
+                Event *p = nullptr;
                 Event *a = NegativeQueue.head;
                 while (a && a->timeout_at > e->timeout_at) {
                   p = a;
diff --git a/iocore/eventsystem/UnixEventProcessor.cc b/iocore/eventsystem/UnixEventProcessor.cc
index 49476e42ab6..853d347a13b 100644
--- a/iocore/eventsystem/UnixEventProcessor.cc
+++ b/iocore/eventsystem/UnixEventProcessor.cc
@@ -55,7 +55,7 @@ EventProcessor::spawn_event_threads(int n_threads, const char *et_name, size_t s
   n_threads_for_type[new_thread_group_id] = n_threads;
   for (i = 0; i < n_threads; i++) {
     snprintf(thr_name, MAX_THREAD_NAME_LENGTH, "[%s %d]", et_name, i);
-    eventthread[new_thread_group_id][i]->start(thr_name, stacksize, NULL, NULL, NULL);
+    eventthread[new_thread_group_id][i]->start(thr_name, stacksize, nullptr, nullptr, nullptr);
   }
 
   n_thread_groups++;
@@ -68,13 +68,13 @@ EventProcessor::spawn_event_threads(int n_threads, const char *et_name, size_t s
 static void *
 alloc_stack(size_t stacksize)
 {
-  void *stack = NULL;
+  void *stack = nullptr;
 
   if (ats_hugepage_enabled()) {
     stack = ats_alloc_hugepage(stacksize);
   }
 
-  if (stack == NULL) {
+  if (stack == nullptr) {
     stack = ats_memalign(ats_pagesize(), stacksize);
   }
 
@@ -88,7 +88,7 @@ alloc_numa_stack(hwloc_cpuset_t cpuset, size_t stacksize)
   hwloc_membind_policy_t mem_policy = HWLOC_MEMBIND_DEFAULT;
   hwloc_nodeset_t nodeset           = hwloc_bitmap_alloc();
   int num_nodes                     = 0;
-  void *stack                       = NULL;
+  void *stack                       = nullptr;
 
   // Find the NUMA node set that correlates to our next thread CPU set
   hwloc_cpuset_to_nodeset(ink_get_topology(), cpuset, nodeset);
@@ -130,7 +130,7 @@ EventProcessor::start(int n_event_threads, size_t stacksize)
 {
   char thr_name[MAX_THREAD_NAME_LENGTH];
   int i;
-  void *stack = NULL;
+  void *stack = nullptr;
 
   // do some sanity checking.
   static int started = 0;
@@ -211,7 +211,7 @@ EventProcessor::start(int n_event_threads, size_t stacksize)
       obj = hwloc_get_obj_by_type(ink_get_topology(), obj_type, i % obj_count);
 #if HWLOC_API_VERSION >= 0x00010100
       // Pretty print our CPU set
-      int cpu_mask_len = hwloc_bitmap_snprintf(NULL, 0, obj->cpuset) + 1;
+      int cpu_mask_len = hwloc_bitmap_snprintf(nullptr, 0, obj->cpuset) + 1;
       char *cpu_mask   = (char *)alloca(cpu_mask_len);
       hwloc_bitmap_snprintf(cpu_mask, cpu_mask_len, obj->cpuset);
       Debug("iocore_thread", "EThread: %d %s: %d CPU Mask: %s", i, obj_name, obj->logical_index, cpu_mask);
@@ -237,8 +237,8 @@ EventProcessor::start(int n_event_threads, size_t stacksize)
 #endif // TS_USE_HWLOC
 
     // Start our new thread with our new stack.
-    tid   = all_ethreads[i]->start(thr_name, stacksize, NULL, NULL, stack);
-    stack = NULL;
+    tid   = all_ethreads[i]->start(thr_name, stacksize, nullptr, nullptr, stack);
+    stack = nullptr;
 
 #if TS_USE_HWLOC
     if (obj_count > 0) {
@@ -273,7 +273,7 @@ EventProcessor::spawn_thread(Continuation *cont, const char *thr_name, size_t st
   e->ethread               = all_dthreads[n_dthreads];
   e->mutex = e->continuation->mutex = all_dthreads[n_dthreads]->mutex;
   n_dthreads++;
-  e->ethread->start(thr_name, stacksize, NULL, NULL, NULL);
+  e->ethread->start(thr_name, stacksize, nullptr, nullptr, nullptr);
 
   return e;
 }
diff --git a/iocore/eventsystem/test_Buffer.cc b/iocore/eventsystem/test_Buffer.cc
index befee33d4ee..c14a228ee0a 100644
--- a/iocore/eventsystem/test_Buffer.cc
+++ b/iocore/eventsystem/test_Buffer.cc
@@ -36,7 +36,7 @@ main(int /* argc ATS_UNUSED */, const char * /* argv ATS_UNUSED */ [])
   RecModeT mode_type = RECM_STAND_ALONE;
 
   Layout::create();
-  init_diags("", NULL);
+  init_diags("", nullptr);
   RecProcessInit(mode_type);
 
   ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
diff --git a/iocore/eventsystem/test_Event.cc b/iocore/eventsystem/test_Event.cc
index ef53b82365f..e5c92871b5b 100644
--- a/iocore/eventsystem/test_Event.cc
+++ b/iocore/eventsystem/test_Event.cc
@@ -63,7 +63,7 @@ main(int /* argc ATS_UNUSED */, const char * /* argv ATS_UNUSED */ [])
   count              = 0;
 
   Layout::create();
-  init_diags("", NULL);
+  init_diags("", nullptr);
   RecProcessInit(mode_type);
 
   ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index f36185b75ff..54238e7bbad 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -81,7 +81,7 @@ char *
 HostDBInfo::srvname(HostDBRoundRobin *rr) const
 {
   if (!is_srv || !data.srv.srv_offset)
-    return NULL;
+    return nullptr;
   return (char *)rr + data.srv.srv_offset;
 }
 
@@ -127,8 +127,8 @@ hostdb_cont_free(HostDBContinuation *cont)
 {
   if (cont->pending_action)
     cont->pending_action->cancel();
-  cont->mutex        = 0;
-  cont->action.mutex = 0;
+  cont->mutex        = nullptr;
+  cont->action.mutex = nullptr;
   hostDBContAllocator.free(cont);
 }
 
@@ -181,7 +181,7 @@ HostDBMD5::set_host(const char *name, int len)
         dns_server = static_cast(pSD->getDNSRecord(host_name));
       }
     } else {
-      dns_server = 0;
+      dns_server = nullptr;
     }
   }
 #endif // SPLIT_DNS
@@ -194,7 +194,7 @@ HostDBMD5::refresh()
   MD5Context ctx;
 
   if (host_name) {
-    const char *server_line = dns_server ? dns_server->x_dns_ip_line : 0;
+    const char *server_line = dns_server ? dns_server->x_dns_ip_line : nullptr;
     uint8_t m               = static_cast(db_mark); // be sure of the type.
 
     ctx.update(host_name, host_len);
@@ -216,7 +216,7 @@ HostDBMD5::refresh()
   ctx.finalize(hash);
 }
 
-HostDBMD5::HostDBMD5() : host_name(0), host_len(0), port(0), dns_server(0), pSD(0), db_mark(HOSTDB_MARK_GENERIC)
+HostDBMD5::HostDBMD5() : host_name(nullptr), host_len(0), port(0), dns_server(nullptr), pSD(nullptr), db_mark(HOSTDB_MARK_GENERIC)
 {
 }
 
@@ -226,7 +226,7 @@ HostDBMD5::~HostDBMD5()
     SplitDNSConfig::release(pSD);
 }
 
-HostDBCache::HostDBCache() : refcountcache(NULL), pending_dns(NULL), remoteHostDBQueue(NULL)
+HostDBCache::HostDBCache() : refcountcache(nullptr), pending_dns(nullptr), remoteHostDBQueue(nullptr)
 {
   hosts_file_ptr = new RefCountedHostsFileMap();
 }
@@ -445,15 +445,15 @@ HostDBContinuation::refresh_MD5()
 static bool
 reply_to_cont(Continuation *cont, HostDBInfo *r, bool is_srv = false)
 {
-  if (r == NULL || r->is_srv != is_srv || r->is_failed()) {
-    cont->handleEvent(is_srv ? EVENT_SRV_LOOKUP : EVENT_HOST_DB_LOOKUP, NULL);
+  if (r == nullptr || r->is_srv != is_srv || r->is_failed()) {
+    cont->handleEvent(is_srv ? EVENT_SRV_LOOKUP : EVENT_HOST_DB_LOOKUP, nullptr);
     return false;
   }
 
   if (r->reverse_dns) {
     if (!r->hostname()) {
       ink_assert(!"missing hostname");
-      cont->handleEvent(is_srv ? EVENT_SRV_LOOKUP : EVENT_HOST_DB_LOOKUP, NULL);
+      cont->handleEvent(is_srv ? EVENT_SRV_LOOKUP : EVENT_HOST_DB_LOOKUP, nullptr);
       Warning("bogus entry deleted from HostDB: missing hostname");
       hostDB.refcountcache->erase(r->key);
       return false;
@@ -464,7 +464,7 @@ reply_to_cont(Continuation *cont, HostDBInfo *r, bool is_srv = false)
   if (!r->is_srv && r->round_robin) {
     if (!r->rr()) {
       ink_assert(!"missing round-robin");
-      cont->handleEvent(is_srv ? EVENT_SRV_LOOKUP : EVENT_HOST_DB_LOOKUP, NULL);
+      cont->handleEvent(is_srv ? EVENT_SRV_LOOKUP : EVENT_HOST_DB_LOOKUP, nullptr);
       Warning("bogus entry deleted from HostDB: missing round-robin");
       hostDB.refcountcache->erase(r->key);
       return false;
@@ -528,17 +528,17 @@ probe(ProxyMutex *mutex, HostDBMD5 const &md5, bool ignore_timeout)
   // get the item from cache
   Ptr r = hostDB.refcountcache->get(folded_md5);
   // If there was nothing in the cache-- this is a miss
-  if (r.get() == NULL) {
+  if (r.get() == nullptr) {
     return r;
   }
 
   // If the dns response was failed, and we've hit the failed timeout, lets stop returning it
   if (r->is_failed() && r->is_ip_fail_timeout()) {
-    return make_ptr((HostDBInfo *)NULL);
+    return make_ptr((HostDBInfo *)nullptr);
     // if we aren't ignoring timeouts, and we are past it-- then remove the item
   } else if (!ignore_timeout && r->is_ip_timeout() && !r->serve_stale_but_revalidate()) {
     HOSTDB_INCREMENT_DYN_STAT(hostdb_ttl_expires_stat);
-    return make_ptr((HostDBInfo *)NULL);
+    return make_ptr((HostDBInfo *)nullptr);
   }
 
   // If the record is stale, but we want to revalidate-- lets start that up
@@ -596,7 +596,7 @@ HostDBProcessor::getby(Continuation *cont, const char *hostname, int len, sockad
     MUTEX_TRY_LOCK(lock, cont->mutex, thread);
     if (!lock.is_locked())
       goto Lretry;
-    cont->handleEvent(EVENT_HOST_DB_LOOKUP, NULL);
+    cont->handleEvent(EVENT_HOST_DB_LOOKUP, nullptr);
     return ACTION_RESULT_DONE;
   }
 
@@ -682,7 +682,7 @@ HostDBProcessor::getbyname_re(Continuation *cont, const char *ahostname, int len
     if (force_dns)
       HOSTDB_INCREMENT_DYN_STAT(hostdb_re_dns_on_reload_stat);
   }
-  return getby(cont, ahostname, len, 0, force_dns, opt.host_res_style, opt.timeout);
+  return getby(cont, ahostname, len, nullptr, force_dns, opt.host_res_style, opt.timeout);
 }
 
 Action *
@@ -727,7 +727,7 @@ HostDBProcessor::getSRVbyname_imm(Continuation *cont, process_srv_info_pfn proce
   HOSTDB_INCREMENT_DYN_STAT(hostdb_total_lookups_stat);
 
   if (!hostdb_enable || !*hostname) {
-    (cont->*process_srv_info)(NULL);
+    (cont->*process_srv_info)(nullptr);
     return ACTION_RESULT_DONE;
   }
 
@@ -799,7 +799,7 @@ HostDBProcessor::getbyname_imm(Continuation *cont, process_hostdb_info_pfn proce
   HOSTDB_INCREMENT_DYN_STAT(hostdb_total_lookups_stat);
 
   if (!hostdb_enable || !*hostname) {
-    (cont->*process_hostdb_info)(NULL);
+    (cont->*process_hostdb_info)(nullptr);
     return ACTION_RESULT_DONE;
   }
 
@@ -1030,7 +1030,7 @@ HostDBContinuation::removeEvent(int /* event ATS_UNUSED */, Event *e)
 {
   Continuation *cont = action.continuation;
 
-  MUTEX_TRY_LOCK(lock, cont ? cont->mutex.get() : (ProxyMutex *)NULL, e->ethread);
+  MUTEX_TRY_LOCK(lock, cont ? cont->mutex.get() : (ProxyMutex *)nullptr, e->ethread);
   if (!lock.is_locked()) {
     e->schedule_in(HOST_DB_RETRY_PERIOD);
     return EVENT_CONT;
@@ -1038,12 +1038,12 @@ HostDBContinuation::removeEvent(int /* event ATS_UNUSED */, Event *e)
   if (!action.cancelled) {
     if (!hostdb_enable) {
       if (cont)
-        cont->handleEvent(EVENT_HOST_DB_IP_REMOVED, (void *)NULL);
+        cont->handleEvent(EVENT_HOST_DB_IP_REMOVED, (void *)nullptr);
     } else {
       Ptr r = probe(mutex.get(), md5, false);
       bool res          = remove_round_robin(r.get(), md5.host_name, md5.ip);
       if (cont)
-        cont->handleEvent(EVENT_HOST_DB_IP_REMOVED, res ? static_cast(&md5.ip) : static_cast(NULL));
+        cont->handleEvent(EVENT_HOST_DB_IP_REMOVED, res ? static_cast(&md5.ip) : static_cast(nullptr));
     }
   }
   hostdb_cont_free(this);
@@ -1068,7 +1068,7 @@ HostDBContinuation::lookup_done(IpAddr const &ip, const char *aname, bool around
       ip_text_buffer b;
       Debug("hostdb", "failed for %s", md5.ip.toString(b, sizeof b));
     }
-    if (r == NULL) {
+    if (r == nullptr) {
       r = insert(hostdb_ip_fail_timeout_interval); // currently ... 0
     } else {
       ttl_seconds = hostdb_ip_fail_timeout_interval;
@@ -1107,7 +1107,7 @@ HostDBContinuation::lookup_done(IpAddr const &ip, const char *aname, bool around
     if (0 == ttl_seconds)
       ttl_seconds = 1;
 
-    if (r == NULL) {
+    if (r == nullptr) {
       r = insert(hostdb_ip_fail_timeout_interval); // currently ... 0
     }
     r->round_robin_elt = false; // only true for elements explicitly added as RR elements.
@@ -1161,7 +1161,7 @@ HostDBContinuation::dnsPendingEvent(int event, Event *e)
   ink_assert(this_ethread() == hostDB.refcountcache->lock_for_key(md5.hash.fold())->thread_holding);
   if (timeout) {
     timeout->cancel(this);
-    timeout = NULL;
+    timeout = nullptr;
   }
   if (event == EVENT_INTERVAL) {
     // we timed out, return a failure to the user
@@ -1171,13 +1171,13 @@ HostDBContinuation::dnsPendingEvent(int event, Event *e)
       return EVENT_CONT;
     }
     if (!action.cancelled && action.continuation)
-      action.continuation->handleEvent(EVENT_HOST_DB_LOOKUP, NULL);
+      action.continuation->handleEvent(EVENT_HOST_DB_LOOKUP, nullptr);
     hostDB.pending_dns_for_hash(md5.hash).remove(this);
     hostdb_cont_free(this);
     return EVENT_DONE;
   } else {
     SET_HANDLER((HostDBContHandler)&HostDBContinuation::probeEvent);
-    return probeEvent(EVENT_INTERVAL, NULL);
+    return probeEvent(EVENT_INTERVAL, nullptr);
   }
 }
 
@@ -1207,7 +1207,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
   ink_assert(this_ethread() == hostDB.refcountcache->lock_for_key(md5.hash.fold())->thread_holding);
   if (timeout) {
     timeout->cancel(this);
-    timeout = NULL;
+    timeout = nullptr;
   }
   EThread *thread = mutex->thread_holding;
   if (event == EVENT_INTERVAL) {
@@ -1227,8 +1227,8 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
     // a server issue that won't be fixed by asking for a different
     // address family.
     if (!action.cancelled && action.continuation)
-      action.continuation->handleEvent(EVENT_HOST_DB_LOOKUP, NULL);
-    action = NULL;
+      action.continuation->handleEvent(EVENT_HOST_DB_LOOKUP, nullptr);
+    action = nullptr;
     // do not exit yet, wait to see if we can insert into DB
     timeout = thread->schedule_in(this, HRTIME_SECONDS(hostdb_insert_timeout));
     return EVENT_DONE;
@@ -1236,12 +1236,12 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
     bool failed = !e;
 
     bool is_rr     = false;
-    pending_action = NULL;
+    pending_action = nullptr;
 
     if (is_srv()) {
       is_rr = !failed && (e->srv_hosts.srv_host_count > 0);
     } else if (!failed) {
-      is_rr = 0 != e->ent.h_addr_list[1];
+      is_rr = nullptr != e->ent.h_addr_list[1];
     } else {
     }
 
@@ -1252,9 +1252,9 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
     HostDBInfo old_info;
     if (old_r)
       old_info                    = *old_r.get();
-    HostDBRoundRobin *old_rr_data = old_r ? old_r->rr() : NULL;
+    HostDBRoundRobin *old_rr_data = old_r ? old_r->rr() : nullptr;
     int valid_records             = 0;
-    void *first_record            = 0;
+    void *first_record            = nullptr;
     uint8_t af                    = e ? e->ent.h_addrtype : AF_UNSPEC; // address family
     // if this is an RR response, we need to find the first record, as well as the
     // total number of records
@@ -1263,7 +1263,8 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
         valid_records = e->srv_hosts.srv_host_count;
       } else {
         void *ptr; // tmp for current entry.
-        for (int total_records = 0; total_records < HOST_DB_MAX_ROUND_ROBIN_INFO && 0 != (ptr = e->ent.h_addr_list[total_records]);
+        for (int total_records = 0;
+             total_records < HOST_DB_MAX_ROUND_ROBIN_INFO && nullptr != (ptr = e->ent.h_addr_list[total_records]);
              ++total_records) {
           if (is_addr_valid(af, ptr)) {
             if (!first_record) {
@@ -1319,7 +1320,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
     } else if (is_byname()) {
       if (first_record)
         ip_addr_set(tip, af, first_record);
-      r = lookup_done(tip, md5.host_name, is_rr, ttl_seconds, failed ? 0 : &e->srv_hosts, r);
+      r = lookup_done(tip, md5.host_name, is_rr, ttl_seconds, failed ? nullptr : &e->srv_hosts, r);
     } else if (is_srv()) {
       if (!failed)
         tip._family = AF_INET;         // force the tip valid, or else the srv will fail
@@ -1327,9 +1328,9 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
                       md5.host_name,   /* hostname */
                       is_rr,           /* is round robin, doesnt matter for SRV since we recheck getCount() inside lookup_done() */
                       ttl_seconds,     /* ttl in seconds */
-                      failed ? 0 : &e->srv_hosts, r);
+                      failed ? nullptr : &e->srv_hosts, r);
     } else if (failed) {
-      r = lookup_done(tip, md5.host_name, false, ttl_seconds, 0, r);
+      r = lookup_done(tip, md5.host_name, false, ttl_seconds, nullptr, r);
     } else {
       r = lookup_done(md5.ip, e->ent.h_name, false, ttl_seconds, &e->srv_hosts, r);
     }
@@ -1428,7 +1429,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
     ClusterMachine *m = cluster_machine_at_depth(master_hash(md5.hash));
 
     if (m)
-      do_put_response(m, r, NULL);
+      do_put_response(m, r, nullptr);
 
     // try to callback the user
     //
@@ -1506,7 +1507,7 @@ HostDBContinuation::do_get_response(Event * /* e ATS_UNUSED */)
 
   // find an appropriate Machine
   //
-  ClusterMachine *m = NULL;
+  ClusterMachine *m = nullptr;
 
   if (hostdb_migrate_on_demand) {
     m = cluster_machine_at_depth(master_hash(md5.hash), &probe_depth, past_probes);
@@ -1639,7 +1640,7 @@ HostDBContinuation::iterateEvent(int event, Event *e)
   } else {
     Debug("hostdb", "iterateEvent event=%d eventp=%p: completed FINAL iteration %ld", event, e, current_iterate_pos);
     // if there are no more buckets, then we're done.
-    action.continuation->handleEvent(EVENT_DONE, NULL);
+    action.continuation->handleEvent(EVENT_DONE, nullptr);
     hostdb_cont_free(this);
   }
 
@@ -1685,9 +1686,9 @@ HostDBContinuation::probeEvent(int /* event ATS_UNUSED */, Event *e)
 
   if (!hostdb_enable || (!*md5.host_name && !md5.ip.isValid())) {
     if (action.continuation)
-      action.continuation->handleEvent(EVENT_HOST_DB_LOOKUP, NULL);
+      action.continuation->handleEvent(EVENT_HOST_DB_LOOKUP, nullptr);
     if (from)
-      do_put_response(from, 0, from_cont);
+      do_put_response(from, nullptr, from_cont);
     hostdb_cont_free(this);
     return EVENT_DONE;
   }
@@ -1758,7 +1759,7 @@ HostDBContinuation::remove_trigger_pending_dns()
     c = n;
   }
   while ((c = qq.dequeue()))
-    c->handleEvent(EVENT_IMMEDIATE, NULL);
+    c->handleEvent(EVENT_IMMEDIATE, nullptr);
 }
 
 //
@@ -1774,7 +1775,7 @@ HostDBContinuation::do_dns()
     if (0 == tip.load(md5.host_name)) {
       // check 127.0.0.1 format // What the heck does that mean? - AMC
       if (action.continuation) {
-        HostDBInfo *r = lookup_done(tip, md5.host_name, false, HOST_DB_MAX_TTL, NULL);
+        HostDBInfo *r = lookup_done(tip, md5.host_name, false, HOST_DB_MAX_TTL, nullptr);
 
         reply_to_cont(action.continuation, r);
       }
@@ -1787,8 +1788,8 @@ HostDBContinuation::do_dns()
     if (find_result != current_host_file_map->hosts_file_map.end()) {
       if (action.continuation) {
         // Set the TTL based on how much time remains until the next sync
-        HostDBInfo *r =
-          lookup_done(IpAddr(find_result->second), md5.host_name, false, current_host_file_map->next_sync_time - ink_time(), NULL);
+        HostDBInfo *r = lookup_done(IpAddr(find_result->second), md5.host_name, false,
+                                    current_host_file_map->next_sync_time - ink_time(), nullptr);
         reply_to_cont(action.continuation, r);
       }
       hostdb_cont_free(this);
@@ -1798,7 +1799,7 @@ HostDBContinuation::do_dns()
   if (hostdb_lookup_timeout) {
     timeout = mutex->thread_holding->schedule_in(this, HRTIME_SECONDS(hostdb_lookup_timeout));
   } else {
-    timeout = NULL;
+    timeout = nullptr;
   }
   if (set_check_pending_dns()) {
     DNSProcessor::Options opt;
@@ -1838,7 +1839,7 @@ HostDBContinuation::clusterResponseEvent(int /*  event ATS_UNUSED */, Event *e)
     //
     if (c) {
       action    = c;
-      from_cont = 0;
+      from_cont = nullptr;
       MUTEX_TRY_LOCK(lock, c->mutex, e->ethread);
       MUTEX_TRY_LOCK(lock2, c->action.mutex, e->ethread);
       if (!lock.is_locked() || !lock2.is_locked()) {
@@ -1846,13 +1847,13 @@ HostDBContinuation::clusterResponseEvent(int /*  event ATS_UNUSED */, Event *e)
         return EVENT_CONT;
       }
       bool failed = missing || (round_robin && !hostdb_cluster_round_robin);
-      action.continuation->handleEvent(EVENT_HOST_DB_GET_RESPONSE, failed ? 0 : this);
+      action.continuation->handleEvent(EVENT_HOST_DB_GET_RESPONSE, failed ? nullptr : this);
     }
   } else {
-    action = 0;
+    action = nullptr;
     // just a remote fill
     ink_assert(!missing);
-    lookup_done(md5.ip, md5.host_name, false, ttl, NULL);
+    lookup_done(md5.ip, md5.host_name, false, ttl, nullptr);
   }
   hostdb_cont_free(this);
   return EVENT_DONE;
@@ -1879,11 +1880,11 @@ HostDBContinuation::clusterEvent(int event, Event *e)
   case EVENT_HOST_DB_GET_RESPONSE:
     if (timeout) {
       timeout->cancel(this);
-      timeout = NULL;
+      timeout = nullptr;
     }
     if (e) {
       HostDBContinuation *c         = (HostDBContinuation *)e;
-      HostDBInfo *r                 = lookup_done(md5.ip, c->md5.host_name, false, c->ttl, NULL);
+      HostDBInfo *r                 = lookup_done(md5.ip, c->md5.host_name, false, c->ttl, nullptr);
       r->app.allotment.application1 = c->app.allotment.application1;
       r->app.allotment.application2 = c->app.allotment.application2;
 
@@ -1897,7 +1898,7 @@ HostDBContinuation::clusterEvent(int event, Event *e)
           if (hostdb_migrate_on_demand) {
             ClusterMachine *m = cluster_machine_at_depth(master_hash(md5.hash));
             if (m && m != c->from)
-              do_put_response(m, r, NULL);
+              do_put_response(m, r, nullptr);
           }
         }
       }
@@ -1950,12 +1951,12 @@ get_hostinfo_ClusterFunction(ClusterHandler *ch, void *data, int /* len ATS_UNUS
   md5.hash    = msg->md5;
   md5.db_mark = db_mark_for(&msg->ip.sa);
 #ifdef SPLIT_DNS
-  SplitDNS *pSD  = 0;
+  SplitDNS *pSD  = nullptr;
   char *hostname = msg->name;
   if (hostname && SplitDNSConfig::isSplitDNSEnabled()) {
     pSD = SplitDNSConfig::acquire();
 
-    if (0 != pSD) {
+    if (nullptr != pSD) {
       md5.dns_server = static_cast(pSD->getDNSRecord(hostname));
     }
     SplitDNSConfig::release(pSD);
@@ -2065,7 +2066,7 @@ char *
 HostDBInfo::hostname() const
 {
   if (!reverse_dns)
-    return NULL;
+    return nullptr;
 
   return (char *)this + data.hostname_offset;
 }
@@ -2077,7 +2078,7 @@ char *
 HostDBInfo::perm_hostname() const
 {
   if (hostname_offset == 0)
-    return NULL;
+    return nullptr;
 
   return (char *)this + hostname_offset;
 }
@@ -2086,7 +2087,7 @@ HostDBRoundRobin *
 HostDBInfo::rr()
 {
   if (!round_robin)
-    return NULL;
+    return nullptr;
 
   return (HostDBRoundRobin *)((char *)this + this->app.rr.offset);
 }
@@ -2215,7 +2216,7 @@ struct ShowHostDB : public ShowCont {
   }
 
   int
-  showOne(HostDBInfo *r, bool rr, int event, Event *e, HostDBRoundRobin *hostdb_rr = NULL)
+  showOne(HostDBInfo *r, bool rr, int event, Event *e, HostDBRoundRobin *hostdb_rr = nullptr)
   {
     ip_text_buffer b;
     if (!output_json) {
@@ -2318,7 +2319,7 @@ struct ShowHostDB : public ShowCont {
     return complete(event, e);
   }
 
-  ShowHostDB(Continuation *c, HTTPHdr *h) : ShowCont(c, h), name(0), port(0), force(0), output_json(false), records_seen(0)
+  ShowHostDB(Continuation *c, HTTPHdr *h) : ShowCont(c, h), name(nullptr), port(0), force(0), output_json(false), records_seen(0)
   {
     ats_ip_invalidate(&ip);
     SET_HANDLER(&ShowHostDB::showMain);
@@ -2340,7 +2341,7 @@ register_ShowHostDB(Continuation *c, HTTPHdr *h)
     int query_len;
     const char *query = h->url_get()->query_get(&query_len);
     s->sarg           = ats_strndup(query, query_len);
-    char *gn          = NULL;
+    char *gn          = nullptr;
     if (s->sarg)
       gn = (char *)memchr(s->sarg, '=', strlen(s->sarg));
     if (gn) {
@@ -2352,13 +2353,13 @@ register_ShowHostDB(Continuation *c, HTTPHdr *h)
     int query_len;
     const char *query = h->url_get()->query_get(&query_len);
     s->sarg           = ats_strndup(query, query_len);
-    char *gn          = NULL;
+    char *gn          = nullptr;
     if (s->sarg)
       gn = (char *)memchr(s->sarg, '=', strlen(s->sarg));
     if (gn) {
       s->name   = gn + 1;
       char *pos = strstr(s->name, "%3A");
-      if (pos != NULL) {
+      if (pos != nullptr) {
         s->port = atoi(pos + 3);
         *pos    = '\0'; // Null terminate name
       } else {
@@ -2433,9 +2434,9 @@ struct HostDBTestReverse : public Continuation {
   {
     SET_HANDLER((HostDBTestReverseHandler)&HostDBTestReverse::mainEvent);
 #if HAVE_SRAND48_R
-    srand48_r(time(NULL), &dr);
+    srand48_r(time(nullptr), &dr);
 #else
-    srand48(time(NULL));
+    srand48(time(nullptr));
 #endif
   }
 };
@@ -2502,7 +2503,7 @@ struct HostDBFileContinuation : public Continuation {
   Keys *keys;          ///< Entries from file.
   ats_scoped_str path; ///< Used to keep the host file name around.
 
-  HostDBFileContinuation() : Continuation(0) {}
+  HostDBFileContinuation() : Continuation(nullptr) {}
   /// Finish update
   static void finish(Keys *keys ///< Valid keys from update.
                      );
@@ -2585,7 +2586,7 @@ ParseHostFile(const char *path, unsigned int hostdb_hostfile_check_interval)
             char *spot = strchr(base, '\n');
 
             // terminate the line.
-            if (0 == spot)
+            if (nullptr == spot)
               spot = limit; // no trailing EOL, grab remaining
             else
               *spot = 0;
@@ -2638,7 +2639,7 @@ struct HostDBRegressionContinuation : public Continuation {
     }
     if (event == EVENT_HOST_DB_LOOKUP) {
       --outstanding;
-      // since this is a lookup done, data is either hostdbInfo or NULL
+      // since this is a lookup done, data is either hostdbInfo or nullptr
       if (r) {
         rprintf(test, "hostdbinfo r=%x\n", r);
         rprintf(test, "hostdbinfo hostname=%s\n", r->perm_hostname());
diff --git a/iocore/hostdb/I_HostDBProcessor.h b/iocore/hostdb/I_HostDBProcessor.h
index 8bc38515002..d4e5e06bf7a 100644
--- a/iocore/hostdb/I_HostDBProcessor.h
+++ b/iocore/hostdb/I_HostDBProcessor.h
@@ -175,7 +175,7 @@ struct HostDBInfo : public RefCountObj {
   unmarshall(char *buf, unsigned int size)
   {
     if (size < sizeof(HostDBInfo)) {
-      return NULL;
+      return nullptr;
     }
     HostDBInfo *ret = HostDBInfo::alloc(size - sizeof(HostDBInfo));
     int buf_index   = ret->iobuffer_index;
@@ -386,7 +386,7 @@ struct HostDBRoundRobin {
   HostDBInfo *find_target(const char *target);
   /** Select the next entry after @a addr.
       @note If @a addr isn't an address in the round robin nothing is updated.
-      @return The selected entry or @c NULL if @a addr wasn't present.
+      @return The selected entry or @c nullptr if @a addr wasn't present.
    */
   HostDBInfo *select_next(sockaddr const *addr);
   HostDBInfo *select_best_http(sockaddr const *client_ip, ink_time_t now, int32_t fail_window);
@@ -462,7 +462,7 @@ struct HostDBProcessor : public Processor {
   Action *
   getbyaddr_re(Continuation *cont, sockaddr const *aip)
   {
-    return getby(cont, NULL, 0, aip, false, HOST_RES_NONE, 0);
+    return getby(cont, nullptr, 0, aip, false, HOST_RES_NONE, 0);
   }
 
   /** Set the application information (fire-and-forget). */
diff --git a/iocore/hostdb/P_HostDBProcessor.h b/iocore/hostdb/P_HostDBProcessor.h
index ed7d21bb4cd..17f56a3053a 100644
--- a/iocore/hostdb/P_HostDBProcessor.h
+++ b/iocore/hostdb/P_HostDBProcessor.h
@@ -230,7 +230,7 @@ inline HostDBInfo *
 HostDBRoundRobin::find_ip(sockaddr const *ip)
 {
   int idx = this->index_of(ip);
-  return idx < 0 ? NULL : &info(idx);
+  return idx < 0 ? nullptr : &info(idx);
 }
 
 inline HostDBInfo *
@@ -253,7 +253,7 @@ HostDBRoundRobin::find_target(const char *target)
   bool bad = (rrcount <= 0 || rrcount > HOST_DB_MAX_ROUND_ROBIN_INFO || good <= 0 || good > HOST_DB_MAX_ROUND_ROBIN_INFO);
   if (bad) {
     ink_assert(!"bad round robin size");
-    return NULL;
+    return nullptr;
   }
 
   uint32_t key = makeHostHash(target);
@@ -261,7 +261,7 @@ HostDBRoundRobin::find_target(const char *target)
     if (info(i).data.srv.key == key && !strcmp(target, info(i).srvname(this)))
       return &info(i);
   }
-  return NULL;
+  return nullptr;
 }
 
 inline HostDBInfo *
@@ -271,7 +271,7 @@ HostDBRoundRobin::select_best_http(sockaddr const *client_ip, ink_time_t now, in
 
   if (bad) {
     ink_assert(!"bad round robin size");
-    return NULL;
+    return nullptr;
   }
 
   int best_any = 0;
@@ -340,7 +340,7 @@ HostDBRoundRobin::select_best_srv(char *target, InkRand *rand, ink_time_t now, i
 
   if (bad) {
     ink_assert(!"bad round robin size");
-    return NULL;
+    return nullptr;
   }
 
 #ifdef DEBUG
@@ -351,7 +351,7 @@ HostDBRoundRobin::select_best_srv(char *target, InkRand *rand, ink_time_t now, i
 
   int i = 0, len = 0;
   uint32_t weight = 0, p = INT32_MAX;
-  HostDBInfo *result = NULL;
+  HostDBInfo *result = nullptr;
   HostDBInfo *infos[HOST_DB_MAX_ROUND_ROBIN_INFO];
 
   do {
@@ -384,7 +384,7 @@ HostDBRoundRobin::select_best_srv(char *target, InkRand *rand, ink_time_t now, i
     strcpy(target, result->srvname(this));
     return result;
   }
-  return NULL;
+  return nullptr;
 }
 
 //
@@ -482,8 +482,8 @@ struct HostDBContinuation : public Continuation {
   {
     return md5.db_mark == HOSTDB_MARK_SRV;
   }
-  HostDBInfo *lookup_done(IpAddr const &ip, const char *aname, bool round_robin, unsigned int attl, SRVHosts *s = NULL,
-                          HostDBInfo *r = NULL);
+  HostDBInfo *lookup_done(IpAddr const &ip, const char *aname, bool round_robin, unsigned int attl, SRVHosts *s = nullptr,
+                          HostDBInfo *r = nullptr);
   bool do_get_response(Event *e);
   void do_put_response(ClusterMachine *m, HostDBInfo *r, Continuation *cont);
   int failed_cluster_request(Event *e);
@@ -503,7 +503,7 @@ struct HostDBContinuation : public Continuation {
     int timeout;                 ///< Timeout value. Default 0
     HostResStyle host_res_style; ///< IP address family fallback. Default @c HOST_RES_NONE
     bool force_dns;              ///< Force DNS lookup. Default @c false
-    Continuation *cont;          ///< Continuation / action. Default @c NULL (none)
+    Continuation *cont;          ///< Continuation / action. Default @c nullptr (none)
 
     Options() : timeout(0), host_res_style(HOST_RES_NONE), force_dns(false), cont(0) {}
   };
@@ -513,7 +513,7 @@ struct HostDBContinuation : public Continuation {
   int make_put_message(HostDBInfo *r, Continuation *c, char *buf, int len);
 
   HostDBContinuation()
-    : Continuation(NULL),
+    : Continuation(nullptr),
       ttl(0),
       host_res_style(DEFAULT_OPTIONS.host_res_style),
       dns_lookup_timeout(DEFAULT_OPTIONS.timeout),
diff --git a/iocore/hostdb/P_RefCountCache.h b/iocore/hostdb/P_RefCountCache.h
index 563cdfb25ae..c417a5c1c08 100644
--- a/iocore/hostdb/P_RefCountCache.h
+++ b/iocore/hostdb/P_RefCountCache.h
@@ -86,7 +86,7 @@ class RefCountCacheHashEntry
     this->meta = RefCountCacheItemMeta(key, size, expire_time);
   };
   // Need a no-argument constructor to use the classAllocator
-  RefCountCacheHashEntry() : item(Ptr()), expiry_entry(NULL), meta(0, 0) {}
+  RefCountCacheHashEntry() : item(Ptr()), expiry_entry(nullptr), meta(0, 0) {}
   // make these values comparable -- so we can sort them
   bool
   operator<(const RefCountCacheHashEntry &v2) const
@@ -126,7 +126,7 @@ struct RefCountCacheHashing {
 template  class RefCountCachePartition
 {
 public:
-  RefCountCachePartition(unsigned int part_num, uint64_t max_size, unsigned int max_items, RecRawStatBlock *rsb = NULL);
+  RefCountCachePartition(unsigned int part_num, uint64_t max_size, unsigned int max_items, RecRawStatBlock *rsb = nullptr);
   Ptr get(uint64_t key);
   void put(uint64_t key, C *item, int size = 0, int expire_time = 0);
   void erase(uint64_t key, ink_time_t expiry_time = -1);
@@ -240,12 +240,12 @@ RefCountCachePartition::erase(uint64_t key, ink_time_t expiry_time)
     this->metric_inc(refcountcache_current_items_stat, -1);
 
     // remove from expiry queue
-    if (l.m_value->expiry_entry != NULL) {
+    if (l.m_value->expiry_entry != nullptr) {
       Debug("refcountcache", "partition %d deleting item from expiry_queue idx=%d\n", this->part_num,
             l.m_value->expiry_entry->index);
       this->expiry_queue.erase(l.m_value->expiry_entry);
       expiryQueueEntry.free(l.m_value->expiry_entry);
-      l.m_value->expiry_entry = NULL; // To avoid the destruction of `l` calling the destructor again-- and causing issues
+      l.m_value->expiry_entry = nullptr; // To avoid the destruction of `l` calling the destructor again-- and causing issues
     }
     // Since the Value is actually RefCountObj-- when this gets deleted normally it calls the wrong
     // `free` method, this forces the delete/decr to happen with the right type
@@ -286,7 +286,7 @@ RefCountCachePartition::make_space_for(unsigned int size)
   while (this->is_full() || (size > 0 && this->size + size > this->max_size)) {
     PriorityQueueEntry *top_item = expiry_queue.top();
     // if there is nothing in the expiry queue, then we can't make space
-    if (top_item == NULL) {
+    if (top_item == nullptr) {
       return false;
     }
 
@@ -398,7 +398,7 @@ template  class RefCountCache
 template 
 RefCountCache::RefCountCache(unsigned int num_partitions, int size, int items, VersionNumber object_version,
                                 std::string metrics_prefix)
-  : header(RefCountCacheHeader(object_version)), rsb(NULL)
+  : header(RefCountCacheHeader(object_version)), rsb(nullptr)
 {
   this->max_size       = size;
   this->max_items      = items;
@@ -542,7 +542,7 @@ LoadRefCountCacheFromPath(RefCountCache &cache, std::string dirn
                           CacheEntryType *(*load_func)(char *, unsigned int))
 {
   // If we have no load method, then we can't load anything so lets just stop right here
-  if (load_func == NULL) {
+  if (load_func == nullptr) {
     return -1; // TODO: some specific error code
   }
 
@@ -579,7 +579,7 @@ LoadRefCountCacheFromPath(RefCountCache &cache, std::string dirn
     }
 
     CacheEntryType *newItem = load_func((char *)&buf, tmpValue.size);
-    if (newItem != NULL) {
+    if (newItem != nullptr) {
       cache.put(tmpValue.key, newItem, tmpValue.size - sizeof(CacheEntryType));
     }
   };
diff --git a/iocore/hostdb/P_RefCountCacheSerializer.h b/iocore/hostdb/P_RefCountCacheSerializer.h
index 410333f4593..63bc8caae6d 100644
--- a/iocore/hostdb/P_RefCountCacheSerializer.h
+++ b/iocore/hostdb/P_RefCountCacheSerializer.h
@@ -79,7 +79,7 @@ template  class RefCountCacheSerializer : public Continuation
 template 
 RefCountCacheSerializer::RefCountCacheSerializer(Continuation *acont, C *cc, int frequency, std::string dirname,
                                                     std::string filename)
-  : Continuation(NULL),
+  : Continuation(nullptr),
     partition(0),
     cache(cc),
     cont(acont),
diff --git a/iocore/hostdb/include/Machine.h b/iocore/hostdb/include/Machine.h
index 14c55e7bbd0..78750541151 100644
--- a/iocore/hostdb/include/Machine.h
+++ b/iocore/hostdb/include/Machine.h
@@ -71,7 +71,7 @@ struct Machine : Server {
   Link link;
 
   // default for localhost
-  Machine(char *hostname = NULL, unsigned int ip = 0, int acluster_port = 0);
+  Machine(char *hostname = nullptr, unsigned int ip = 0, int acluster_port = 0);
   ~Machine();
 
   // Cluster message protocol version
@@ -97,7 +97,7 @@ struct MachineList {
     for (int i = 0; i < n; i++)
       if (machine[i].ip == ip && (!port || machine[i].port == port))
         return &machine[i];
-    return NULL;
+    return nullptr;
   }
 };
 
diff --git a/iocore/hostdb/test_I_HostDB.cc b/iocore/hostdb/test_I_HostDB.cc
index 81e27afac8c..a6d077eb4b1 100644
--- a/iocore/hostdb/test_I_HostDB.cc
+++ b/iocore/hostdb/test_I_HostDB.cc
@@ -32,7 +32,7 @@ class HostDBTest : Continuation
 
 main()
 {
-  init_diags("net_test", NULL);
+  init_diags("net_test", nullptr);
   ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
   ink_net_init(NET_SYSTEM_MODULE_VERSION);
   ink_hostdb_init(HOSTDB_MODULE_VERSION);
diff --git a/iocore/hostdb/test_RefCountCache.cc b/iocore/hostdb/test_RefCountCache.cc
index c6a3a80233d..f1d85c8c853 100644
--- a/iocore/hostdb/test_RefCountCache.cc
+++ b/iocore/hostdb/test_RefCountCache.cc
@@ -70,7 +70,7 @@ class ExampleStruct : public RefCountObj
   unmarshall(char *buf, unsigned int size)
   {
     if (size < sizeof(ExampleStruct)) {
-      return NULL;
+      return nullptr;
     }
     ExampleStruct *ret = ExampleStruct::alloc(size - sizeof(ExampleStruct));
     memcpy((void *)ret, buf, size);
@@ -97,7 +97,7 @@ fillCache(RefCountCache *cache, int start, int end)
     tmp->idx         = i;
     tmp->name_offset = sizeof(ExampleStruct);
     memcpy(tmp->name(), name.c_str(), name.size());
-    // NULL terminate the string
+    // nullptr terminate the string
     *(tmp->name() + name.size()) = '\0';
 
     // Print out the struct we put in there
@@ -113,7 +113,7 @@ verifyCache(RefCountCache *cache, int start, int end)
   for (int i = start; i < end; i++) {
     Ptr ccitem = cache->get(i);
     ExampleStruct *tmp        = ccitem.get();
-    if (tmp == NULL) {
+    if (tmp == nullptr) {
       // printf("ExampleStruct %d missing, skipping\n", i);
       continue;
     }
@@ -174,7 +174,7 @@ testRefcounting()
   ret |= tmp->refcount() != 2;
   printf("ret=%d ref=%d\n", ret, tmp->refcount());
   // verify that it still isn't in there
-  ret |= cache->get(1).get() != NULL;
+  ret |= cache->get(1).get() != nullptr;
   printf("ret=%d ref=%d\n", ret, tmp->refcount());
   ret |= tmpAfter.get()->idx != 1;
   printf("ret=%d ref=%d\n", ret, tmp->refcount());
@@ -209,7 +209,7 @@ test()
   // Initialize IOBufAllocator
   RecModeT mode_type = RECM_STAND_ALONE;
   Layout::create();
-  init_diags("", NULL);
+  init_diags("", nullptr);
   RecProcessInit(mode_type);
   ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
 
@@ -267,7 +267,7 @@ test()
   // Delete a single item
   cache->erase(1);
   // verify that it still isn't in there
-  ret |= cache->get(1).get() != NULL;
+  ret |= cache->get(1).get() != nullptr;
   ret |= ccitem.get()->idx != 1;
   printf("ret=%d\n", ret);
 
diff --git a/iocore/net/BIO_fastopen.cc b/iocore/net/BIO_fastopen.cc
index 77e937838b6..d73f696706c 100644
--- a/iocore/net/BIO_fastopen.cc
+++ b/iocore/net/BIO_fastopen.cc
@@ -33,7 +33,7 @@ fastopen_create(BIO *bio)
   bio->init  = 0;
   bio->num   = NO_FD;
   bio->flags = 0;
-  bio->ptr   = NULL;
+  bio->ptr   = nullptr;
 
   return 1;
 }
@@ -75,7 +75,7 @@ fastopen_bwrite(BIO *bio, const char *in, int insz)
       NET_INCREMENT_DYN_STAT(net_fastopen_successes_stat);
     }
 
-    bio->ptr = NULL;
+    bio->ptr = nullptr;
   } else {
     err = socketManager.write(bio->num, (void *)in, insz);
   }
@@ -153,12 +153,12 @@ static const BIO_METHOD fastopen_methods = {
   .name          = "fastopen",
   .bwrite        = fastopen_bwrite,
   .bread         = fastopen_bread,
-  .bputs         = NULL,
-  .bgets         = NULL,
+  .bputs         = nullptr,
+  .bgets         = nullptr,
   .ctrl          = fastopen_ctrl,
   .create        = fastopen_create,
   .destroy       = fastopen_destroy,
-  .callback_ctrl = NULL,
+  .callback_ctrl = nullptr,
 };
 
 const BIO_METHOD *
diff --git a/iocore/net/I_NetProcessor.h b/iocore/net/I_NetProcessor.h
index c4443313c07..8b030061085 100644
--- a/iocore/net/I_NetProcessor.h
+++ b/iocore/net/I_NetProcessor.h
@@ -174,7 +174,7 @@ class NetProcessor : public Processor
 
   */
 
-  inkcoreapi Action *connect_re(Continuation *cont, sockaddr const *addr, NetVCOptions *options = NULL);
+  inkcoreapi Action *connect_re(Continuation *cont, sockaddr const *addr, NetVCOptions *options = nullptr);
 
   /**
     Open a NetVConnection for connection oriented I/O. This call
@@ -195,7 +195,7 @@ class NetProcessor : public Processor
     @see connect_re()
 
   */
-  Action *connect_s(Continuation *cont, sockaddr const *addr, int timeout = NET_CONNECT_TIMEOUT, NetVCOptions *opts = NULL);
+  Action *connect_s(Continuation *cont, sockaddr const *addr, int timeout = NET_CONNECT_TIMEOUT, NetVCOptions *opts = nullptr);
 
   /**
     Starts the Netprocessor. This has to be called before doing any
diff --git a/iocore/net/I_NetVConnection.h b/iocore/net/I_NetVConnection.h
index b993f880a13..ba6d14964da 100644
--- a/iocore/net/I_NetVConnection.h
+++ b/iocore/net/I_NetVConnection.h
@@ -198,7 +198,7 @@ struct NetVCOptions {
     if (name && len && ats_ip_pton(ts::ConstBuffer(name, len), &ip) != 0) {
       sni_servername = ats_strndup(name, len);
     } else {
-      sni_servername = NULL;
+      sni_servername = nullptr;
     }
     return *this;
   }
@@ -207,7 +207,7 @@ struct NetVCOptions {
   operator=(self const &that)
   {
     if (&that != this) {
-      sni_servername = NULL; // release any current name.
+      sni_servername = nullptr; // release any current name.
       memcpy(this, &that, sizeof(self));
       if (that.sni_servername) {
         sni_servername.release(); // otherwise we'll free the source string.
@@ -456,7 +456,7 @@ class NetVConnection : public VConnection
       The action continuation will be called with an event if there is no pending I/O operation
       to receive the event.
 
-      Pass @c NULL to disable.
+      Pass @c nullptr to disable.
 
       @internal Subclasses should implement this if they support actions. This abstract class does
       not. If the subclass doesn't have an action this method is silently ignored.
@@ -618,7 +618,7 @@ class NetVConnection : public VConnection
   virtual const char *
   protocol_contains(const char *tag) const
   {
-    return NULL;
+    return nullptr;
   }
 
 private:
@@ -642,9 +642,9 @@ class NetVConnection : public VConnection
 };
 
 inline NetVConnection::NetVConnection()
-  : VConnection(NULL),
+  : VConnection(nullptr),
     attributes(0),
-    thread(NULL),
+    thread(nullptr),
     got_local_addr(0),
     got_remote_addr(0),
     is_internal_request(false),
diff --git a/iocore/net/I_SessionAccept.h b/iocore/net/I_SessionAccept.h
index aadf4b2397b..4c677c35e39 100644
--- a/iocore/net/I_SessionAccept.h
+++ b/iocore/net/I_SessionAccept.h
@@ -37,7 +37,7 @@ struct AclRecord;
      - Create ClientSession.
      - Pass NetVC and MIOBuffer by call ClientSession::new_connection().
 
-   NULL mutex:
+   nullptr mutex:
 
      - One specific protocol has ONLY one inherited class of SessionAccept.
      - The object of this class is shared by all incoming request / NetVC that
@@ -50,7 +50,7 @@ struct AclRecord;
      - Values are required to be set during construction and never changed.
      - Can not put into EventSystem.
 
-   So a NULL mutex is safe for the continuation.
+   So a nullptr mutex is safe for the continuation.
 */
 
 class SessionAccept : public Continuation
@@ -72,7 +72,7 @@ class SessionAccept : public Continuation
    */
   virtual bool accept(NetVConnection *, MIOBuffer *, IOBufferReader *) = 0;
 
-  /* Returns NULL if the specified client_ip is not allowed by ip_allow
+  /* Returns nullptr if the specified client_ip is not allowed by ip_allow
    * Returns a pointer to the relevant IP policy for later processing otherwise */
   static const AclRecord *testIpAllowPolicy(sockaddr const *client_ip);
 
diff --git a/iocore/net/I_UDPPacket.h b/iocore/net/I_UDPPacket.h
index 7b0be5fa92d..dc6f455a7bd 100644
--- a/iocore/net/I_UDPPacket.h
+++ b/iocore/net/I_UDPPacket.h
@@ -73,10 +73,10 @@ class UDPPacket
 
    @param to  address of where to send packet
    @param when ink_hrtime relative to ink_get_hrtime_internal()
-   @param buf if !NULL, then len bytes copied from buf and made into packet.
+   @param buf if !nullptr, then len bytes copied from buf and made into packet.
    @param len # of bytes to copy from buf
  */
-extern UDPPacket *new_UDPPacket(struct sockaddr const *to, ink_hrtime when = 0, char *buf = NULL, int len = 0);
+extern UDPPacket *new_UDPPacket(struct sockaddr const *to, ink_hrtime when = 0, char *buf = nullptr, int len = 0);
 /**
    Create a new packet to be sent over UDPConnection. This clones and
    makes a reference to an existing IOBufferBlock chain.
@@ -84,12 +84,12 @@ extern UDPPacket *new_UDPPacket(struct sockaddr const *to, ink_hrtime when = 0,
 
    @param to  address of where to send packet
    @param when ink_hrtime relative to ink_get_hrtime_internal()
-   @param block if !NULL, then the IOBufferBlock chain of data to use
+   @param block if !nullptr, then the IOBufferBlock chain of data to use
    for packet
    @param len # of bytes to reference from block
  */
 
-TS_INLINE UDPPacket *new_UDPPacket(struct sockaddr const *to, ink_hrtime when = 0, IOBufferBlock *block = NULL, int len = 0);
+TS_INLINE UDPPacket *new_UDPPacket(struct sockaddr const *to, ink_hrtime when = 0, IOBufferBlock *block = nullptr, int len = 0);
 /**
    Create a new packet to be sent over UDPConnection.  Packet has no
    destination or data.
diff --git a/iocore/net/Net.cc b/iocore/net/Net.cc
index c8b9ee538fd..f032c6f98f9 100644
--- a/iocore/net/Net.cc
+++ b/iocore/net/Net.cc
@@ -31,7 +31,7 @@
 #include "P_Net.h"
 #include 
 
-RecRawStatBlock *net_rsb = NULL;
+RecRawStatBlock *net_rsb = nullptr;
 
 // All in milli-seconds
 int net_config_poll_timeout = -1; // This will get set via either command line or records.config.
@@ -43,7 +43,7 @@ int net_throttle_delay      = 50; /* milliseconds */
 static inline void
 configure_net(void)
 {
-  REC_RegisterConfigUpdateFunc("proxy.config.net.connections_throttle", change_net_connections_throttle, NULL);
+  REC_RegisterConfigUpdateFunc("proxy.config.net.connections_throttle", change_net_connections_throttle, nullptr);
   REC_ReadConfigInteger(fds_throttle, "proxy.config.net.connections_throttle");
 
   REC_EstablishStaticConfigInt32(net_retry_delay, "proxy.config.net.retry_delay");
diff --git a/iocore/net/NetVCTest.cc b/iocore/net/NetVCTest.cc
index 26b5e1c3c4c..17401d58cf7 100644
--- a/iocore/net/NetVCTest.cc
+++ b/iocore/net/NetVCTest.cc
@@ -81,17 +81,17 @@ NVC_test_def netvc_tests_def[] = {
 const unsigned num_netvc_tests = countof(netvc_tests_def);
 
 NetVCTest::NetVCTest()
-  : Continuation(NULL),
+  : Continuation(nullptr),
     test_cont_type(NET_VC_TEST_ACTIVE),
-    test_vc(NULL),
-    regress(NULL),
-    driver(NULL),
-    read_vio(NULL),
-    write_vio(NULL),
-    read_buffer(NULL),
-    write_buffer(NULL),
-    reader_for_rbuf(NULL),
-    reader_for_wbuf(NULL),
+    test_vc(nullptr),
+    regress(nullptr),
+    driver(nullptr),
+    read_vio(nullptr),
+    write_vio(nullptr),
+    read_buffer(nullptr),
+    write_buffer(nullptr),
+    reader_for_rbuf(nullptr),
+    reader_for_wbuf(nullptr),
     write_bytes_to_add_per(0),
     timeout(0),
     actual_bytes_read(0),
@@ -106,28 +106,28 @@ NetVCTest::NetVCTest()
     nbytes_write(0),
     expected_read_term(0),
     expected_write_term(0),
-    test_name(NULL),
-    module_name(NULL),
-    debug_tag(NULL)
+    test_name(nullptr),
+    module_name(nullptr),
+    debug_tag(nullptr)
 {
 }
 
 NetVCTest::~NetVCTest()
 {
-  mutex = NULL;
+  mutex = nullptr;
 
   if (read_buffer) {
     Debug(debug_tag, "Freeing read MIOBuffer with %d blocks on %s", read_buffer->max_block_count(),
           (test_cont_type == NET_VC_TEST_ACTIVE) ? "Active" : "Passive");
     free_MIOBuffer(read_buffer);
-    read_buffer = NULL;
+    read_buffer = nullptr;
   }
 
   if (write_buffer) {
     Debug(debug_tag, "Freeing write MIOBuffer with %d blocks on %s", write_buffer->max_block_count(),
           (test_cont_type == NET_VC_TEST_ACTIVE) ? "Active" : "Passive");
     free_MIOBuffer(write_buffer);
-    write_buffer = NULL;
+    write_buffer = nullptr;
   }
 }
 
@@ -395,7 +395,7 @@ NetVCTest::main_handler(int event, void *data)
   return 0;
 }
 
-NetTestDriver::NetTestDriver() : Continuation(NULL), errors(0), r(NULL), pstatus(NULL)
+NetTestDriver::NetTestDriver() : Continuation(nullptr), errors(0), r(nullptr), pstatus(nullptr)
 {
 }
 
diff --git a/iocore/net/NetVConnection.cc b/iocore/net/NetVConnection.cc
index 25a0bd8ce26..b73ea290ba7 100644
--- a/iocore/net/NetVConnection.cc
+++ b/iocore/net/NetVConnection.cc
@@ -54,7 +54,7 @@ NetVCOptions::get_proto_string() const
   case USE_UDP:
     return TS_PROTO_TAG_UDP;
   default:
-    return NULL;
+    return nullptr;
   }
 }
 
@@ -70,7 +70,7 @@ NetVCOptions::get_family_string() const
     retval = TS_PROTO_TAG_IPV6;
     break;
   default:
-    retval = NULL;
+    retval = nullptr;
     break;
   }
   return retval;
diff --git a/iocore/net/OCSPStapling.cc b/iocore/net/OCSPStapling.cc
index bf5d413e467..6d24f7e72fa 100644
--- a/iocore/net/OCSPStapling.cc
+++ b/iocore/net/OCSPStapling.cc
@@ -35,7 +35,7 @@
 // Cached info stored in SSL_CTX ex_info
 struct certinfo {
   unsigned char idx[20]; // Index in session cache SHA1 hash of certificate
-  OCSP_CERTID *cid;      // Certificate ID for OCSP requests or NULL if ID cannot be determined
+  OCSP_CERTID *cid;      // Certificate ID for OCSP requests or nullptr if ID cannot be determined
   char *uri;             // Responder details
   ink_mutex stapling_mutex;
   unsigned char resp_der[MAX_STAPLING_DER];
@@ -64,17 +64,17 @@ ssl_stapling_ex_init(void)
 {
   if (ssl_stapling_index != -1)
     return;
-  ssl_stapling_index = SSL_CTX_get_ex_new_index(0, 0, 0, 0, certinfo_free);
+  ssl_stapling_index = SSL_CTX_get_ex_new_index(0, nullptr, nullptr, nullptr, certinfo_free);
 }
 
 static X509 *
 stapling_get_issuer(SSL_CTX *ssl_ctx, X509 *x)
 {
-  X509 *issuer = NULL;
+  X509 *issuer = nullptr;
   int i;
   X509_STORE *st = SSL_CTX_get_cert_store(ssl_ctx);
   X509_STORE_CTX inctx;
-  STACK_OF(X509) *extra_certs = NULL;
+  STACK_OF(X509) *extra_certs = nullptr;
 
 #ifdef SSL_CTX_get_extra_chain_certs
   SSL_CTX_get_extra_chain_certs(ssl_ctx, &extra_certs);
@@ -83,7 +83,7 @@ stapling_get_issuer(SSL_CTX *ssl_ctx, X509 *x)
 #endif
 
   if (sk_X509_num(extra_certs) == 0)
-    return NULL;
+    return nullptr;
 
   for (i = 0; i < sk_X509_num(extra_certs); i++) {
     issuer = sk_X509_value(extra_certs, i);
@@ -93,10 +93,10 @@ stapling_get_issuer(SSL_CTX *ssl_ctx, X509 *x)
     }
   }
 
-  if (!X509_STORE_CTX_init(&inctx, st, NULL, NULL))
-    return NULL;
+  if (!X509_STORE_CTX_init(&inctx, st, nullptr, nullptr))
+    return nullptr;
   if (X509_STORE_CTX_get1_issuer(&issuer, &inctx, x) <= 0)
-    issuer = NULL;
+    issuer = nullptr;
   X509_STORE_CTX_cleanup(&inctx);
 
   return issuer;
@@ -107,7 +107,7 @@ ssl_stapling_init_cert(SSL_CTX *ctx, X509 *cert, const char *certname)
 {
   certinfo *cinf;
   scoped_X509 issuer;
-  STACK_OF(OPENSSL_STRING) *aia = NULL;
+  STACK_OF(OPENSSL_STRING) *aia = nullptr;
 
   if (!cert) {
     Debug("ssl_ocsp", "Null cert passed in");
@@ -127,8 +127,8 @@ ssl_stapling_init_cert(SSL_CTX *ctx, X509 *cert, const char *certname)
   }
 
   // Initialize certinfo
-  cinf->cid         = NULL;
-  cinf->uri         = NULL;
+  cinf->cid         = nullptr;
+  cinf->uri         = nullptr;
   cinf->resp_derlen = 0;
   ink_mutex_init(&cinf->stapling_mutex, "stapling_mutex");
   cinf->is_expire   = true;
@@ -137,15 +137,15 @@ ssl_stapling_init_cert(SSL_CTX *ctx, X509 *cert, const char *certname)
   SSL_CTX_set_ex_data(ctx, ssl_stapling_index, cinf);
 
   issuer = stapling_get_issuer(ctx, cert);
-  if (issuer == NULL) {
+  if (issuer == nullptr) {
     Debug("ssl_ocsp", "cannot get issuer certificate from %s!", certname);
     return false;
   }
 
-  cinf->cid = OCSP_cert_to_id(NULL, cert, issuer);
+  cinf->cid = OCSP_cert_to_id(nullptr, cert, issuer);
   if (!cinf->cid)
     return false;
-  X509_digest(cert, EVP_sha1(), cinf->idx, NULL);
+  X509_digest(cert, EVP_sha1(), cinf->idx, nullptr);
 
   aia = X509_get1_ocsp(cert);
   if (aia)
@@ -169,7 +169,7 @@ stapling_get_cert_info(SSL_CTX *ctx)
   if (cinf && cinf->cid)
     return cinf;
 
-  return NULL;
+  return nullptr;
 }
 
 static bool
@@ -196,7 +196,7 @@ stapling_cache_response(OCSP_RESPONSE *rsp, certinfo *cinf)
   memcpy(cinf->resp_der, resp_der, resp_derlen);
   cinf->resp_derlen = resp_derlen;
   cinf->is_expire   = false;
-  cinf->expire_time = time(NULL) + SSLConfigParams::ssl_ocsp_cache_timeout;
+  cinf->expire_time = time(nullptr) + SSLConfigParams::ssl_ocsp_cache_timeout;
   ink_mutex_release(&cinf->stapling_mutex);
 
   Debug("ssl_ocsp", "stapling_cache_response: success to cache response");
@@ -207,7 +207,7 @@ static int
 stapling_check_response(certinfo *cinf, OCSP_RESPONSE *rsp)
 {
   int status, reason;
-  OCSP_BASICRESP *bs = NULL;
+  OCSP_BASICRESP *bs = nullptr;
   ASN1_GENERALIZEDTIME *rev, *thisupd, *nextupd;
   int response_status = OCSP_response_status(rsp);
 
@@ -218,7 +218,7 @@ stapling_check_response(certinfo *cinf, OCSP_RESPONSE *rsp)
   }
 
   bs = OCSP_response_get1_basic(rsp);
-  if (bs == NULL) {
+  if (bs == nullptr) {
     // If we can't parse response just pass it back to client
     Error("stapling_check_response: can not parsing response");
     return SSL_TLSEXT_ERR_OK;
@@ -252,14 +252,14 @@ static OCSP_RESPONSE *
 query_responder(BIO *b, char *host, char *path, OCSP_REQUEST *req, int req_timeout)
 {
   ink_hrtime start, end;
-  OCSP_RESPONSE *resp = NULL;
+  OCSP_RESPONSE *resp = nullptr;
   OCSP_REQ_CTX *ctx;
   int rv;
 
   start = Thread::get_hrtime();
   end   = ink_hrtime_add(start, ink_hrtime_from_sec(req_timeout));
 
-  ctx = OCSP_sendreq_new(b, path, NULL, -1);
+  ctx = OCSP_sendreq_new(b, path, nullptr, -1);
   OCSP_REQ_CTX_add1_header(ctx, "Host", host);
   OCSP_REQ_CTX_set1_req(ctx, req);
 
@@ -273,14 +273,14 @@ query_responder(BIO *b, char *host, char *path, OCSP_REQUEST *req, int req_timeo
   if (rv)
     return resp;
 
-  return NULL;
+  return nullptr;
 }
 
 static OCSP_RESPONSE *
 process_responder(OCSP_REQUEST *req, char *host, char *path, char *port, int req_timeout)
 {
-  BIO *cbio           = NULL;
-  OCSP_RESPONSE *resp = NULL;
+  BIO *cbio           = nullptr;
+  OCSP_RESPONSE *resp = nullptr;
   cbio                = BIO_new_connect(host);
   if (!cbio) {
     goto end;
@@ -305,14 +305,14 @@ static bool
 stapling_refresh_response(certinfo *cinf, OCSP_RESPONSE **prsp)
 {
   bool rv           = true;
-  OCSP_REQUEST *req = NULL;
-  OCSP_CERTID *id   = NULL;
+  OCSP_REQUEST *req = nullptr;
+  OCSP_CERTID *id   = nullptr;
   char *host, *path, *port;
   int ssl_flag    = 0;
   int req_timeout = -1;
 
   Debug("ssl_ocsp", "stapling_refresh_response: querying responder");
-  *prsp = NULL;
+  *prsp = nullptr;
 
   if (!OCSP_parse_url(cinf->uri, &host, &port, &path, &ssl_flag)) {
     goto err;
@@ -330,7 +330,7 @@ stapling_refresh_response(certinfo *cinf, OCSP_RESPONSE **prsp)
   req_timeout = SSLConfigParams::ssl_ocsp_request_timeout;
   *prsp       = process_responder(req, host, path, port, req_timeout);
 
-  if (*prsp == NULL) {
+  if (*prsp == nullptr) {
     goto done;
   }
 
@@ -364,8 +364,8 @@ void
 ocsp_update()
 {
   SSL_CTX *ctx;
-  certinfo *cinf      = NULL;
-  OCSP_RESPONSE *resp = NULL;
+  certinfo *cinf      = nullptr;
+  OCSP_RESPONSE *resp = nullptr;
   time_t current_time;
 
   SSLCertificateConfig::scoped_config certLookup;
@@ -378,7 +378,7 @@ ocsp_update()
       cinf = stapling_get_cert_info(ctx);
       if (cinf) {
         ink_mutex_acquire(&cinf->stapling_mutex);
-        current_time = time(NULL);
+        current_time = time(nullptr);
         if (cinf->resp_derlen == 0 || cinf->is_expire || cinf->expire_time < current_time) {
           ink_mutex_release(&cinf->stapling_mutex);
           if (stapling_refresh_response(cinf, &resp)) {
@@ -400,20 +400,20 @@ ocsp_update()
 int
 ssl_callback_ocsp_stapling(SSL *ssl)
 {
-  certinfo *cinf = NULL;
+  certinfo *cinf = nullptr;
   time_t current_time;
 
   // Assume SSL_get_SSL_CTX() is the same as reaching into the ssl structure
   // Using the official call, to avoid leaking internal openssl knowledge
   // originally was, cinf = stapling_get_cert_info(ssl->ctx);
   cinf = stapling_get_cert_info(SSL_get_SSL_CTX(ssl));
-  if (cinf == NULL) {
+  if (cinf == nullptr) {
     Debug("ssl_ocsp", "ssl_callback_ocsp_stapling: fail to get certificate information");
     return SSL_TLSEXT_ERR_NOACK;
   }
 
   ink_mutex_acquire(&cinf->stapling_mutex);
-  current_time = time(NULL);
+  current_time = time(nullptr);
   if (cinf->resp_derlen == 0 || cinf->is_expire || cinf->expire_time < current_time) {
     ink_mutex_release(&cinf->stapling_mutex);
     Debug("ssl_ocsp", "ssl_callback_ocsp_stapling: fail to get certificate status");
diff --git a/iocore/net/P_Connection.h b/iocore/net/P_Connection.h
index 9765cdeb898..a9eb3a599eb 100644
--- a/iocore/net/P_Connection.h
+++ b/iocore/net/P_Connection.h
@@ -123,10 +123,10 @@ struct Connection {
   }
 
   int setup_mc_send(sockaddr const *mc_addr, sockaddr const *my_addr, bool non_blocking = NON_BLOCKING, unsigned char mc_ttl = 1,
-                    bool mc_loopback = DISABLE_MC_LOOPBACK, Continuation *c = NULL);
+                    bool mc_loopback = DISABLE_MC_LOOPBACK, Continuation *c = nullptr);
 
-  int setup_mc_receive(sockaddr const *from, sockaddr const *my_addr, bool non_blocking = NON_BLOCKING, Connection *sendchan = NULL,
-                       Continuation *c = NULL);
+  int setup_mc_receive(sockaddr const *from, sockaddr const *my_addr, bool non_blocking = NON_BLOCKING,
+                       Connection *sendchan = nullptr, Continuation *c = nullptr);
 
   int close(); // 0 on success, -errno on failure
 
diff --git a/iocore/net/P_InkBulkIO.h b/iocore/net/P_InkBulkIO.h
index 5c30620d935..46df82b8299 100644
--- a/iocore/net/P_InkBulkIO.h
+++ b/iocore/net/P_InkBulkIO.h
@@ -153,7 +153,7 @@ struct InkBulkIORequest {
 
 /*
  * There is always 1 req. block and 1 pkt. block.  Next,
- * Leave space for 1 "NULL" block for the Address information.
+ * Leave space for 1 "nullptr" block for the Address information.
  */
 
 #define INKBIO_MAX_SPLIT_WO_HDR_PER_SPLIT_BLOCK                                                           \
diff --git a/iocore/net/P_LibBulkIO.h b/iocore/net/P_LibBulkIO.h
index 2ebc4282b2e..83a2bf5f57d 100644
--- a/iocore/net/P_LibBulkIO.h
+++ b/iocore/net/P_LibBulkIO.h
@@ -61,15 +61,15 @@ struct InkBulkIOAggregator {
   InkBulkIOAggregator()
   {
     metaReqCount      = 0;
-    metablockInfo.ptr = NULL;
+    metablockInfo.ptr = nullptr;
     metablockInfo.id  = 0xffffffff;
-    metablockReqPtr   = NULL;
+    metablockReqPtr   = nullptr;
 
     lastReqFragCount = 0;
-    lastReq          = NULL;
-    reqblockInfo.ptr = NULL;
+    lastReq          = nullptr;
+    reqblockInfo.ptr = nullptr;
     reqblockInfo.id  = 0xffffffff;
-    reqblockPktPtr   = NULL;
+    reqblockPktPtr   = nullptr;
   };
   struct InkBulkIOBlock metablockInfo;
   // Location where the next req. block id should be stuffed in the meta block.
@@ -85,18 +85,18 @@ struct InkBulkIOAggregator {
   ResetLastRequestInfo()
   {
     lastReqFragCount = 0;
-    lastReq          = NULL;
-    reqblockInfo.ptr = NULL;
+    lastReq          = nullptr;
+    reqblockInfo.ptr = nullptr;
     reqblockInfo.id  = 0xffffffff;
-    reqblockPktPtr   = NULL;
+    reqblockPktPtr   = nullptr;
   };
   void
   ResetMetaBlockInfo()
   {
     metaReqCount      = 0;
-    metablockInfo.ptr = NULL;
+    metablockInfo.ptr = nullptr;
     metablockInfo.id  = 0xffffffff;
-    metablockReqPtr   = NULL;
+    metablockReqPtr   = nullptr;
   };
   bool
   AppendLastRequest()
diff --git a/iocore/net/P_NetAccept.h b/iocore/net/P_NetAccept.h
index 4bbb5f9c35e..3c14b874f1a 100644
--- a/iocore/net/P_NetAccept.h
+++ b/iocore/net/P_NetAccept.h
@@ -60,7 +60,7 @@ struct NetAcceptAction : public Action, public RefCountObj {
   Server *server;
 
   void
-  cancel(Continuation *cont = NULL)
+  cancel(Continuation *cont = nullptr)
   {
     Action::cancel(cont);
     server->close();
@@ -92,7 +92,7 @@ struct NetAccept : public Continuation {
   virtual NetProcessor *getNetProcessor() const;
 
   void init_accept_loop(const char *);
-  virtual void init_accept(EThread *t = NULL);
+  virtual void init_accept(EThread *t = nullptr);
   virtual void init_accept_per_thread();
   virtual NetAccept *clone() const;
 
@@ -106,7 +106,7 @@ struct NetAccept : public Continuation {
   void cancel();
 
   explicit NetAccept(const NetProcessor::AcceptOptions &);
-  virtual ~NetAccept() { action_ = NULL; }
+  virtual ~NetAccept() { action_ = nullptr; }
 };
 
 #endif
diff --git a/iocore/net/P_SSLCertLookup.h b/iocore/net/P_SSLCertLookup.h
index f5ab5a9e4f3..eb6056e3caa 100644
--- a/iocore/net/P_SSLCertLookup.h
+++ b/iocore/net/P_SSLCertLookup.h
@@ -53,7 +53,7 @@ struct ssl_ticket_key_block {
 */
 struct SSLCertContext {
   /** Special things to do instead of use a context.
-      In general an option will be associated with a @c NULL context because
+      In general an option will be associated with a @c nullptr context because
       the context is not used.
   */
   enum Option {
@@ -61,9 +61,9 @@ struct SSLCertContext {
     OPT_TUNNEL ///< Just tunnel, don't terminate.
   };
 
-  SSLCertContext() : ctx(0), opt(OPT_NONE), keyblock(NULL) {}
-  explicit SSLCertContext(SSL_CTX *c) : ctx(c), opt(OPT_NONE), keyblock(NULL) {}
-  SSLCertContext(SSL_CTX *c, Option o) : ctx(c), opt(o), keyblock(NULL) {}
+  SSLCertContext() : ctx(0), opt(OPT_NONE), keyblock(nullptr) {}
+  explicit SSLCertContext(SSL_CTX *c) : ctx(c), opt(OPT_NONE), keyblock(nullptr) {}
+  SSLCertContext(SSL_CTX *c, Option o) : ctx(c), opt(o), keyblock(nullptr) {}
   SSLCertContext(SSL_CTX *c, Option o, ssl_ticket_key_block *kb) : ctx(c), opt(o), keyblock(kb) {}
   void release();
 
@@ -83,13 +83,13 @@ struct SSLCertLookup : public ConfigInfo {
   /** Find certificate context by IP address.
       The IP addresses are taken from the socket @a s.
       Exact matches have priority, then wildcards. The destination address is preferred to the source address.
-      @return @c A pointer to the matched context, @c NULL if no match is found.
+      @return @c A pointer to the matched context, @c nullptr if no match is found.
   */
   SSLCertContext *find(const IpEndpoint &address) const;
 
   /** Find certificate context by name (FQDN).
       Exact matches have priority, then wildcards. Only destination based matches are checked.
-      @return @c A pointer to the matched context, @c NULL if no match is found.
+      @return @c A pointer to the matched context, @c nullptr if no match is found.
   */
   SSLCertContext *find(const char *name) const;
 
diff --git a/iocore/net/P_SSLNetVConnection.h b/iocore/net/P_SSLNetVConnection.h
index a9606dc06d9..ae09bd8b514 100644
--- a/iocore/net/P_SSLNetVConnection.h
+++ b/iocore/net/P_SSLNetVConnection.h
@@ -202,9 +202,9 @@ class SSLNetVConnection : public UnixNetVConnection
     if (this->handShakeBuffer) {
       free_MIOBuffer(this->handShakeBuffer);
     }
-    this->handShakeReader    = NULL;
-    this->handShakeHolder    = NULL;
-    this->handShakeBuffer    = NULL;
+    this->handShakeReader    = nullptr;
+    this->handShakeHolder    = nullptr;
+    this->handShakeBuffer    = nullptr;
     this->handShakeBioStored = 0;
   }
 
@@ -231,13 +231,13 @@ class SSLNetVConnection : public UnixNetVConnection
   const char *
   getSSLProtocol(void) const
   {
-    return ssl ? SSL_get_version(ssl) : NULL;
+    return ssl ? SSL_get_version(ssl) : nullptr;
   }
 
   const char *
   getSSLCipherSuite(void) const
   {
-    return ssl ? SSL_get_cipher_name(ssl) : NULL;
+    return ssl ? SSL_get_cipher_name(ssl) : nullptr;
   }
 
   int populate_protocol(const char **results, int n) const;
diff --git a/iocore/net/P_SSLUtils.h b/iocore/net/P_SSLUtils.h
index 4f7f2f4966e..a3d530df825 100644
--- a/iocore/net/P_SSLUtils.h
+++ b/iocore/net/P_SSLUtils.h
@@ -106,10 +106,10 @@ enum SSL_Stats {
 extern RecRawStatBlock *ssl_rsb;
 
 /* Stats should only be accessed using these macros */
-#define SSL_INCREMENT_DYN_STAT(x) RecIncrRawStat(ssl_rsb, NULL, (int)x, 1)
-#define SSL_DECREMENT_DYN_STAT(x) RecIncrRawStat(ssl_rsb, NULL, (int)x, -1)
+#define SSL_INCREMENT_DYN_STAT(x) RecIncrRawStat(ssl_rsb, nullptr, (int)x, 1)
+#define SSL_DECREMENT_DYN_STAT(x) RecIncrRawStat(ssl_rsb, nullptr, (int)x, -1)
 #define SSL_SET_COUNT_DYN_STAT(x, count) RecSetRawStatCount(ssl_rsb, x, count)
-#define SSL_INCREMENT_DYN_STAT_EX(x, y) RecIncrRawStat(ssl_rsb, NULL, (int)x, y)
+#define SSL_INCREMENT_DYN_STAT_EX(x, y) RecIncrRawStat(ssl_rsb, nullptr, (int)x, y)
 #define SSL_CLEAR_DYN_STAT(x)            \
   do {                                   \
     RecSetRawStatSum(ssl_rsb, (x), 0);   \
@@ -129,7 +129,7 @@ void SSLInitializeLibrary();
 void SSLInitializeStatistics();
 
 // Release SSL_CTX and the associated data. This works for both
-// client and server contexts and gracefully accepts NULL.
+// client and server contexts and gracefully accepts nullptr.
 void SSLReleaseContext(SSL_CTX *ctx);
 
 // Wrapper functions to SSL I/O routines
@@ -139,16 +139,16 @@ ssl_error_t SSLAccept(SSL *ssl);
 ssl_error_t SSLConnect(SSL *ssl);
 
 // Log an SSL error.
-#define SSLError(fmt, ...) SSLDiagnostic(MakeSourceLocation(), false, NULL, fmt, ##__VA_ARGS__)
+#define SSLError(fmt, ...) SSLDiagnostic(MakeSourceLocation(), false, nullptr, fmt, ##__VA_ARGS__)
 #define SSLErrorVC(vc, fmt, ...) SSLDiagnostic(MakeSourceLocation(), false, (vc), fmt, ##__VA_ARGS__)
 // Log a SSL diagnostic using the "ssl" diagnostic tag.
-#define SSLDebug(fmt, ...) SSLDiagnostic(MakeSourceLocation(), true, NULL, fmt, ##__VA_ARGS__)
+#define SSLDebug(fmt, ...) SSLDiagnostic(MakeSourceLocation(), true, nullptr, fmt, ##__VA_ARGS__)
 #define SSLDebugVC(vc, fmt, ...) SSLDiagnostic(MakeSourceLocation(), true, (vc), fmt, ##__VA_ARGS__)
 
 #define SSL_CLR_ERR_INCR_DYN_STAT(vc, x, fmt, ...) \
   do {                                             \
     SSLDebugVC((vc), fmt, ##__VA_ARGS__);          \
-    RecIncrRawStat(ssl_rsb, NULL, (int)x, 1);      \
+    RecIncrRawStat(ssl_rsb, nullptr, (int)x, 1);   \
   } while (0)
 
 void SSLDiagnostic(const SourceLocation &loc, bool debug, SSLNetVConnection *vc, const char *fmt, ...) TS_PRINTFLIKE(4, 5);
@@ -180,12 +180,12 @@ namespace detail
     static value_type
     initValue()
     {
-      return NULL;
+      return nullptr;
     }
     static bool
     isValid(value_type x)
     {
-      return x != NULL;
+      return x != nullptr;
     }
     static void
     destroy(value_type x)
@@ -199,12 +199,12 @@ namespace detail
     static value_type
     initValue()
     {
-      return NULL;
+      return nullptr;
     }
     static bool
     isValid(value_type x)
     {
-      return x != NULL;
+      return x != nullptr;
     }
     static void
     destroy(value_type x)
diff --git a/iocore/net/P_Socks.h b/iocore/net/P_Socks.h
index dadcc63c6e4..ceb4369c334 100644
--- a/iocore/net/P_Socks.h
+++ b/iocore/net/P_Socks.h
@@ -68,7 +68,7 @@ struct socks_conf_struct {
       server_connect_timeout(0),
       socks_timeout(100),
       default_version(5),
-      user_name_n_passwd(NULL),
+      user_name_n_passwd(nullptr),
       user_name_n_passwd_len(0),
       per_server_connection_attempts(1),
       connection_attempts(0),
@@ -144,14 +144,14 @@ struct SocksEntry : public Continuation {
   void free();
 
   SocksEntry()
-    : Continuation(NULL),
+    : Continuation(nullptr),
       netVConnection(0),
       nattempts(0),
       lerrno(0),
       timeout(0),
       version(5),
       write_done(false),
-      auth_handler(NULL),
+      auth_handler(nullptr),
       socks_cmd(NORMAL_SOCKS)
   {
     memset(&target_addr, 0, sizeof(target_addr));
diff --git a/iocore/net/P_UDPConnection.h b/iocore/net/P_UDPConnection.h
index 53c1a2a7ffa..70918cfc213 100644
--- a/iocore/net/P_UDPConnection.h
+++ b/iocore/net/P_UDPConnection.h
@@ -62,7 +62,7 @@ class UDPConnectionInternal : public UDPConnection
 
 TS_INLINE
 UDPConnectionInternal::UDPConnectionInternal()
-  : continuation(NULL), recvActive(0), refcount(0), fd(-1), binding_valid(0), tobedestroyed(0)
+  : continuation(nullptr), recvActive(0), refcount(0), fd(-1), binding_valid(0), tobedestroyed(0)
 {
   sendGenerationNum    = 0;
   lastSentPktTSSeqNum  = -1;
@@ -74,8 +74,8 @@ UDPConnectionInternal::UDPConnectionInternal()
 TS_INLINE
 UDPConnectionInternal::~UDPConnectionInternal()
 {
-  continuation = NULL;
-  mutex        = NULL;
+  continuation = nullptr;
+  mutex        = nullptr;
 }
 
 TS_INLINE SOCKET
@@ -156,7 +156,7 @@ TS_INLINE void
 UDPConnection::setContinuation(Continuation *c)
 {
   // it is not safe to switch among continuations that don't share locks
-  ink_assert(mutex.get() == NULL || c->mutex == mutex);
+  ink_assert(mutex.get() == nullptr || c->mutex == mutex);
   mutex                                         = c->mutex;
   ((UDPConnectionInternal *)this)->continuation = c;
 }
diff --git a/iocore/net/P_UDPIOEvent.h b/iocore/net/P_UDPIOEvent.h
index 759866f30c9..85a22edbf07 100644
--- a/iocore/net/P_UDPIOEvent.h
+++ b/iocore/net/P_UDPIOEvent.h
@@ -103,8 +103,8 @@ extern ClassAllocator UDPIOEventAllocator;
 TS_INLINE void
 UDPIOEvent::free(UDPIOEvent *e)
 {
-  e->b     = NULL;
-  e->mutex = NULL;
+  e->b     = nullptr;
+  e->mutex = nullptr;
   UDPIOEventAllocator.free(e);
 }
 #endif
diff --git a/iocore/net/P_UDPNet.h b/iocore/net/P_UDPNet.h
index 60630b5313d..cfe93aa04ec 100644
--- a/iocore/net/P_UDPNet.h
+++ b/iocore/net/P_UDPNet.h
@@ -141,7 +141,7 @@ class PacketQueue
     if (t > delivery_time[now_slot]) {
       return bucket[now_slot].head;
     } else {
-      return NULL;
+      return nullptr;
     }
   }
 
@@ -175,7 +175,7 @@ class PacketQueue
 
     for (i = 0; i < numSlots; i++) {
       s = (now_slot + i) % N_SLOTS;
-      while (NULL != (p = bucket[s].dequeue())) {
+      while (nullptr != (p = bucket[s].dequeue())) {
         if (IsCancelledPacket(p)) {
           p->free();
           continue;
@@ -183,7 +183,7 @@ class PacketQueue
         tempQ.enqueue(p);
       }
       // remove and flip it over
-      while (NULL != (p = tempQ.dequeue())) {
+      while (nullptr != (p = tempQ.dequeue())) {
         bucket[s].enqueue(p);
       }
     }
@@ -203,9 +203,9 @@ class PacketQueue
       // this is to handle wierdoness where someone is trying to queue a
       // packet to be sent in SLOT_TIME_MSEC * N_SLOTS * (2+)---the packet
       // will get back to longTermQ and we'll have an infinite loop.
-      while ((p = longTermQ.dequeue()) != NULL)
+      while ((p = longTermQ.dequeue()) != nullptr)
         tempQ.enqueue(p);
-      while ((p = tempQ.dequeue()) != NULL)
+      while ((p = tempQ.dequeue()) != nullptr)
         addPacket(p);
     }
 
diff --git a/iocore/net/P_UDPPacket.h b/iocore/net/P_UDPPacket.h
index f93f71491b5..0c37a3934a7 100644
--- a/iocore/net/P_UDPPacket.h
+++ b/iocore/net/P_UDPPacket.h
@@ -62,7 +62,7 @@ inkcoreapi extern ClassAllocator udpPacketAllocator;
 
 TS_INLINE
 UDPPacketInternal::UDPPacketInternal()
-  : pktLength(0), reqGenerationNum(0), delivery_time(0), cont(NULL), conn(NULL), in_the_priority_queue(0), in_heap(0)
+  : pktLength(0), reqGenerationNum(0), delivery_time(0), cont(nullptr), conn(nullptr), in_the_priority_queue(0), in_heap(0)
 {
   memset(&from, '\0', sizeof(from));
   memset(&to, '\0', sizeof(to));
@@ -71,16 +71,16 @@ UDPPacketInternal::UDPPacketInternal()
 TS_INLINE
 UDPPacketInternal::~UDPPacketInternal()
 {
-  chain = NULL;
+  chain = nullptr;
 }
 
 TS_INLINE void
 UDPPacketInternal::free()
 {
-  chain = NULL;
+  chain = nullptr;
   if (conn)
     conn->Release();
-  conn = NULL;
+  conn = nullptr;
   udpPacketAllocator.free(this);
 }
 
@@ -145,7 +145,7 @@ UDPPacket::setConnection(UDPConnection *c)
     if (conn == c)
       return;
     conn->Release();
-    conn = NULL;
+    conn = nullptr;
   }
   conn = (UDPConnectionInternal *)c;
   conn->AddRef();
@@ -154,7 +154,7 @@ UDPPacket::setConnection(UDPConnection *c)
 TS_INLINE IOBufferBlock *
 UDPPacket::getIOBlockChain(void)
 {
-  ink_assert(dynamic_cast(this) != NULL);
+  ink_assert(dynamic_cast(this) != nullptr);
   return ((UDPPacketInternal *)this)->chain.get();
 }
 
@@ -223,7 +223,7 @@ new_UDPPacket(struct sockaddr const *to, ink_hrtime when, Ptr buf
 TS_INLINE UDPPacket *
 new_UDPPacket(ink_hrtime when, Ptr buf)
 {
-  return new_UDPPacket(NULL, when, buf);
+  return new_UDPPacket(nullptr, when, buf);
 }
 
 TS_INLINE UDPPacket *
diff --git a/iocore/net/P_UnixCompletionUtil.h b/iocore/net/P_UnixCompletionUtil.h
index 3e416d284eb..b9260896d97 100644
--- a/iocore/net/P_UnixCompletionUtil.h
+++ b/iocore/net/P_UnixCompletionUtil.h
@@ -37,7 +37,7 @@ completionUtil::create()
 TS_INLINE void
 completionUtil::destroy(Event *e)
 {
-  ink_assert(e != NULL);
+  ink_assert(e != nullptr);
   UDPIOEvent *u = (UDPIOEvent *)e;
   UDPIOEvent::free(u);
 }
diff --git a/iocore/net/P_UnixNet.h b/iocore/net/P_UnixNet.h
index e12f3fd2542..f514ce846c0 100644
--- a/iocore/net/P_UnixNet.h
+++ b/iocore/net/P_UnixNet.h
@@ -402,7 +402,7 @@ read_disable(NetHandler *nh, UnixNetVConnection *vc)
   if (vc->inactivity_timeout) {
     if (!vc->write.enabled) {
       vc->inactivity_timeout->cancel_action();
-      vc->inactivity_timeout = NULL;
+      vc->inactivity_timeout = nullptr;
     }
   }
 #else
@@ -423,7 +423,7 @@ write_disable(NetHandler *nh, UnixNetVConnection *vc)
   if (vc->inactivity_timeout) {
     if (!vc->read.enabled) {
       vc->inactivity_timeout->cancel_action();
-      vc->inactivity_timeout = NULL;
+      vc->inactivity_timeout = nullptr;
     }
   }
 #else
@@ -505,7 +505,7 @@ EventIO::start(EventLoop l, int afd, Continuation *c, int e)
     EV_SET(&ev[n++], fd, EVFILT_READ, EV_ADD | INK_EV_EDGE_TRIGGER, 0, 0, this);
   if (e & EVENTIO_WRITE)
     EV_SET(&ev[n++], fd, EVFILT_WRITE, EV_ADD | INK_EV_EDGE_TRIGGER, 0, 0, this);
-  return kevent(l->kqueue_fd, &ev[0], n, NULL, 0, NULL);
+  return kevent(l->kqueue_fd, &ev[0], n, nullptr, 0, nullptr);
 #endif
 #if TS_USE_PORT
   events     = e;
@@ -557,7 +557,7 @@ EventIO::modify(int e)
   }
   events = ee;
   if (n)
-    return kevent(event_loop->kqueue_fd, &ev[0], n, NULL, 0, NULL);
+    return kevent(event_loop->kqueue_fd, &ev[0], n, nullptr, 0, nullptr);
   else
     return 0;
 #endif
@@ -608,7 +608,7 @@ EventIO::refresh(int e)
   if (e & EVENTIO_WRITE)
     EV_SET(&ev[n++], fd, EVFILT_WRITE, EV_ADD | INK_EV_EDGE_TRIGGER, 0, 0, this);
   if (n)
-    return kevent(event_loop->kqueue_fd, &ev[0], n, NULL, 0, NULL);
+    return kevent(event_loop->kqueue_fd, &ev[0], n, nullptr, 0, nullptr);
   else
     return 0;
 #endif
@@ -652,7 +652,7 @@ EventIO::stop()
     Debug("iocore_eventio", "[EventIO::stop] %d[%s]=port_dissociate(%d,%d,%d)", retval, retval < 0 ? strerror(errno) : "ok",
           event_loop->port_fd, PORT_SOURCE_FD, fd);
 #endif
-    event_loop = NULL;
+    event_loop = nullptr;
     return retval;
   }
   return 0;
diff --git a/iocore/net/P_UnixNetProcessor.h b/iocore/net/P_UnixNetProcessor.h
index a3285bec2aa..3f3de01fa36 100644
--- a/iocore/net/P_UnixNetProcessor.h
+++ b/iocore/net/P_UnixNetProcessor.h
@@ -37,8 +37,8 @@ struct UnixNetProcessor : public NetProcessor {
 public:
   virtual Action *accept_internal(Continuation *cont, int fd, AcceptOptions const &opt);
 
-  Action *connect_re_internal(Continuation *cont, sockaddr const *target, NetVCOptions *options = NULL);
-  Action *connect(Continuation *cont, UnixNetVConnection **vc, sockaddr const *target, NetVCOptions *opt = NULL);
+  Action *connect_re_internal(Continuation *cont, sockaddr const *target, NetVCOptions *options = nullptr);
+  Action *connect(Continuation *cont, UnixNetVConnection **vc, sockaddr const *target, NetVCOptions *opt = nullptr);
 
   virtual NetAccept *createNetAccept(const NetProcessor::AcceptOptions &opt);
   virtual NetVConnection *allocate_vc(EThread *t);
diff --git a/iocore/net/P_UnixNetVConnection.h b/iocore/net/P_UnixNetVConnection.h
index 6427911b0c9..f2d40652c86 100644
--- a/iocore/net/P_UnixNetVConnection.h
+++ b/iocore/net/P_UnixNetVConnection.h
@@ -66,7 +66,7 @@ NetVCOptions::reset()
 
   etype = ET_NET;
 
-  sni_servername = NULL;
+  sni_servername = nullptr;
 }
 
 TS_INLINE void
@@ -187,7 +187,7 @@ class UnixNetVConnection : public NetVConnection
   const char *
   protocol_contains(const char *tag) const
   {
-    const char *retval   = NULL;
+    const char *retval   = nullptr;
     unsigned int tag_len = strlen(tag);
     const char *test_tag = options.get_proto_string();
     if (strncmp(tag, test_tag, tag_len) == 0) {
@@ -405,7 +405,7 @@ UnixNetVConnection::cancel_inactivity_timeout()
   if (inactivity_timeout) {
     Debug("socket", "Cancel inactive timeout for NetVC=%p", this);
     inactivity_timeout->cancel_action(this);
-    inactivity_timeout = NULL;
+    inactivity_timeout = nullptr;
   }
 #else
   set_inactivity_timeout(0);
@@ -421,7 +421,7 @@ UnixNetVConnection::cancel_active_timeout()
   if (active_timeout) {
     Debug("socket", "Cancel active timeout for NetVC=%p", this);
     active_timeout->cancel_action(this);
-    active_timeout = NULL;
+    active_timeout = nullptr;
   }
 #else
   next_activity_timeout_at = 0;
diff --git a/iocore/net/P_UnixUDPConnection.h b/iocore/net/P_UnixUDPConnection.h
index 12019a2ccc5..6c71d46d63e 100644
--- a/iocore/net/P_UnixUDPConnection.h
+++ b/iocore/net/P_UnixUDPConnection.h
@@ -61,7 +61,7 @@ class UnixUDPConnection : public UDPConnectionInternal
 };
 
 TS_INLINE
-UnixUDPConnection::UnixUDPConnection(int the_fd) : onCallbackQueue(0), callbackAction(NULL), ethread(NULL), m_errno(0)
+UnixUDPConnection::UnixUDPConnection(int the_fd) : onCallbackQueue(0), callbackAction(nullptr), ethread(nullptr), m_errno(0)
 {
   fd = the_fd;
   UDPPacketInternal p;
@@ -74,8 +74,8 @@ UnixUDPConnection::init(int the_fd)
 {
   fd              = the_fd;
   onCallbackQueue = 0;
-  callbackAction  = NULL;
-  ethread         = NULL;
+  callbackAction  = nullptr;
+  ethread         = nullptr;
   m_errno         = 0;
 
   UDPPacketInternal p;
@@ -101,7 +101,7 @@ UDPConnection::recv(Continuation *c)
   UnixUDPConnection *p = (UnixUDPConnection *)this;
   // register callback interest.
   p->continuation = c;
-  ink_assert(c != NULL);
+  ink_assert(c != nullptr);
   mutex         = c->mutex;
   p->recvActive = 1;
   return ACTION_RESULT_NONE;
diff --git a/iocore/net/SSLCertLookup.cc b/iocore/net/SSLCertLookup.cc
index 972071d873b..b6547cdf9cd 100644
--- a/iocore/net/SSLCertLookup.cc
+++ b/iocore/net/SSLCertLookup.cc
@@ -80,7 +80,7 @@ struct SSLAddressLookupKey {
   }
 
 private:
-  char key[(TS_IP6_SIZE * 2) /* hex addr */ + 1 /* dot */ + 4 /* port */ + 1 /* NULL */];
+  char key[(TS_IP6_SIZE * 2) /* hex addr */ + 1 /* dot */ + 4 /* port */ + 1 /* nullptr */];
   unsigned char sep; // offset of address/port separator
 };
 
@@ -236,14 +236,14 @@ SSLCertContext::release()
 {
   if (keyblock) {
     ticket_block_free(keyblock);
-    keyblock = NULL;
+    keyblock = nullptr;
   }
 
   SSLReleaseContext(ctx);
-  ctx = NULL;
+  ctx = nullptr;
 }
 
-SSLCertLookup::SSLCertLookup() : ssl_storage(new SSLContextStorage()), ssl_default(NULL), is_valid(true)
+SSLCertLookup::SSLCertLookup() : ssl_storage(new SSLContextStorage()), ssl_default(nullptr), is_valid(true)
 {
 }
 
@@ -275,7 +275,7 @@ SSLCertLookup::find(const IpEndpoint &address) const
     return this->ssl_storage->lookup(key.get());
   }
 
-  return NULL;
+  return nullptr;
 }
 
 int
@@ -349,7 +349,7 @@ reverse_dns_name(const char *hostname, char (&reversed)[TS_MAX_HOST_NAME_LEN + 1
     ssize_t remain = ptr - reversed;
 
     if (remain < (len + 1)) {
-      return NULL;
+      return nullptr;
     }
 
     ptr -= len;
@@ -386,7 +386,7 @@ SSLContextStorage::~SSLContextStorage()
   // First sort the array so we can efficiently detect duplicates
   // and avoid the double free
   this->ctx_store.qsort(SSLCtxCompare);
-  SSL_CTX *last_ctx = NULL;
+  SSL_CTX *last_ctx = nullptr;
   for (unsigned i = 0; i < this->ctx_store.length(); ++i) {
     if (this->ctx_store[i].ctx != last_ctx) {
       last_ctx = this->ctx_store[i].ctx;
@@ -430,7 +430,7 @@ SSLContextStorage::insert(const char *name, int idx)
     if (subdomain && subdomain[1] == '.') {
       subdomain += 2; // Move beyond the '.'
     } else {
-      subdomain = NULL;
+      subdomain = nullptr;
     }
     if (subdomain) {
       if (ink_hash_table_lookup(this->wilddomains, subdomain, &value) && reinterpret_cast(idx) != value) {
@@ -477,7 +477,7 @@ SSLContextStorage::lookup(const char *name) const
       return &(this->ctx_store[reinterpret_cast(value)]);
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 #if TS_HAS_TESTS
diff --git a/iocore/net/SSLClientUtils.cc b/iocore/net/SSLClientUtils.cc
index bfc3cf75c39..f7af713e2ca 100644
--- a/iocore/net/SSLClientUtils.cc
+++ b/iocore/net/SSLClientUtils.cc
@@ -65,10 +65,10 @@ verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
   ssl   = static_cast(X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()));
   netvc = SSLNetVCAccess(ssl);
 
-  if (netvc != NULL) {
+  if (netvc != nullptr) {
     // Match SNI if present
     if (netvc->options.sni_servername) {
-      char *matched_name = NULL;
+      char *matched_name = nullptr;
       if (validate_hostname(cert, reinterpret_cast(netvc->options.sni_servername.get()), false, &matched_name)) {
         SSLDebug("Hostname %s verified OK, matched %s", netvc->options.sni_servername.get(), matched_name);
         ats_free(matched_name);
@@ -80,7 +80,7 @@ verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
     else {
       char buff[INET6_ADDRSTRLEN];
       ats_ip_ntop(netvc->get_remote_addr(), buff, INET6_ADDRSTRLEN);
-      if (validate_hostname(cert, reinterpret_cast(buff), true, NULL)) {
+      if (validate_hostname(cert, reinterpret_cast(buff), true, nullptr)) {
         SSLDebug("IP %s verified OK", buff);
         return preverify_ok;
       }
@@ -94,9 +94,9 @@ verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
 SSL_CTX *
 SSLInitClientContext(const SSLConfigParams *params)
 {
-  ink_ssl_method_t meth = NULL;
-  SSL_CTX *client_ctx   = NULL;
-  char *clientKeyPtr    = NULL;
+  ink_ssl_method_t meth = nullptr;
+  SSL_CTX *client_ctx   = nullptr;
+  char *clientKeyPtr    = nullptr;
 
   // Note that we do not call RAND_seed() explicitly here, we depend on OpenSSL
   // to do the seeding of the PRNG for us. This is the case for all platforms that
@@ -115,7 +115,7 @@ SSLInitClientContext(const SSLConfigParams *params)
   if (params->ssl_client_ctx_protocols) {
     SSL_CTX_set_options(client_ctx, params->ssl_client_ctx_protocols);
   }
-  if (params->client_cipherSuite != NULL) {
+  if (params->client_cipherSuite != nullptr) {
     if (!SSL_CTX_set_cipher_list(client_ctx, params->client_cipherSuite)) {
       SSLError("invalid client cipher suite in records.config");
       goto fail;
@@ -125,11 +125,11 @@ SSLInitClientContext(const SSLConfigParams *params)
   // if no path is given for the client private key,
   // assume it is contained in the client certificate file.
   clientKeyPtr = params->clientKeyPath;
-  if (clientKeyPtr == NULL) {
+  if (clientKeyPtr == nullptr) {
     clientKeyPtr = params->clientCertPath;
   }
 
-  if (params->clientCertPath != 0) {
+  if (params->clientCertPath != nullptr) {
     if (!SSL_CTX_use_certificate_chain_file(client_ctx, params->clientCertPath)) {
       SSLError("failed to load client certificate from %s", params->clientCertPath);
       goto fail;
@@ -150,7 +150,7 @@ SSLInitClientContext(const SSLConfigParams *params)
     SSL_CTX_set_verify(client_ctx, SSL_VERIFY_PEER, verify_callback);
     SSL_CTX_set_verify_depth(client_ctx, params->client_verify_depth);
 
-    if (params->clientCACertFilename != NULL || params->clientCACertPath != NULL) {
+    if (params->clientCACertFilename != nullptr || params->clientCACertPath != nullptr) {
       if (!SSL_CTX_load_verify_locations(client_ctx, params->clientCACertFilename, params->clientCACertPath)) {
         SSLError("invalid client CA Certificate file (%s) or CA Certificate path (%s)", params->clientCACertFilename,
                  params->clientCACertPath);
diff --git a/iocore/net/SSLConfig.cc b/iocore/net/SSLConfig.cc
index 55997fee894..898fdbbbc36 100644
--- a/iocore/net/SSLConfig.cc
+++ b/iocore/net/SSLConfig.cc
@@ -52,15 +52,15 @@ int SSLConfigParams::ssl_handshake_timeout_in               = 0;
 size_t SSLConfigParams::session_cache_number_buckets        = 1024;
 bool SSLConfigParams::session_cache_skip_on_lock_contention = false;
 size_t SSLConfigParams::session_cache_max_bucket_size       = 100;
-init_ssl_ctx_func SSLConfigParams::init_ssl_ctx_cb          = NULL;
-load_ssl_file_func SSLConfigParams::load_ssl_file_cb        = NULL;
+init_ssl_ctx_func SSLConfigParams::init_ssl_ctx_cb          = nullptr;
+load_ssl_file_func SSLConfigParams::load_ssl_file_cb        = nullptr;
 
 // TS-3534 Wiretracing for SSL Connections
 int SSLConfigParams::ssl_wire_trace_enabled       = 0;
-char *SSLConfigParams::ssl_wire_trace_addr        = NULL;
-IpAddr *SSLConfigParams::ssl_wire_trace_ip        = NULL;
+char *SSLConfigParams::ssl_wire_trace_addr        = nullptr;
+IpAddr *SSLConfigParams::ssl_wire_trace_ip        = nullptr;
 int SSLConfigParams::ssl_wire_trace_percentage    = 0;
-char *SSLConfigParams::ssl_wire_trace_server_name = NULL;
+char *SSLConfigParams::ssl_wire_trace_server_name = nullptr;
 
 static ConfigUpdateHandler *sslCertUpdate;
 
@@ -73,10 +73,24 @@ static ConfigUpdateHandler *sslCertUpdate;
 
 SSLConfigParams::SSLConfigParams()
 {
-  serverCertPathOnly = serverCertChainFilename = configFilePath = serverCACertFilename = serverCACertPath = clientCertPath =
-    clientKeyPath = clientCACertFilename = clientCACertPath = cipherSuite = client_cipherSuite = dhparamsFile = serverKeyPathOnly =
-      ticket_key_filename                                                                                     = NULL;
-  default_global_keyblock                                                                                     = NULL;
+  serverCertPathOnly      = nullptr;
+  serverCertChainFilename = nullptr;
+  configFilePath          = nullptr;
+  serverCACertFilename    = nullptr;
+  serverCACertPath        = nullptr;
+  clientCertPath          = nullptr;
+
+  clientKeyPath        = nullptr;
+  clientCACertFilename = nullptr;
+  clientCACertPath     = nullptr;
+  cipherSuite          = nullptr;
+  client_cipherSuite   = nullptr;
+  dhparamsFile         = nullptr;
+  serverKeyPathOnly    = nullptr;
+
+  ticket_key_filename     = nullptr;
+  default_global_keyblock = nullptr;
+
   clientCertLevel = client_verify_depth = verify_depth = clientVerify = 0;
 
   ssl_ctx_options               = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;
@@ -123,7 +137,7 @@ SSLConfigParams::cleanup()
 
  If path is *not* absolute, consider it relative to PREFIX
  if it's empty, just take SYSCONFDIR, otherwise we can take it as-is
- if final_path is NULL, it will not be updated.
+ if final_path is nullptr, it will not be updated.
 
  XXX: Add handling for Windows?
  */
@@ -132,7 +146,7 @@ set_paths_helper(const char *path, const char *filename, char **final_path, char
 {
   if (final_path) {
     if (path && path[0] != '/') {
-      *final_path = RecConfigReadPrefixPath(NULL, path);
+      *final_path = RecConfigReadPrefixPath(nullptr, path);
     } else if (!path || path[0] == '\0') {
       *final_path = RecConfigReadConfigDir();
     } else {
@@ -141,23 +155,23 @@ set_paths_helper(const char *path, const char *filename, char **final_path, char
   }
 
   if (final_filename) {
-    *final_filename = filename ? Layout::get()->relative_to(path, filename) : NULL;
+    *final_filename = filename ? Layout::get()->relative_to(path, filename) : nullptr;
   }
 }
 
 void
 SSLConfigParams::initialize()
 {
-  char *serverCertRelativePath          = NULL;
-  char *ssl_server_private_key_path     = NULL;
-  char *CACertRelativePath              = NULL;
-  char *ssl_client_cert_filename        = NULL;
-  char *ssl_client_cert_path            = NULL;
-  char *ssl_client_private_key_filename = NULL;
-  char *ssl_client_private_key_path     = NULL;
-  char *clientCACertRelativePath        = NULL;
-  char *ssl_server_ca_cert_filename     = NULL;
-  char *ssl_client_ca_cert_filename     = NULL;
+  char *serverCertRelativePath          = nullptr;
+  char *ssl_server_private_key_path     = nullptr;
+  char *CACertRelativePath              = nullptr;
+  char *ssl_client_cert_filename        = nullptr;
+  char *ssl_client_cert_path            = nullptr;
+  char *ssl_client_private_key_filename = nullptr;
+  char *ssl_client_private_key_path     = nullptr;
+  char *clientCACertRelativePath        = nullptr;
+  char *ssl_server_ca_cert_filename     = nullptr;
+  char *ssl_client_ca_cert_filename     = nullptr;
 
   cleanup();
 
@@ -237,14 +251,14 @@ SSLConfigParams::initialize()
 
   REC_ReadConfigStringAlloc(serverCertChainFilename, "proxy.config.ssl.server.cert_chain.filename");
   REC_ReadConfigStringAlloc(serverCertRelativePath, "proxy.config.ssl.server.cert.path");
-  set_paths_helper(serverCertRelativePath, NULL, &serverCertPathOnly, NULL);
+  set_paths_helper(serverCertRelativePath, nullptr, &serverCertPathOnly, nullptr);
   ats_free(serverCertRelativePath);
 
   configFilePath = RecConfigReadConfigPath("proxy.config.ssl.server.multicert.filename");
   REC_ReadConfigInteger(configExitOnLoadError, "proxy.config.ssl.server.multicert.exit_on_load_fail");
 
   REC_ReadConfigStringAlloc(ssl_server_private_key_path, "proxy.config.ssl.server.private_key.path");
-  set_paths_helper(ssl_server_private_key_path, NULL, &serverKeyPathOnly, NULL);
+  set_paths_helper(ssl_server_private_key_path, nullptr, &serverKeyPathOnly, nullptr);
   ats_free(ssl_server_private_key_path);
 
   REC_ReadConfigStringAlloc(ssl_server_ca_cert_filename, "proxy.config.ssl.CA.cert.filename");
@@ -294,17 +308,17 @@ SSLConfigParams::initialize()
   client_verify_depth = 7;
   REC_ReadConfigInt32(clientVerify, "proxy.config.ssl.client.verify.server");
 
-  ssl_client_cert_filename = NULL;
-  ssl_client_cert_path     = NULL;
+  ssl_client_cert_filename = nullptr;
+  ssl_client_cert_path     = nullptr;
   REC_ReadConfigStringAlloc(ssl_client_cert_filename, "proxy.config.ssl.client.cert.filename");
   REC_ReadConfigStringAlloc(ssl_client_cert_path, "proxy.config.ssl.client.cert.path");
-  set_paths_helper(ssl_client_cert_path, ssl_client_cert_filename, NULL, &clientCertPath);
+  set_paths_helper(ssl_client_cert_path, ssl_client_cert_filename, nullptr, &clientCertPath);
   ats_free_null(ssl_client_cert_filename);
   ats_free_null(ssl_client_cert_path);
 
   REC_ReadConfigStringAlloc(ssl_client_private_key_filename, "proxy.config.ssl.client.private_key.filename");
   REC_ReadConfigStringAlloc(ssl_client_private_key_path, "proxy.config.ssl.client.private_key.path");
-  set_paths_helper(ssl_client_private_key_path, ssl_client_private_key_filename, NULL, &clientKeyPath);
+  set_paths_helper(ssl_client_private_key_path, ssl_client_private_key_filename, nullptr, &clientKeyPath);
   ats_free_null(ssl_client_private_key_filename);
   ats_free_null(ssl_client_private_key_path);
 
@@ -325,16 +339,16 @@ SSLConfigParams::initialize()
       ssl_wire_trace_ip = new IpAddr();
       ssl_wire_trace_ip->load(ssl_wire_trace_addr);
     } else {
-      ssl_wire_trace_ip = NULL;
+      ssl_wire_trace_ip = nullptr;
     }
     // wire trace percentage of requests
     REC_EstablishStaticConfigInt32(ssl_wire_trace_percentage, "proxy.config.ssl.wire_trace_percentage");
     REC_EstablishStaticConfigStringAlloc(ssl_wire_trace_server_name, "proxy.config.ssl.wire_trace_server_name");
   } else {
-    ssl_wire_trace_addr        = NULL;
-    ssl_wire_trace_ip          = NULL;
+    ssl_wire_trace_addr        = nullptr;
+    ssl_wire_trace_ip          = nullptr;
     ssl_wire_trace_percentage  = 0;
-    ssl_wire_trace_server_name = NULL;
+    ssl_wire_trace_server_name = nullptr;
   }
 }
 
diff --git a/iocore/net/SSLDynlock.cc b/iocore/net/SSLDynlock.cc
index c4ddc3d4f70..df702db2969 100644
--- a/iocore/net/SSLDynlock.cc
+++ b/iocore/net/SSLDynlock.cc
@@ -27,7 +27,7 @@
 #include "ts/Diags.h"
 
 struct CRYPTO_dynlock_value {
-  CRYPTO_dynlock_value(const char *f, int l) : file(f), line(l) { ink_mutex_init(&mutex, NULL); }
+  CRYPTO_dynlock_value(const char *f, int l) : file(f), line(l) { ink_mutex_init(&mutex, nullptr); }
   ~CRYPTO_dynlock_value() { ink_mutex_destroy(&mutex); }
   const char *file;
   int line;
diff --git a/iocore/net/SSLInternal.cc b/iocore/net/SSLInternal.cc
index deaf70ebedc..fcc042a8e49 100644
--- a/iocore/net/SSLInternal.cc
+++ b/iocore/net/SSLInternal.cc
@@ -37,7 +37,7 @@
 void
 SSL_set_rbio(SSL *ssl, BIO *rbio)
 {
-  if (ssl->rbio != NULL) {
+  if (ssl->rbio != nullptr) {
     BIO_free(ssl->rbio);
   }
   ssl->rbio = rbio;
diff --git a/iocore/net/SSLNetProcessor.cc b/iocore/net/SSLNetProcessor.cc
index acc244fc0c0..7e3edd71e86 100644
--- a/iocore/net/SSLNetProcessor.cc
+++ b/iocore/net/SSLNetProcessor.cc
@@ -52,7 +52,7 @@ void
 SSLNetProcessor::cleanup(void)
 {
   SSLReleaseContext(client_ctx);
-  client_ctx = NULL;
+  client_ctx = nullptr;
 }
 
 int
@@ -113,7 +113,7 @@ SSLNetProcessor::allocate_vc(EThread *t)
   return vc;
 }
 
-SSLNetProcessor::SSLNetProcessor() : client_ctx(NULL)
+SSLNetProcessor::SSLNetProcessor() : client_ctx(nullptr)
 {
 }
 
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 7a7eab64d10..bad8be1eacf 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -42,7 +42,7 @@ void SSL_set_rbio(SSL *ssl, BIO *rbio);
 
 // This is missing from BoringSSL
 #ifndef BIO_eof
-#define BIO_eof(b) (int)BIO_ctrl(b, BIO_CTRL_EOF, 0, NULL)
+#define BIO_eof(b) (int)BIO_ctrl(b, BIO_CTRL_EOF, 0, nullptr)
 #endif
 
 #define SSL_READ_ERROR_NONE 0
@@ -74,7 +74,7 @@ class ContWrapper : public Continuation
   ContWrapper(ProxyMutex *mutex,             ///< Mutex for this continuation (primary lock).
               Continuation *target,          ///< "Real" continuation we want to call.
               int eventId = EVENT_IMMEDIATE, ///< Event ID for invocation of @a target.
-              void *edata = 0                ///< Data for invocation of @a target.
+              void *edata = nullptr          ///< Data for invocation of @a target.
               )
     : Continuation(mutex), _target(target), _eventId(eventId), _edata(edata)
   {
@@ -111,7 +111,7 @@ class ContWrapper : public Continuation
   wrap(ProxyMutex *mutex,             ///< Mutex for this continuation (primary lock).
        Continuation *target,          ///< "Real" continuation we want to call.
        int eventId = EVENT_IMMEDIATE, ///< Event ID for invocation of @a target.
-       void *edata = 0                ///< Data for invocation of @a target.
+       void *edata = nullptr          ///< Data for invocation of @a target.
        )
   {
     EThread *eth = this_ethread();
@@ -171,12 +171,12 @@ debug_certificate_name(const char *msg, X509_NAME *name)
 {
   BIO *bio;
 
-  if (name == NULL) {
+  if (name == nullptr) {
     return;
   }
 
   bio = BIO_new(BIO_s_mem());
-  if (bio == NULL) {
+  if (bio == nullptr) {
     return;
   }
 
@@ -794,7 +794,7 @@ SSLNetVConnection::load_buffer_and_write(int64_t towrite, MIOBufferAccessor &buf
 }
 
 SSLNetVConnection::SSLNetVConnection()
-  : ssl(NULL),
+  : ssl(nullptr),
     sslHandshakeBeginTime(0),
     sslLastWriteTime(0),
     sslTotalBytesSent(0),
@@ -802,14 +802,14 @@ SSLNetVConnection::SSLNetVConnection()
     sslHandShakeComplete(false),
     sslClientRenegotiationAbort(false),
     sslSessionCacheHit(false),
-    handShakeBuffer(NULL),
-    handShakeHolder(NULL),
-    handShakeReader(NULL),
+    handShakeBuffer(nullptr),
+    handShakeHolder(nullptr),
+    handShakeReader(nullptr),
     handShakeBioStored(0),
     sslPreAcceptHookState(SSL_HOOKS_INIT),
     sslHandshakeHookState(HANDSHAKE_HOOKS_PRE),
-    npnSet(NULL),
-    npnEndpoint(NULL),
+    npnSet(nullptr),
+    npnEndpoint(nullptr),
     sslTrace(false)
 {
 }
@@ -817,7 +817,7 @@ SSLNetVConnection::SSLNetVConnection()
 void
 SSLNetVConnection::do_io_close(int lerrno)
 {
-  if (this->ssl != NULL && sslHandShakeComplete) {
+  if (this->ssl != nullptr && sslHandShakeComplete) {
     int shutdown_mode = SSL_get_shutdown(ssl);
     Debug("ssl-shutdown", "previous shutdown state 0x%x", shutdown_mode);
     int new_shutdown_mode = shutdown_mode | SSL_RECEIVED_SHUTDOWN;
@@ -865,17 +865,17 @@ SSLNetVConnection::free(EThread *t)
   if (nh) {
     nh->read_ready_list.remove(this);
     nh->write_ready_list.remove(this);
-    nh = NULL;
+    nh = nullptr;
   }
 
   read.triggered      = 0;
   write.triggered     = 0;
   read.enabled        = 0;
   write.enabled       = 0;
-  read.vio._cont      = NULL;
-  write.vio._cont     = NULL;
-  read.vio.vc_server  = NULL;
-  write.vio.vc_server = NULL;
+  read.vio._cont      = nullptr;
+  write.vio._cont     = nullptr;
+  read.vio.vc_server  = nullptr;
+  write.vio.vc_server = nullptr;
 
   closed = 0;
   options.reset();
@@ -883,9 +883,9 @@ SSLNetVConnection::free(EThread *t)
 
   ink_assert(con.fd == NO_FD);
 
-  if (ssl != NULL) {
+  if (ssl != nullptr) {
     SSL_free(ssl);
-    ssl = NULL;
+    ssl = nullptr;
   }
 
   sslHandShakeComplete        = false;
@@ -900,10 +900,10 @@ SSLNetVConnection::free(EThread *t)
   }
 
   sslPreAcceptHookState = SSL_HOOKS_INIT;
-  curHook               = 0;
+  curHook               = nullptr;
   hookOpRequested       = SSL_HOOK_OP_DEFAULT;
-  npnSet                = NULL;
-  npnEndpoint           = NULL;
+  npnSet                = nullptr;
+  npnEndpoint           = nullptr;
   sslHandShakeComplete  = false;
   free_handshake_buffers();
   sslTrace = false;
@@ -927,7 +927,7 @@ SSLNetVConnection::sslStartHandShake(int event, int &err)
 
   switch (event) {
   case SSL_EVENT_SERVER:
-    if (this->ssl == NULL) {
+    if (this->ssl == nullptr) {
       SSLCertificateConfig::scoped_config lookup;
       IpEndpoint ip;
       int namelen = sizeof(ip);
@@ -952,7 +952,7 @@ SSLNetVConnection::sslStartHandShake(int event, int &err)
         this->attributes     = HttpProxyPort::TRANSPORT_BLIND_TUNNEL;
         sslHandShakeComplete = 1;
         SSL_free(this->ssl);
-        this->ssl = NULL;
+        this->ssl = nullptr;
         return EVENT_DONE;
       }
 
@@ -971,7 +971,7 @@ SSLNetVConnection::sslStartHandShake(int event, int &err)
 #endif
     }
 
-    if (this->ssl == NULL) {
+    if (this->ssl == nullptr) {
       SSLErrorVC(this, "failed to create SSL server session");
       return EVENT_ERROR;
     }
@@ -979,10 +979,10 @@ SSLNetVConnection::sslStartHandShake(int event, int &err)
     return sslServerHandShakeEvent(err);
 
   case SSL_EVENT_CLIENT:
-    if (this->ssl == NULL) {
+    if (this->ssl == nullptr) {
       this->ssl = make_ssl_connection(ssl_NetProcessor.client_ctx, this);
 
-      if (this->ssl == NULL) {
+      if (this->ssl == nullptr) {
         SSLErrorVC(this, "failed to create SSL client session");
         return EVENT_ERROR;
       }
@@ -1022,7 +1022,7 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
     }
 
     if (SSL_HOOKS_INVOKE == sslPreAcceptHookState) {
-      if (0 == curHook) { // no hooks left, we're done
+      if (nullptr == curHook) { // no hooks left, we're done
         sslPreAcceptHookState = SSL_HOOKS_DONE;
       } else {
         sslPreAcceptHookState = SSL_HOOKS_ACTIVE;
@@ -1052,7 +1052,7 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
   if (SSL_HOOK_OP_TUNNEL == hookOpRequested) {
     this->attributes = HttpProxyPort::TRANSPORT_BLIND_TUNNEL;
     SSL_free(this->ssl);
-    this->ssl = NULL;
+    this->ssl = nullptr;
     // Don't mark the handshake as complete yet,
     // Will be checking for that flag not being set after
     // we get out of this callback, and then will shuffle
@@ -1121,7 +1121,7 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
     }
 
     {
-      const unsigned char *proto = NULL;
+      const unsigned char *proto = nullptr;
       unsigned len               = 0;
 
 // If it's possible to negotiate both NPN and ALPN, then ALPN
@@ -1141,12 +1141,12 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
 
       if (len) {
         // If there's no NPN set, we should not have done this negotiation.
-        ink_assert(this->npnSet != NULL);
+        ink_assert(this->npnSet != nullptr);
 
         this->npnEndpoint = this->npnSet->findEndpoint(proto, len);
-        this->npnSet      = NULL;
+        this->npnSet      = nullptr;
 
-        if (this->npnEndpoint == NULL) {
+        if (this->npnEndpoint == nullptr) {
           Error("failed to find registered SSL endpoint for '%.*s'", (int)len, (const char *)proto);
           return EVENT_ERROR;
         }
@@ -1324,7 +1324,7 @@ SSLNetVConnection::sslClientHandShakeEvent(int &err)
 void
 SSLNetVConnection::registerNextProtocolSet(const SSLNextProtocolSet *s)
 {
-  ink_release_assert(this->npnSet == NULL);
+  ink_release_assert(this->npnSet == nullptr);
   this->npnSet = s;
 }
 
@@ -1336,7 +1336,7 @@ SSLNetVConnection::advertise_next_protocol(SSL *ssl, const unsigned char **out,
 {
   SSLNetVConnection *netvc = SSLNetVCAccess(ssl);
 
-  ink_release_assert(netvc != NULL);
+  ink_release_assert(netvc != nullptr);
 
   if (netvc->npnSet && netvc->npnSet->advertiseProtocols(out, outlen)) {
     // Successful return tells OpenSSL to advertise.
@@ -1353,10 +1353,10 @@ SSLNetVConnection::select_next_protocol(SSL *ssl, const unsigned char **out, uns
                                         const unsigned char *in ATS_UNUSED, unsigned inlen ATS_UNUSED, void *)
 {
   SSLNetVConnection *netvc = SSLNetVCAccess(ssl);
-  const unsigned char *npn = NULL;
+  const unsigned char *npn = nullptr;
   unsigned npnsz           = 0;
 
-  ink_release_assert(netvc != NULL);
+  ink_release_assert(netvc != nullptr);
 
   if (netvc->npnSet && netvc->npnSet->advertiseProtocols(&npn, &npnsz)) {
 // SSL_select_next_proto chooses the first server-offered protocol that appears in the clients protocol set, ie. the
@@ -1370,7 +1370,7 @@ SSLNetVConnection::select_next_protocol(SSL *ssl, const unsigned char **out, uns
 #endif /* HAVE_SSL_SELECT_NEXT_PROTO */
   }
 
-  *out    = NULL;
+  *out    = nullptr;
   *outlen = 0;
   return SSL_TLSEXT_ERR_NOACK;
 }
@@ -1388,14 +1388,14 @@ SSLNetVConnection::reenable(NetHandler *nh)
     // can be replaced by the plugin, it didn't seem reasonable to assume that the
     // callback would be executed again.  So we walk through the rest of the hooks
     // here in the reenable.
-    if (curHook != NULL) {
+    if (curHook != nullptr) {
       curHook = curHook->next();
     }
-    if (curHook != NULL) {
+    if (curHook != nullptr) {
       // Invoke the hook and return, wait for next reenable
       curHook->invoke(TS_EVENT_SSL_CERT, this);
       return;
-    } else { // curHook == NULL
+    } else { // curHook == nullptr
       // empty, set state to HOOKS_DONE
       this->sslHandshakeHookState = HANDSHAKE_HOOKS_DONE;
     }
@@ -1427,8 +1427,8 @@ SSLNetVConnection::callHooks(TSEvent eventId)
 
   // First time through, set the type of the hook that is currently being invoked
   if (HANDSHAKE_HOOKS_PRE == sslHandshakeHookState) {
-    // the previous hook should be DONE and set curHook to NULL before trigger the sni hook.
-    ink_assert(curHook == NULL);
+    // the previous hook should be DONE and set curHook to nullptr before trigger the sni hook.
+    ink_assert(curHook == nullptr);
     // set to HOOKS_CERT means CERT/SNI hooks has called by SSL_accept()
     this->sslHandshakeHookState = HANDSHAKE_HOOKS_CERT;
     // get Hooks
@@ -1440,7 +1440,7 @@ SSLNetVConnection::callHooks(TSEvent eventId)
   }
 
   bool reenabled = true;
-  if (curHook != NULL) {
+  if (curHook != nullptr) {
     // Otherwise, we have plugin hooks to run
     this->sslHandshakeHookState = HANDSHAKE_HOOKS_INVOKE;
     curHook->invoke(eventId, this);
@@ -1456,7 +1456,7 @@ SSLNetVConnection::callHooks(TSEvent eventId)
 bool
 SSLNetVConnection::computeSSLTrace()
 {
-// this has to happen before the handshake or else sni_servername will be NULL
+// this has to happen before the handshake or else sni_servername will be nullptr
 #if TS_USE_TLS_SNI
   bool sni_trace;
   if (ssl) {
@@ -1521,7 +1521,7 @@ SSLNetVConnection::populate(Connection &con, Continuation *c, void *arg)
 const char *
 SSLNetVConnection::map_tls_protocol_to_tag(const char *proto_string) const
 {
-  const char *retval    = NULL;
+  const char *retval    = nullptr;
   const char *ssl_proto = getSSLProtocol();
   if (ssl_proto && strncmp(ssl_proto, "TLSv1", 5) == 0) {
     if (ssl_proto[5] == '\0') {
@@ -1545,7 +1545,7 @@ SSLNetVConnection::populate_protocol(const char **results, int n) const
   int retval = 0;
   if (n > 0) {
     results[0] = map_tls_protocol_to_tag(getSSLProtocol());
-    if (results[0] != NULL) {
+    if (results[0] != nullptr) {
       retval++;
     }
     if (n > retval) {
@@ -1558,7 +1558,7 @@ SSLNetVConnection::populate_protocol(const char **results, int n) const
 const char *
 SSLNetVConnection::protocol_contains(const char *tag) const
 {
-  const char *retval   = NULL;
+  const char *retval   = nullptr;
   const char *tls_tag  = map_tls_protocol_to_tag(getSSLProtocol());
   unsigned int tag_len = strlen(tag);
   if (tag_len <= strlen(tls_tag) && strncmp(tag, tls_tag, tag_len) == 0) {
diff --git a/iocore/net/SSLNextProtocolAccept.cc b/iocore/net/SSLNextProtocolAccept.cc
index 26f935bcd2e..47068c32580 100644
--- a/iocore/net/SSLNextProtocolAccept.cc
+++ b/iocore/net/SSLNextProtocolAccept.cc
@@ -52,7 +52,7 @@ ssl_netvc_cast(int event, void *edata)
     ptr.vio = static_cast(edata);
     return dynamic_cast(ptr.vio->vc_server);
   default:
-    return NULL;
+    return nullptr;
   }
 }
 
@@ -76,7 +76,7 @@ struct SSLNextProtocolTrampoline : public Continuation {
 
     vio   = static_cast(edata);
     netvc = dynamic_cast(vio->vc_server);
-    ink_assert(netvc != NULL);
+    ink_assert(netvc != nullptr);
 
     switch (event) {
     case VC_EVENT_EOS:
@@ -84,7 +84,7 @@ struct SSLNextProtocolTrampoline : public Continuation {
     case VC_EVENT_ACTIVE_TIMEOUT:
     case VC_EVENT_INACTIVITY_TIMEOUT:
       // Cancel the read before we have a chance to delete the continuation
-      netvc->do_io_read(NULL, 0, NULL);
+      netvc->do_io_read(nullptr, 0, nullptr);
       netvc->do_io(VIO::CLOSE);
       delete this;
       return EVENT_ERROR;
@@ -97,10 +97,10 @@ struct SSLNextProtocolTrampoline : public Continuation {
     // Cancel the action, so later timeouts and errors don't try to
     // send the event to the Accept object.  After this point, the accept
     // object does not care.
-    netvc->set_action(NULL);
+    netvc->set_action(nullptr);
 
     // Cancel the read before we have a chance to delete the continuation
-    netvc->do_io_read(NULL, 0, NULL);
+    netvc->do_io_read(nullptr, 0, nullptr);
     plugin = netvc->endpoint();
     if (plugin) {
       send_plugin_event(plugin, NET_EVENT_ACCEPT, netvc);
@@ -128,7 +128,7 @@ SSLNextProtocolAccept::mainEvent(int event, void *edata)
 
   switch (event) {
   case NET_EVENT_ACCEPT:
-    ink_release_assert(netvc != NULL);
+    ink_release_assert(netvc != nullptr);
 
     netvc->setTransparentPassThrough(transparent_passthrough);
 
@@ -165,7 +165,7 @@ SSLNextProtocolAccept::unregisterEndpoint(const char *protocol, Continuation *ha
 }
 
 SSLNextProtocolAccept::SSLNextProtocolAccept(Continuation *ep, bool transparent_passthrough)
-  : SessionAccept(NULL), buffer(new_empty_MIOBuffer()), endpoint(ep), transparent_passthrough(transparent_passthrough)
+  : SessionAccept(nullptr), buffer(new_empty_MIOBuffer()), endpoint(ep), transparent_passthrough(transparent_passthrough)
 {
   SET_HANDLER(&SSLNextProtocolAccept::mainEvent);
 }
diff --git a/iocore/net/SSLNextProtocolSet.cc b/iocore/net/SSLNextProtocolSet.cc
index dc2ac939c08..68663490e18 100644
--- a/iocore/net/SSLNextProtocolSet.cc
+++ b/iocore/net/SSLNextProtocolSet.cc
@@ -48,10 +48,10 @@ create_npn_advertisement(const SSLNextProtocolSet::NextProtocolEndpoint::list_ty
   const SSLNextProtocolSet::NextProtocolEndpoint *ep;
   unsigned char *advertised;
 
-  *npn = NULL;
+  *npn = nullptr;
   *len = 0;
 
-  for (ep = endpoints.head; ep != NULL; ep = endpoints.next(ep)) {
+  for (ep = endpoints.head; ep != nullptr; ep = endpoints.next(ep)) {
     ink_release_assert((strlen(ep->protocol) > 0));
     *len += (strlen(ep->protocol) + 1);
   }
@@ -61,7 +61,7 @@ create_npn_advertisement(const SSLNextProtocolSet::NextProtocolEndpoint::list_ty
     goto fail;
   }
 
-  for (ep = endpoints.head; ep != NULL; ep = endpoints.next(ep)) {
+  for (ep = endpoints.head; ep != nullptr; ep = endpoints.next(ep)) {
     Debug("ssl", "advertising protocol %s", ep->protocol);
     advertised = append_protocol(ep->protocol, advertised);
   }
@@ -70,7 +70,7 @@ create_npn_advertisement(const SSLNextProtocolSet::NextProtocolEndpoint::list_ty
 
 fail:
   ats_free(*npn);
-  *npn = NULL;
+  *npn = nullptr;
   *len = 0;
   return false;
 }
@@ -102,7 +102,7 @@ SSLNextProtocolSet::registerEndpoint(const char *proto, Continuation *ep)
 
     if (npn) {
       ats_free(npn);
-      npn   = NULL;
+      npn   = nullptr;
       npnsz = 0;
     }
 
@@ -132,16 +132,16 @@ SSLNextProtocolSet::unregisterEndpoint(const char *proto, Continuation *ep)
 Continuation *
 SSLNextProtocolSet::findEndpoint(const unsigned char *proto, unsigned len) const
 {
-  for (const NextProtocolEndpoint *ep = this->endpoints.head; ep != NULL; ep = this->endpoints.next(ep)) {
+  for (const NextProtocolEndpoint *ep = this->endpoints.head; ep != nullptr; ep = this->endpoints.next(ep)) {
     size_t sz = strlen(ep->protocol);
     if (sz == len && memcmp(ep->protocol, proto, len) == 0) {
       return ep->endpoint;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
-SSLNextProtocolSet::SSLNextProtocolSet() : npn(0), npnsz(0)
+SSLNextProtocolSet::SSLNextProtocolSet() : npn(nullptr), npnsz(0)
 {
 }
 
diff --git a/iocore/net/SSLSessionCache.cc b/iocore/net/SSLSessionCache.cc
index 3d4e11b871e..a28b4b2a146 100644
--- a/iocore/net/SSLSessionCache.cc
+++ b/iocore/net/SSLSessionCache.cc
@@ -36,7 +36,7 @@
 using ts::detail::RBNode;
 
 /* Session Cache */
-SSLSessionCache::SSLSessionCache() : session_bucket(NULL), nbuckets(SSLConfigParams::session_cache_number_buckets)
+SSLSessionCache::SSLSessionCache() : session_bucket(nullptr), nbuckets(SSLConfigParams::session_cache_number_buckets)
 {
   Debug("ssl.session_cache", "Created new ssl session cache %p with %zu buckets each with size max size %zu", this, nbuckets,
         SSLConfigParams::session_cache_max_bucket_size);
@@ -104,7 +104,7 @@ SSLSessionCache::insertSession(const SSLSessionID &sid, SSL_SESSION *sess)
 void
 SSLSessionBucket::insertSession(const SSLSessionID &id, SSL_SESSION *sess)
 {
-  size_t len = i2d_SSL_SESSION(sess, NULL); // make sure we're not going to need more than SSL_MAX_SESSION_SIZE bytes
+  size_t len = i2d_SSL_SESSION(sess, nullptr); // make sure we're not going to need more than SSL_MAX_SESSION_SIZE bytes
   /* do not cache a session that's too big. */
   if (len > (size_t)SSL_MAX_SESSION_SIZE) {
     Debug("ssl.session_cache", "Unable to save SSL session because size of %zd exceeds the max of %d", len, SSL_MAX_SESSION_SIZE);
@@ -172,7 +172,7 @@ SSLSessionBucket::getSession(const SSLSessionID &id, SSL_SESSION **sess)
   while (node) {
     if (node->session_id == id) {
       const unsigned char *loc = reinterpret_cast(node->asn1_data->data());
-      *sess                    = d2i_SSL_SESSION(NULL, &loc, node->len_asn1_data);
+      *sess                    = d2i_SSL_SESSION(nullptr, &loc, node->len_asn1_data);
 
       return true;
     }
diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index 844a8a30125..99d98fc8972 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -138,11 +138,11 @@ static int ssl_session_ticket_index = -1;
 
 static int ssl_vc_index = -1;
 
-static ink_mutex *mutex_buf      = NULL;
+static ink_mutex *mutex_buf      = nullptr;
 static bool open_ssl_initialized = false;
 
-RecRawStatBlock *ssl_rsb                   = NULL;
-static InkHashTable *ssl_cipher_name_table = NULL;
+RecRawStatBlock *ssl_rsb                   = nullptr;
+static InkHashTable *ssl_cipher_name_table = nullptr;
 
 /* Using pthread thread ID and mutex functions directly, instead of
  * ATS this_ethread / ProxyMutex, so that other linked libraries
@@ -191,7 +191,7 @@ SSL_CTX_add_extra_chain_cert_bio(SSL_CTX *ctx, BIO *bio)
   X509 *cert;
 
   for (;;) {
-    cert = PEM_read_bio_X509_AUX(bio, NULL, NULL, NULL);
+    cert = PEM_read_bio_X509_AUX(bio, nullptr, nullptr, nullptr);
 
     if (!cert) {
       // No more the certificates in this file.
@@ -222,7 +222,7 @@ SSL_CTX_add_extra_chain_cert_file(SSL_CTX *ctx, const char *chainfile)
 bool
 ssl_session_timed_out(SSL_SESSION *session)
 {
-  return SSL_SESSION_get_timeout(session) < (long)(time(NULL) - SSL_SESSION_get_time(session));
+  return SSL_SESSION_get_timeout(session) < (long)(time(nullptr) - SSL_SESSION_get_time(session));
 }
 
 static void ssl_rm_cached_session(SSL_CTX *ctx, SSL_SESSION *sess);
@@ -243,7 +243,7 @@ ssl_get_cached_session(SSL *ssl, unsigned char *id, int len, int *copy)
     Debug("ssl.session_cache.get", "ssl_get_cached_session cached session '%s' context %p", printable_buf, SSL_get_SSL_CTX(ssl));
   }
 
-  SSL_SESSION *session = NULL;
+  SSL_SESSION *session = nullptr;
 
   if (session_cache->getSession(sid, &session)) {
     ink_assert(session);
@@ -255,7 +255,7 @@ ssl_get_cached_session(SSL *ssl, unsigned char *id, int len, int *copy)
 // from the openssl built-in hash table.  The external remove cb is not called
 #if 0 // This is currently eliminated, since it breaks things in odd ways (see TS-3710)
       ssl_rm_cached_session(SSL_get_SSL_CTX(ssl), session);
-      session = NULL;
+      session = nullptr;
 #endif
     } else {
       SSLNetVConnection *netvc = SSLNetVCAccess(ssl);
@@ -310,8 +310,8 @@ ssl_rm_cached_session(SSL_CTX *ctx, SSL_SESSION *sess)
 int
 set_context_cert(SSL *ssl)
 {
-  SSL_CTX *ctx       = NULL;
-  SSLCertContext *cc = NULL;
+  SSL_CTX *ctx       = nullptr;
+  SSLCertContext *cc = nullptr;
   SSLCertificateConfig::scoped_config lookup;
   const char *servername   = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
   SSLNetVConnection *netvc = SSLNetVCAccess(ssl);
@@ -349,7 +349,7 @@ set_context_cert(SSL *ssl)
   }
 
   // If there's no match on the server name, try to match on the peer address.
-  if (ctx == NULL) {
+  if (ctx == nullptr) {
     IpEndpoint ip;
     int namelen = sizeof(ip);
 
@@ -359,7 +359,7 @@ set_context_cert(SSL *ssl)
       ctx = cc->ctx;
   }
 
-  if (ctx != NULL) {
+  if (ctx != nullptr) {
     SSL_set_SSL_CTX(ssl, ctx);
 #if HAVE_OPENSSL_SESSION_TICKETS
     // Reset the ticket callback if needed
@@ -372,7 +372,7 @@ set_context_cert(SSL *ssl)
   ctx = SSL_get_SSL_CTX(ssl);
   Debug("ssl", "ssl_cert_callback %s SSL context %p for requested name '%s'", found ? "found" : "using", ctx, servername);
 
-  if (ctx == NULL) {
+  if (ctx == nullptr) {
     retval = 0;
     goto done;
   }
@@ -500,13 +500,13 @@ DH_get_2048_256()
     0x5E, 0x23, 0x27, 0xCF, 0xEF, 0x98, 0xC5, 0x82, 0x66, 0x4B, 0x4C, 0x0F, 0x6C, 0xC4, 0x16, 0x59};
   DH *dh;
 
-  if ((dh = DH_new()) == NULL)
-    return (NULL);
-  dh->p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL);
-  dh->g = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL);
-  if ((dh->p == NULL) || (dh->g == NULL)) {
+  if ((dh = DH_new()) == nullptr)
+    return (nullptr);
+  dh->p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), nullptr);
+  dh->g = BN_bin2bn(dh2048_g, sizeof(dh2048_g), nullptr);
+  if ((dh->p == nullptr) || (dh->g == nullptr)) {
     DH_free(dh);
-    return (NULL);
+    return (nullptr);
   }
   return (dh);
 }
@@ -519,20 +519,20 @@ ssl_context_enable_dhe(const char *dhparams_file, SSL_CTX *ctx)
 
   if (dhparams_file) {
     scoped_BIO bio(BIO_new_file(dhparams_file, "r"));
-    server_dh = PEM_read_bio_DHparams(bio.get(), NULL, NULL, NULL);
+    server_dh = PEM_read_bio_DHparams(bio.get(), nullptr, nullptr, nullptr);
   } else {
     server_dh = DH_get_2048_256();
   }
 
   if (!server_dh) {
     Error("SSL dhparams source returned invalid parameters");
-    return NULL;
+    return nullptr;
   }
 
   if (!SSL_CTX_set_options(ctx, SSL_OP_SINGLE_DH_USE) || !SSL_CTX_set_tmp_dh(ctx, server_dh)) {
     DH_free(server_dh);
     Error("failed to configure SSL DH");
-    return NULL;
+    return nullptr;
   }
 
   DH_free(server_dh);
@@ -564,12 +564,15 @@ static ssl_ticket_key_block *
 ssl_context_enable_tickets(SSL_CTX *ctx, const char *ticket_key_path)
 {
 #if HAVE_OPENSSL_SESSION_TICKETS
-  ssl_ticket_key_block *keyblock = NULL;
-  keyblock                       = ssl_create_ticket_keyblock(ticket_key_path);
+  ssl_ticket_key_block *keyblock = nullptr;
+
+  keyblock = ssl_create_ticket_keyblock(ticket_key_path);
+
   // Increase the stats.
-  if (ssl_rsb != NULL) { // ssl_rsb is not initialized during the first run.
+  if (ssl_rsb != nullptr) { // ssl_rsb is not initialized during the first run.
     SSL_INCREMENT_DYN_STAT(ssl_total_ticket_keys_renewed_stat);
   }
+
   // Setting the callback can only fail if OpenSSL does not recognize the
   // SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB constant. we set the callback first
   // so that we don't leave a ticket_key pointer attached if it fails.
@@ -583,11 +586,11 @@ ssl_context_enable_tickets(SSL_CTX *ctx, const char *ticket_key_path)
 
 fail:
   ticket_block_free(keyblock);
-  return NULL;
+  return nullptr;
 
 #else  /* !HAVE_OPENSSL_SESSION_TICKETS */
   (void)ticket_key_path;
-  return NULL;
+  return nullptr;
 #endif /* HAVE_OPENSSL_SESSION_TICKETS */
 }
 
@@ -740,7 +743,7 @@ ssl_private_key_passphrase_callback_builtin(char *buf, int size, int rwflag, voi
 static bool
 ssl_private_key_validate_exec(const char *cmdLine)
 {
-  if (NULL == cmdLine) {
+  if (nullptr == cmdLine) {
     errno = EINVAL;
     return false;
   }
@@ -884,7 +887,7 @@ SSLInitializeLibrary()
     mutex_buf = (ink_mutex *)OPENSSL_malloc(CRYPTO_num_locks() * sizeof(ink_mutex));
 
     for (int i = 0; i < CRYPTO_num_locks(); i++) {
-      ink_mutex_init(&mutex_buf[i], NULL);
+      ink_mutex_init(&mutex_buf[i], nullptr);
     }
 
     CRYPTO_set_locking_callback(SSL_locking_callback);
@@ -895,7 +898,7 @@ SSLInitializeLibrary()
   }
 
 #ifdef SSL_CTX_set_tlsext_ticket_key_cb
-  ssl_session_ticket_index = SSL_CTX_get_ex_new_index(0, NULL, NULL, NULL, session_ticket_free);
+  ssl_session_ticket_index = SSL_CTX_get_ex_new_index(0, nullptr, nullptr, nullptr, session_ticket_free);
   if (ssl_session_ticket_index == -1) {
     SSLError("failed to create session ticket index");
   }
@@ -907,7 +910,7 @@ SSLInitializeLibrary()
 
   // Reserve an application data index so that we can attach
   // the SSLNetVConnection to the SSL session.
-  ssl_vc_index = SSL_get_ex_new_index(0, (void *)"NetVC index", NULL, NULL, NULL);
+  ssl_vc_index = SSL_get_ex_new_index(0, (void *)"NetVC index", nullptr, nullptr, nullptr);
 
   open_ssl_initialized = true;
 }
@@ -921,7 +924,7 @@ SSLInitializeStatistics()
 
   // Allocate SSL statistics block.
   ssl_rsb = RecAllocateRawStatBlock((int)Ssl_Stat_Count);
-  ink_assert(ssl_rsb != NULL);
+  ink_assert(ssl_rsb != nullptr);
 
   // SSL client errors.
   RecRegisterRawStat(ssl_rsb, RECT_PROCESS, "proxy.process.ssl.user_agent_other_errors", RECD_COUNTER, RECP_PERSISTENT,
@@ -1229,7 +1232,7 @@ SSLDiagnostic(const SourceLocation &loc, bool debug, SSLNetVConnection *vc, cons
     }
 
     // Tally desired stats (only client/server connection stats, not init
-    // issues where vc is NULL)
+    // issues where vc is nullptr)
     if (vc) {
       // get_context() == NET_VCONNECTION_OUT if ats is client (we update server stats)
       if (vc->get_context() == NET_VCONNECTION_OUT) {
@@ -1267,7 +1270,7 @@ void
 SSLDebugBufferPrint(const char *tag, const char *buffer, unsigned buflen, const char *message)
 {
   if (is_debug_tag_set(tag)) {
-    if (message != NULL) {
+    if (message != nullptr) {
       fprintf(stdout, "%s\n", message);
     }
     for (unsigned ii = 0; ii < buflen; ii++) {
@@ -1280,7 +1283,7 @@ SSLDebugBufferPrint(const char *tag, const char *buffer, unsigned buflen, const
 SSL_CTX *
 SSLDefaultServerContext()
 {
-  ink_ssl_method_t meth = NULL;
+  ink_ssl_method_t meth = nullptr;
 
   meth = SSLv23_server_method();
   return SSL_CTX_new(meth);
@@ -1295,7 +1298,7 @@ SSLPrivateKeyHandler(SSL_CTX *ctx, const SSLConfigParams *params, const ats_scop
       SSLError("failed to load server private key from %s", (const char *)completeServerCertPath);
       return false;
     }
-  } else if (params->serverKeyPathOnly != NULL) {
+  } else if (params->serverKeyPathOnly != nullptr) {
     ats_scoped_str completeServerKeyPath(Layout::get()->relative_to(params->serverKeyPathOnly, keyPath));
     if (!SSL_CTX_use_PrivateKey_file(ctx, completeServerKeyPath, SSL_FILETYPE_PEM)) {
       SSLError("failed to load server private key from %s", (const char *)completeServerKeyPath);
@@ -1381,10 +1384,10 @@ asn1_strdup(ASN1_STRING *s)
 static bool
 ssl_index_certificate(SSLCertLookup *lookup, SSLCertContext const &cc, X509 *cert, const char *certname)
 {
-  X509_NAME *subject = NULL;
+  X509_NAME *subject = nullptr;
   bool inserted      = false;
 
-  if (NULL == cert) {
+  if (nullptr == cert) {
     Error("Failed to load certificate %s", certname);
     lookup->is_valid = false;
     return false;
@@ -1413,7 +1416,7 @@ ssl_index_certificate(SSLCertLookup *lookup, SSLCertContext const &cc, X509 *cer
 
 #if HAVE_OPENSSL_TS_H
   // Traverse the subjectAltNames (if any) and insert additional keys for the SSL context.
-  GENERAL_NAMES *names = (GENERAL_NAMES *)X509_get_ext_d2i(cert, NID_subject_alt_name, NULL, NULL);
+  GENERAL_NAMES *names = (GENERAL_NAMES *)X509_get_ext_d2i(cert, NID_subject_alt_name, nullptr, nullptr);
   if (names) {
     unsigned count = sk_GENERAL_NAME_num(names);
     for (unsigned i = 0; i < count; ++i) {
@@ -1485,7 +1488,7 @@ ssl_set_handshake_callbacks(SSL_CTX *ctx)
 #if TS_USE_TLS_SNI
 // Make sure the callbacks are set
 #if TS_USE_CERT_CB
-  SSL_CTX_set_cert_cb(ctx, ssl_cert_callback, NULL);
+  SSL_CTX_set_cert_cb(ctx, ssl_cert_callback, nullptr);
 #else
   SSL_CTX_set_tlsext_servername_callback(ctx, ssl_servername_callback);
 #endif
@@ -1499,10 +1502,10 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
   ats_scoped_str completeServerCertPath;
   SSL_CTX *ctx                 = SSLDefaultServerContext();
   EVP_MD_CTX *digest           = EVP_MD_CTX_create();
-  STACK_OF(X509_NAME) *ca_list = NULL;
+  STACK_OF(X509_NAME) *ca_list = nullptr;
   unsigned char hash_buf[EVP_MAX_MD_SIZE];
   unsigned int hash_len    = 0;
-  const char *setting_cert = sslMultCertSettings ? sslMultCertSettings->cert.get() : NULL;
+  const char *setting_cert = sslMultCertSettings ? sslMultCertSettings->cert.get() : nullptr;
 
   // disable selected protocols
   SSL_CTX_set_options(ctx, params->ssl_ctx_options);
@@ -1559,7 +1562,7 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
     if (sslMultCertSettings->dialog) {
       passphrase_cb_userdata ud(params, sslMultCertSettings->dialog, sslMultCertSettings->first_cert, sslMultCertSettings->key);
       // pass phrase dialog configuration
-      pem_password_cb *passwd_cb = NULL;
+      pem_password_cb *passwd_cb = nullptr;
       if (strncmp(sslMultCertSettings->dialog, "exec:", 5) == 0) {
         ud._serverDialog = &sslMultCertSettings->dialog[5];
         // validate the exec program
@@ -1602,9 +1605,9 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
       for (const char *certname = cert_tok.getNext(); certname; certname = cert_tok.getNext()) {
         completeServerCertPath = Layout::relative_to(params->serverCertPathOnly, certname);
         scoped_BIO bio(BIO_new_file(completeServerCertPath, "r"));
-        X509 *cert = NULL;
+        X509 *cert = nullptr;
         if (bio) {
-          cert = PEM_read_bio_X509(bio.get(), NULL, 0, NULL);
+          cert = PEM_read_bio_X509(bio.get(), nullptr, nullptr, nullptr);
         }
         if (!bio || !cert) {
           SSLError("failed to load certificate chain from %s", (const char *)completeServerCertPath);
@@ -1660,7 +1663,7 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
     }
 
     // SSL_CTX_load_verify_locations() builds the cert chain from the
-    // serverCACertFilename if that is not NULL.  Otherwise, it uses the hashed
+    // serverCACertFilename if that is not nullptr.  Otherwise, it uses the hashed
     // symlinks in serverCACertPath.
     //
     // if ssl_ca_name is NOT configured for this cert in ssl_multicert.config
@@ -1669,9 +1672,9 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
     //     are configured
     //   pass that file as the chain (include all certs in that file)
     // else if proxy.config.ssl.CA.cert.path is configured (and
-    //       proxy.config.ssl.CA.cert.filename is NULL)
+    //       proxy.config.ssl.CA.cert.filename is nullptr)
     //   use the hashed symlinks in that directory to build the chain
-    if (!sslMultCertSettings->ca && params->serverCACertPath != NULL) {
+    if (!sslMultCertSettings->ca && params->serverCACertPath != nullptr) {
       if ((!SSL_CTX_load_verify_locations(ctx, params->serverCACertFilename, params->serverCACertPath)) ||
           (!SSL_CTX_set_default_verify_paths(ctx))) {
         SSLError("invalid CA Certificate file or CA Certificate path");
@@ -1680,7 +1683,7 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
     }
   }
   if (params->clientCertLevel != 0) {
-    if (params->serverCACertFilename != NULL && params->serverCACertPath != NULL) {
+    if (params->serverCACertFilename != nullptr && params->serverCACertPath != nullptr) {
       if ((!SSL_CTX_load_verify_locations(ctx, params->serverCACertFilename, params->serverCACertPath)) ||
           (!SSL_CTX_set_default_verify_paths(ctx))) {
         SSLError("CA Certificate file or CA Certificate path invalid");
@@ -1697,7 +1700,7 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
       server_verify_client = SSL_VERIFY_NONE;
       Error("illegal client certification level %d in records.config", server_verify_client);
     }
-    SSL_CTX_set_verify(ctx, server_verify_client, NULL);
+    SSL_CTX_set_verify(ctx, server_verify_client, nullptr);
     SSL_CTX_set_verify_depth(ctx, params->verify_depth); // might want to make configurable at some point.
   }
 
@@ -1711,12 +1714,12 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
   }
   EVP_MD_CTX_init(digest);
 
-  if (EVP_DigestInit_ex(digest, evp_md_func, NULL) == 0) {
+  if (EVP_DigestInit_ex(digest, evp_md_func, nullptr) == 0) {
     SSLError("EVP_DigestInit_ex failed");
     goto fail;
   }
 
-  if (NULL != setting_cert) {
+  if (nullptr != setting_cert) {
     Debug("ssl", "Using '%s' in hash for session id context", sslMultCertSettings->cert.get());
     if (EVP_DigestUpdate(digest, sslMultCertSettings->cert, strlen(setting_cert)) == 0) {
       SSLError("EVP_DigestUpdate failed");
@@ -1724,7 +1727,7 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
     }
   }
 
-  if (ca_list != NULL) {
+  if (ca_list != nullptr) {
     size_t num_certs = sk_X509_NAME_num(ca_list);
 
     for (size_t i = 0; i < num_certs; i++) {
@@ -1747,7 +1750,7 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
     goto fail;
   }
 
-  if (params->cipherSuite != NULL) {
+  if (params->cipherSuite != nullptr) {
     if (!SSL_CTX_set_cipher_list(ctx, params->cipherSuite)) {
       SSLError("invalid cipher suite in records.config");
       goto fail;
@@ -1758,10 +1761,10 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
   }
 
   ssl_context_enable_ecdh(ctx);
-#define SSL_CLEAR_PW_REFERENCES(CTX)                   \
-  {                                                    \
-    SSL_CTX_set_default_passwd_cb(CTX, NULL);          \
-    SSL_CTX_set_default_passwd_cb_userdata(CTX, NULL); \
+#define SSL_CLEAR_PW_REFERENCES(CTX)                      \
+  {                                                       \
+    SSL_CTX_set_default_passwd_cb(CTX, nullptr);          \
+    SSL_CTX_set_default_passwd_cb_userdata(CTX, nullptr); \
   }
   if (sslMultCertSettings && sslMultCertSettings->dialog) {
     SSL_CLEAR_PW_REFERENCES(ctx);
@@ -1769,11 +1772,11 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
   SSL_CTX_set_info_callback(ctx, ssl_callback_info);
 
 #if TS_USE_TLS_NPN
-  SSL_CTX_set_next_protos_advertised_cb(ctx, SSLNetVConnection::advertise_next_protocol, NULL);
+  SSL_CTX_set_next_protos_advertised_cb(ctx, SSLNetVConnection::advertise_next_protocol, nullptr);
 #endif /* TS_USE_TLS_NPN */
 
 #if TS_USE_TLS_ALPN
-  SSL_CTX_set_alpn_select_cb(ctx, SSLNetVConnection::select_next_protocol, NULL);
+  SSL_CTX_set_alpn_select_cb(ctx, SSLNetVConnection::select_next_protocol, nullptr);
 #endif /* TS_USE_TLS_ALPN */
 
 #ifdef HAVE_OPENSSL_OCSP_STAPLING
@@ -1803,14 +1806,14 @@ SSLInitServerContext(const SSLConfigParams *params, const ssl_user_config *sslMu
     X509_free(certList[i]);
   }
 
-  return NULL;
+  return nullptr;
 }
 
 SSL_CTX *
 SSLCreateServerContext(const SSLConfigParams *params)
 {
   Vec cert_list;
-  SSL_CTX *ctx = SSLInitServerContext(params, NULL, cert_list);
+  SSL_CTX *ctx = SSLInitServerContext(params, nullptr, cert_list);
   ink_assert(cert_list.length() == 0);
   return ctx;
 }
@@ -1820,12 +1823,12 @@ ssl_store_ssl_context(const SSLConfigParams *params, SSLCertLookup *lookup, cons
 {
   Vec cert_list;
   SSL_CTX *ctx                   = SSLInitServerContext(params, sslMultCertSettings, cert_list);
-  ssl_ticket_key_block *keyblock = NULL;
+  ssl_ticket_key_block *keyblock = nullptr;
   bool inserted                  = false;
 
   if (!ctx || !sslMultCertSettings) {
     lookup->is_valid = false;
-    return NULL;
+    return nullptr;
   }
 
   const char *certname = sslMultCertSettings->cert.get();
@@ -1843,7 +1846,7 @@ ssl_store_ssl_context(const SSLConfigParams *params, SSLCertLookup *lookup, cons
     ats_scoped_str ticket_key_path(Layout::relative_to(params->serverCertPathOnly, sslMultCertSettings->ticket_key_filename));
     keyblock = ssl_context_enable_tickets(ctx, ticket_key_path);
   } else if (sslMultCertSettings->session_ticket_enabled != 0) {
-    keyblock = ssl_context_enable_tickets(ctx, NULL);
+    keyblock = ssl_context_enable_tickets(ctx, nullptr);
   }
 
   // Index this certificate by the specified IP(v6) address. If the address is "*", make it the default context.
@@ -1870,7 +1873,7 @@ ssl_store_ssl_context(const SSLConfigParams *params, SSLCertLookup *lookup, cons
   }
   if (!inserted) {
 #if HAVE_OPENSSL_SESSION_TICKETS
-    if (keyblock != NULL) {
+    if (keyblock != nullptr) {
       ticket_block_free(keyblock);
     }
 #endif
@@ -1920,7 +1923,7 @@ ssl_store_ssl_context(const SSLConfigParams *params, SSLCertLookup *lookup, cons
 
   if (!inserted) {
     SSLReleaseContext(ctx);
-    ctx = NULL;
+    ctx = nullptr;
   }
 
   for (unsigned int i = 0; i < cert_list.length(); i++) {
@@ -1940,7 +1943,7 @@ ssl_extract_certificate(const matcher_line *line_info, ssl_user_config &sslMultC
     label = line_info->line[0][i];
     value = line_info->line[1][i];
 
-    if (label == NULL) {
+    if (label == nullptr) {
       continue;
     }
 
@@ -1995,18 +1998,18 @@ ssl_extract_certificate(const matcher_line *line_info, ssl_user_config &sslMultC
 bool
 SSLParseCertificateConfiguration(const SSLConfigParams *params, SSLCertLookup *lookup)
 {
-  char *tok_state = NULL;
-  char *line      = NULL;
+  char *tok_state = nullptr;
+  char *line      = nullptr;
   ats_scoped_str file_buf;
   unsigned line_num = 0;
   matcher_line line_info;
 
-  const matcher_tags sslCertTags = {NULL, NULL, NULL, NULL, NULL, NULL, false};
+  const matcher_tags sslCertTags = {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, false};
 
   Note("loading SSL certificate configuration from %s", params->configFilePath);
 
   if (params->configFilePath) {
-    file_buf = readIntoBuffer(params->configFilePath, __func__, NULL);
+    file_buf = readIntoBuffer(params->configFilePath, __func__, nullptr);
   }
 
   if (!file_buf) {
@@ -2021,7 +2024,7 @@ SSLParseCertificateConfiguration(const SSLConfigParams *params, SSLCertLookup *l
   ElevateAccess elevate_access(elevate_setting ? ElevateAccess::FILE_PRIVILEGE : 0);
 
   line = tokLine(file_buf, &tok_state);
-  while (line != NULL) {
+  while (line != nullptr) {
     line_num++;
 
     // Skip all blank spaces at beginning of line.
@@ -2035,7 +2038,7 @@ SSLParseCertificateConfiguration(const SSLConfigParams *params, SSLCertLookup *l
 
       errPtr = parseConfigLine(line, &line_info, &sslCertTags);
 
-      if (errPtr != NULL) {
+      if (errPtr != nullptr) {
         RecSignalWarning(REC_SIGNAL_CONFIG_ERROR, "%s: discarding %s entry at line %d: %s", __func__, params->configFilePath,
                          line_num, errPtr);
       } else {
@@ -2050,16 +2053,16 @@ SSLParseCertificateConfiguration(const SSLConfigParams *params, SSLCertLookup *l
       }
     }
 
-    line = tokLine(NULL, &tok_state);
+    line = tokLine(nullptr, &tok_state);
   }
 
   // We *must* have a default context even if it can't possibly work. The default context is used to
   // bootstrap the SSL handshake so that we can subsequently do the SNI lookup to switch to the real
   // context.
-  if (lookup->ssl_default == NULL) {
+  if (lookup->ssl_default == nullptr) {
     ssl_user_config sslMultiCertSettings;
     sslMultiCertSettings.addr = ats_strdup("*");
-    if (ssl_store_ssl_context(params, lookup, &sslMultiCertSettings) == NULL) {
+    if (ssl_store_ssl_context(params, lookup, &sslMultiCertSettings) == nullptr) {
       Error("failed set default context");
       return false;
     }
@@ -2094,21 +2097,21 @@ ssl_callback_session_ticket(SSL *ssl, unsigned char *keyname, unsigned char *iv,
   int namelen = sizeof(ip);
   safe_getsockname(netvc->get_socket(), &ip.sa, &namelen);
   SSLCertContext *cc             = lookup->find(ip);
-  ssl_ticket_key_block *keyblock = NULL;
-  if (cc == NULL || cc->keyblock == NULL) {
+  ssl_ticket_key_block *keyblock = nullptr;
+  if (cc == nullptr || cc->keyblock == nullptr) {
     // Try the default
     keyblock = params->default_global_keyblock;
   } else {
     keyblock = cc->keyblock;
   }
-  ink_release_assert(keyblock != NULL && keyblock->num_keys > 0);
+  ink_release_assert(keyblock != nullptr && keyblock->num_keys > 0);
 
   if (enc == 1) {
     const ssl_ticket_key_t &most_recent_key = keyblock->keys[0];
     memcpy(keyname, most_recent_key.key_name, sizeof(most_recent_key.key_name));
     RAND_pseudo_bytes(iv, EVP_MAX_IV_LENGTH);
-    EVP_EncryptInit_ex(cipher_ctx, EVP_aes_128_cbc(), NULL, most_recent_key.aes_key, iv);
-    HMAC_Init_ex(hctx, most_recent_key.hmac_secret, sizeof(most_recent_key.hmac_secret), evp_md_func, NULL);
+    EVP_EncryptInit_ex(cipher_ctx, EVP_aes_128_cbc(), nullptr, most_recent_key.aes_key, iv);
+    HMAC_Init_ex(hctx, most_recent_key.hmac_secret, sizeof(most_recent_key.hmac_secret), evp_md_func, nullptr);
 
     Debug("ssl", "create ticket for a new session.");
     SSL_INCREMENT_DYN_STAT(ssl_total_tickets_created_stat);
@@ -2116,8 +2119,8 @@ ssl_callback_session_ticket(SSL *ssl, unsigned char *keyname, unsigned char *iv,
   } else if (enc == 0) {
     for (unsigned i = 0; i < keyblock->num_keys; ++i) {
       if (memcmp(keyname, keyblock->keys[i].key_name, sizeof(keyblock->keys[i].key_name)) == 0) {
-        EVP_DecryptInit_ex(cipher_ctx, EVP_aes_128_cbc(), NULL, keyblock->keys[i].aes_key, iv);
-        HMAC_Init_ex(hctx, keyblock->keys[i].hmac_secret, sizeof(keyblock->keys[i].hmac_secret), evp_md_func, NULL);
+        EVP_DecryptInit_ex(cipher_ctx, EVP_aes_128_cbc(), nullptr, keyblock->keys[i].aes_key, iv);
+        HMAC_Init_ex(hctx, keyblock->keys[i].hmac_secret, sizeof(keyblock->keys[i].hmac_secret), evp_md_func, nullptr);
 
         Debug("ssl", "verify the ticket for an existing session.");
         // Increase the total number of decrypted tickets.
@@ -2145,7 +2148,7 @@ ssl_callback_session_ticket(SSL *ssl, unsigned char *keyname, unsigned char *iv,
 void
 SSLReleaseContext(SSL_CTX *ctx)
 {
-  // SSL_CTX_free() does nothing if ctx in NULL, so there's no need to check.
+  // SSL_CTX_free() does nothing if ctx in nullptr, so there's no need to check.
   SSL_CTX_free(ctx);
 }
 
@@ -2158,7 +2161,7 @@ SSLNetVCAttach(SSL *ssl, SSLNetVConnection *vc)
 void
 SSLNetVCDetach(SSL *ssl)
 {
-  SSL_set_ex_data(ssl, ssl_vc_index, NULL);
+  SSL_set_ex_data(ssl, ssl_vc_index, nullptr);
 }
 
 SSLNetVConnection *
@@ -2185,7 +2188,7 @@ SSLWriteBuffer(SSL *ssl, const void *buf, int64_t nbytes, int64_t &nwritten)
   if (ret > 0) {
     nwritten = ret;
     BIO *bio = SSL_get_wbio(ssl);
-    if (bio != NULL) {
+    if (bio != nullptr) {
       (void)BIO_flush(bio);
     }
     return SSL_ERROR_NONE;
diff --git a/iocore/net/SessionAccept.cc b/iocore/net/SessionAccept.cc
index 9d0ff03e260..8f144e9368e 100644
--- a/iocore/net/SessionAccept.cc
+++ b/iocore/net/SessionAccept.cc
@@ -29,11 +29,11 @@ const AclRecord *
 SessionAccept::testIpAllowPolicy(sockaddr const *client_ip)
 {
   IpAllow::scoped_config ipallow;
-  const AclRecord *acl_record = NULL;
+  const AclRecord *acl_record = nullptr;
   if (ipallow) {
     acl_record = ipallow->match(client_ip);
     if (acl_record && acl_record->isEmpty()) {
-      acl_record = NULL;
+      acl_record = nullptr;
     }
   }
   return acl_record;
diff --git a/iocore/net/Socks.cc b/iocore/net/Socks.cc
index 42202bc4977..825fda12a9d 100644
--- a/iocore/net/Socks.cc
+++ b/iocore/net/Socks.cc
@@ -36,7 +36,7 @@
 #include "ts/InkErrno.h"
 #include 
 
-socks_conf_struct *g_socks_conf_stuff = 0;
+socks_conf_struct *g_socks_conf_stuff = nullptr;
 
 ClassAllocator socksAllocator("socksAllocator");
 
@@ -59,10 +59,10 @@ SocksEntry::init(Ptr &m, SocksNetVC *vc, unsigned char socks_support
   ats_ip_copy(&target_addr, vc->get_remote_addr());
 
 #ifdef SOCKS_WITH_TS
-  req_data.hdr          = 0;
-  req_data.hostname_str = 0;
-  req_data.api_info     = 0;
-  req_data.xact_start   = time(0);
+  req_data.hdr          = nullptr;
+  req_data.hostname_str = nullptr;
+  req_data.api_info     = nullptr;
+  req_data.xact_start   = time(nullptr);
 
   assert(ats_is_ip4(&target_addr));
   ats_ip_copy(&req_data.dest_ip, &target_addr);
@@ -157,8 +157,8 @@ SocksEntry::free()
       NET_INCREMENT_DYN_STAT(socks_connections_unsuccessful_stat);
       action_.continuation->handleEvent(NET_EVENT_OPEN_FAILED, (void *)(intptr_t)(-lerrno));
     } else {
-      netVConnection->do_io_read(this, 0, 0);
-      netVConnection->do_io_write(this, 0, 0);
+      netVConnection->do_io_read(this, 0, nullptr);
+      netVConnection->do_io_write(this, 0, nullptr);
       netVConnection->action_ = action_; // assign the original continuation
       netVConnection->con.setRemote(&server_addr.sa);
       Debug("Socks", "Sent success to HTTP");
@@ -171,8 +171,8 @@ SocksEntry::free()
 #endif
 
   free_MIOBuffer(buf);
-  action_ = NULL;
-  mutex   = NULL;
+  action_ = nullptr;
+  mutex   = nullptr;
   socksAllocator.free(this);
 }
 
@@ -190,7 +190,7 @@ SocksEntry::startEvent(int event, void *data)
   } else {
     if (timeout) {
       timeout->cancel(this);
-      timeout = NULL;
+      timeout = nullptr;
     }
 
     char buff[INET6_ADDRPORTSTRLEN];
@@ -207,12 +207,12 @@ SocksEntry::startEvent(int event, void *data)
 
     if (timeout) {
       timeout->cancel(this);
-      timeout = 0;
+      timeout = nullptr;
     }
 
     if (netVConnection) {
       netVConnection->do_io_close();
-      netVConnection = 0;
+      netVConnection = nullptr;
     }
 
     timeout = this_ethread()->schedule_in(this, HRTIME_SECONDS(netProcessor.socks_conf_stuff->server_connect_timeout));
@@ -274,7 +274,7 @@ SocksEntry::mainEvent(int event, void *data)
           memcpy(p + n_bytes, &target_addr.sin.sin_addr, 4);
           n_bytes += 4;
 
-          p[n_bytes++] = 0; // NULL
+          p[n_bytes++] = 0; // nullptr
         } else {
           Debug("Socks", "SOCKS v4 supports only IPv4 addresses.");
         }
@@ -302,14 +302,14 @@ SocksEntry::mainEvent(int event, void *data)
   case VC_EVENT_WRITE_COMPLETE:
     if (timeout) {
       timeout->cancel(this);
-      timeout    = NULL;
+      timeout    = nullptr;
       write_done = true;
     }
 
     buf->reset(); // Use the same buffer for a read now
 
     if (auth_handler)
-      n_bytes = invokeSocksAuthHandler(auth_handler, SOCKS_AUTH_WRITE_COMPLETE, NULL);
+      n_bytes = invokeSocksAuthHandler(auth_handler, SOCKS_AUTH_WRITE_COMPLETE, nullptr);
     else if (socks_cmd == NORMAL_SOCKS)
       n_bytes = (version == SOCKS5_VERSION) ? SOCKS5_REP_LEN : SOCKS4_REP_LEN;
     else {
@@ -329,7 +329,7 @@ SocksEntry::mainEvent(int event, void *data)
   case VC_EVENT_READ_READY:
     ret = EVENT_CONT;
 
-    if (version == SOCKS5_VERSION && auth_handler == NULL) {
+    if (version == SOCKS5_VERSION && auth_handler == nullptr) {
       VIO *vio = (VIO *)data;
       p        = (unsigned char *)buf->start();
 
@@ -365,7 +365,7 @@ SocksEntry::mainEvent(int event, void *data)
   case VC_EVENT_READ_COMPLETE:
     if (timeout) {
       timeout->cancel(this);
-      timeout = NULL;
+      timeout = nullptr;
     }
     // Debug("Socks", "Successfully read the reply from the SOCKS server");
     p = (unsigned char *)buf->start();
@@ -379,7 +379,7 @@ SocksEntry::mainEvent(int event, void *data)
       } else if (auth_handler != temp) {
         // here either authorization is done or there is another
         // stage left.
-        mainEvent(NET_EVENT_OPEN, NULL);
+        mainEvent(NET_EVENT_OPEN, nullptr);
       }
 
     } else {
@@ -404,7 +404,7 @@ SocksEntry::mainEvent(int event, void *data)
     break;
 
   case EVENT_INTERVAL:
-    timeout = NULL;
+    timeout = nullptr;
     if (write_done) {
       lerrno = ESOCK_TIMEOUT;
       free();
@@ -420,7 +420,7 @@ SocksEntry::mainEvent(int event, void *data)
   case VC_EVENT_ERROR:
     /*This is mostly ECONNREFUSED on Unix */
     SET_HANDLER(&SocksEntry::startEvent);
-    startEvent(NET_EVENT_OPEN_FAILED, NULL);
+    startEvent(NET_EVENT_OPEN_FAILED, nullptr);
     break;
 
   case VC_EVENT_EOS:
@@ -602,7 +602,7 @@ socks5BasicAuthHandler(int event, unsigned char *p, void (**h_ptr)(void))
       case 0: // no authentication required
         Debug("Socks", "No authentication required for Socks server");
         // make sure this is ok for us. right now it is always ok for us.
-        *h_ptr = NULL;
+        *h_ptr = nullptr;
         break;
 
       case 2:
@@ -611,7 +611,7 @@ socks5BasicAuthHandler(int event, unsigned char *p, void (**h_ptr)(void))
           Debug("Socks", "Buggy Socks server: asks for username/passwd "
                          "when not supplied as an option");
           ret    = -1;
-          *h_ptr = NULL;
+          *h_ptr = nullptr;
         } else
           *(SocksAuthHandler *)h_ptr = &socks5PasswdAuthHandler;
 
@@ -620,7 +620,7 @@ socks5BasicAuthHandler(int event, unsigned char *p, void (**h_ptr)(void))
       case 0xff:
         Debug("Socks", "None of the Socks authentcations is acceptable "
                        "to the server");
-        *h_ptr = NULL;
+        *h_ptr = nullptr;
         ret    = -1;
         break;
 
@@ -677,7 +677,7 @@ socks5PasswdAuthHandler(int event, unsigned char *p, void (**h_ptr)(void))
     switch (p[1]) {
     case 0:
       Debug("Socks", "Username/Passwd succeded");
-      *h_ptr = NULL;
+      *h_ptr = nullptr;
       break;
 
     default:
diff --git a/iocore/net/UnixConnection.cc b/iocore/net/UnixConnection.cc
index af44e2f91be..742f150de18 100644
--- a/iocore/net/UnixConnection.cc
+++ b/iocore/net/UnixConnection.cc
@@ -190,7 +190,7 @@ template  struct cleaner {
   void
   reset()
   {
-    obj = 0;
+    obj = nullptr;
   }
 };
 }
@@ -199,7 +199,7 @@ template  struct cleaner {
 
     @internal This structure is used to reduce the number of places in
     which the defaults are set. Originally the argument defaulted to
-    @c NULL which meant that the defaults had to be encoded in any
+    @c nullptr which meant that the defaults had to be encoded in any
     methods that used it as well as the @c NetVCOptions
     constructor. Now they are controlled only in the latter and not in
     any of the methods. This makes handling global default values
@@ -316,7 +316,7 @@ Connection::connect(sockaddr const *target, NetVCOptions const &opt)
 
   int res;
 
-  if (target != NULL) {
+  if (target != nullptr) {
     this->setRemote(target);
   }
 
diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc
index 6a6a1c03a18..85d7527ec9e 100644
--- a/iocore/net/UnixNet.cc
+++ b/iocore/net/UnixNet.cc
@@ -101,14 +101,14 @@ class InactivityCop : public Continuation
 #endif
 
 PollCont::PollCont(Ptr &m, int pt)
-  : Continuation(m.get()), net_handler(NULL), nextPollDescriptor(NULL), poll_timeout(pt)
+  : Continuation(m.get()), net_handler(nullptr), nextPollDescriptor(nullptr), poll_timeout(pt)
 {
   pollDescriptor = new PollDescriptor();
   SET_HANDLER(&PollCont::pollEvent);
 }
 
 PollCont::PollCont(Ptr &m, NetHandler *nh, int pt)
-  : Continuation(m.get()), net_handler(nh), nextPollDescriptor(NULL), poll_timeout(pt)
+  : Continuation(m.get()), net_handler(nh), nextPollDescriptor(nullptr), poll_timeout(pt)
 {
   pollDescriptor = new PollDescriptor();
   SET_HANDLER(&PollCont::pollEvent);
@@ -117,7 +117,7 @@ PollCont::PollCont(Ptr &m, NetHandler *nh, int pt)
 PollCont::~PollCont()
 {
   delete pollDescriptor;
-  if (nextPollDescriptor != NULL) {
+  if (nextPollDescriptor != nullptr) {
     delete nextPollDescriptor;
   }
 }
@@ -155,7 +155,7 @@ PollCont::pollEvent(int event, Event *e)
   tv.tv_sec  = poll_timeout / 1000;
   tv.tv_nsec = 1000000 * (poll_timeout % 1000);
   pollDescriptor->result =
-    kevent(pollDescriptor->kqueue_fd, NULL, 0, pollDescriptor->kq_Triggered_Events, POLL_DESCRIPTOR_SIZE, &tv);
+    kevent(pollDescriptor->kqueue_fd, nullptr, 0, pollDescriptor->kq_Triggered_Events, POLL_DESCRIPTOR_SIZE, &tv);
   NetDebug("iocore_net_poll", "[PollCont::pollEvent] kqueue_fd: %d, timeout: %d, results: %d", pollDescriptor->kqueue_fd,
            poll_timeout, pollDescriptor->result);
 #elif TS_USE_PORT
@@ -245,15 +245,15 @@ initialize_thread_for_net(EThread *thread)
 #if HAVE_EVENTFD
   thread->ep->start(pd, thread->evfd, 0, EVENTIO_READ);
 #else
-  thread->ep->start(pd, thread->evpipe[0], 0, EVENTIO_READ);
+  thread->ep->start(pd, thread->evpipe[0], nullptr, EVENTIO_READ);
 #endif
 }
 
 // NetHandler method definitions
 
 NetHandler::NetHandler()
-  : Continuation(NULL),
-    trigger_event(0),
+  : Continuation(nullptr),
+    trigger_event(nullptr),
     keep_alive_queue_size(0),
     active_queue_size(0),
     max_connections_per_thread_in(0),
@@ -272,10 +272,10 @@ int
 update_nethandler_config(const char *name, RecDataT data_type ATS_UNUSED, RecData data, void *cookie)
 {
   NetHandler *nh = static_cast(cookie);
-  ink_assert(nh != NULL);
+  ink_assert(nh != nullptr);
   bool update_per_thread_configuration = false;
 
-  if (nh != NULL) {
+  if (nh != nullptr) {
     if (strcmp(name, "proxy.config.net.max_connections_in") == 0) {
       Debug("net_queue", "proxy.config.net.max_connections_in updated to %" PRId64, data.rec_int);
       nh->max_connections_in          = data.rec_int;
@@ -355,7 +355,7 @@ NetHandler::startNetEvent(int event, Event *e)
 void
 NetHandler::process_enabled_list(NetHandler *nh)
 {
-  UnixNetVConnection *vc = NULL;
+  UnixNetVConnection *vc = nullptr;
 
   SListM(UnixNetVConnection, NetState, read, enable_link) rq(nh->read_enable_list.popall());
   while ((vc = rq.pop())) {
@@ -387,7 +387,7 @@ NetHandler::mainNetEvent(int event, Event *e)
   ink_assert(trigger_event == e && (event == EVENT_INTERVAL || event == EVENT_POLL));
   (void)event;
   (void)e;
-  EventIO *epd = NULL;
+  EventIO *epd = nullptr;
   int poll_timeout;
 
   NET_INCREMENT_DYN_STAT(net_handler_run_stat);
@@ -399,7 +399,7 @@ NetHandler::mainNetEvent(int event, Event *e)
     poll_timeout = net_config_poll_timeout;
 
   PollDescriptor *pd     = get_PollDescriptor(trigger_event->ethread);
-  UnixNetVConnection *vc = NULL;
+  UnixNetVConnection *vc = nullptr;
 #if TS_USE_EPOLL
   pd->result = epoll_wait(pd->epoll_fd, pd->ePoll_Triggered_Events, POLL_DESCRIPTOR_SIZE, poll_timeout);
   NetDebug("iocore_net_main_poll", "[NetHandler::mainNetEvent] epoll_wait(%d,%d), result=%d", pd->epoll_fd, poll_timeout,
@@ -408,7 +408,7 @@ NetHandler::mainNetEvent(int event, Event *e)
   struct timespec tv;
   tv.tv_sec  = poll_timeout / 1000;
   tv.tv_nsec = 1000000 * (poll_timeout % 1000);
-  pd->result = kevent(pd->kqueue_fd, NULL, 0, pd->kq_Triggered_Events, POLL_DESCRIPTOR_SIZE, &tv);
+  pd->result = kevent(pd->kqueue_fd, nullptr, 0, pd->kq_Triggered_Events, POLL_DESCRIPTOR_SIZE, &tv);
   NetDebug("iocore_net_main_poll", "[NetHandler::mainNetEvent] kevent(%d,%d), result=%d", pd->kqueue_fd, poll_timeout, pd->result);
 #elif TS_USE_PORT
   int retval;
@@ -441,7 +441,7 @@ NetHandler::mainNetEvent(int event, Event *e)
 #error port me
 #endif
 
-  vc = NULL;
+  vc = nullptr;
   for (int x = 0; x < pd->result; x++) {
     epd = (EventIO *)get_ev_data(pd, x);
     if (epd->type == EVENTIO_READWRITE_VC) {
@@ -484,7 +484,7 @@ NetHandler::mainNetEvent(int event, Event *e)
         Debug("iocore_net_main", "Unhandled epoll event: 0x%04x", get_ev_events(pd, x));
       }
     } else if (epd->type == EVENTIO_DNS_CONNECTION) {
-      if (epd->data.dnscon != NULL) {
+      if (epd->data.dnscon != nullptr) {
         epd->data.dnscon->trigger(); // Make sure the DNSHandler for this con knows we triggered
 #if defined(USE_EDGE_TRIGGER)
         epd->refresh(EVENTIO_READ);
@@ -576,12 +576,12 @@ NetHandler::manage_active_queue(bool ignore_queue_size = false)
 
   // loop over the non-active connections and try to close them
   UnixNetVConnection *vc      = active_queue.head;
-  UnixNetVConnection *vc_next = NULL;
+  UnixNetVConnection *vc_next = nullptr;
   int closed                  = 0;
   int handle_event            = 0;
   int total_idle_time         = 0;
   int total_idle_count        = 0;
-  for (; vc != NULL; vc = vc_next) {
+  for (; vc != nullptr; vc = vc_next) {
     vc_next = vc->active_queue_link.next;
     if ((vc->inactivity_timeout_in && vc->next_inactivity_timeout_at <= now) ||
         (vc->active_timeout_in && vc->next_activity_timeout_at <= now)) {
@@ -625,12 +625,12 @@ NetHandler::manage_keep_alive_queue()
   }
 
   // loop over the non-active connections and try to close them
-  UnixNetVConnection *vc_next = NULL;
+  UnixNetVConnection *vc_next = nullptr;
   int closed                  = 0;
   int handle_event            = 0;
   int total_idle_time         = 0;
   int total_idle_count        = 0;
-  for (UnixNetVConnection *vc = keep_alive_queue.head; vc != NULL; vc = vc_next) {
+  for (UnixNetVConnection *vc = keep_alive_queue.head; vc != nullptr; vc = vc_next) {
     vc_next = vc->keep_alive_queue_link.next;
     _close_vc(vc, now, handle_event, closed, total_idle_time, total_idle_count);
 
diff --git a/iocore/net/UnixNetAccept.cc b/iocore/net/UnixNetAccept.cc
index b1d5b48466f..d30ebe55e90 100644
--- a/iocore/net/UnixNetAccept.cc
+++ b/iocore/net/UnixNetAccept.cc
@@ -35,7 +35,7 @@ int accept_till_done        = 1;
 static void
 safe_delay(int msec)
 {
-  socketManager.poll(0, 0, msec);
+  socketManager.poll(nullptr, 0, msec);
 }
 
 //
@@ -48,7 +48,7 @@ net_accept(NetAccept *na, void *ep, bool blockable)
   int res                = 0;
   int count              = 0;
   int loop               = accept_till_done;
-  UnixNetVConnection *vc = NULL;
+  UnixNetVConnection *vc = nullptr;
   Connection con;
 
   if (!blockable) {
@@ -204,7 +204,7 @@ NetAccept::do_listen(bool non_blocking)
       action_->continuation->handleEvent(NET_EVENT_ACCEPT_FAILED, this);
     else
       action_->continuation->handleEvent(NET_EVENT_ACCEPT_SUCCEED, this);
-    mutex = NULL;
+    mutex = nullptr;
   }
 
   return res;
@@ -215,7 +215,7 @@ NetAccept::do_blocking_accept(EThread *t)
 {
   int res                = 0;
   int loop               = accept_till_done;
-  UnixNetVConnection *vc = NULL;
+  UnixNetVConnection *vc = nullptr;
   Connection con;
 
   // do-while for accepting all the connections
@@ -255,8 +255,8 @@ NetAccept::do_blocking_accept(EThread *t)
       }
     }
 
-    // Use 'NULL' to Bypass thread allocator
-    vc = (UnixNetVConnection *)this->getNetProcessor()->allocate_vc(NULL);
+    // Use 'nullptr' to Bypass thread allocator
+    vc = (UnixNetVConnection *)this->getNetProcessor()->allocate_vc(nullptr);
     if (unlikely(!vc || shutdown_event_system == true)) {
       return -1;
     }
@@ -286,7 +286,7 @@ NetAccept::acceptEvent(int event, void *ep)
   (void)event;
   Event *e = (Event *)ep;
   // PollDescriptor *pd = get_PollDescriptor(e->ethread);
-  ProxyMutex *m = 0;
+  ProxyMutex *m = nullptr;
 
   if (action_->mutex) {
     m = action_->mutex.get();
@@ -333,7 +333,7 @@ NetAccept::acceptFastEvent(int event, void *ep)
   Connection con;
 
   PollDescriptor *pd     = get_PollDescriptor(e->ethread);
-  UnixNetVConnection *vc = NULL;
+  UnixNetVConnection *vc = nullptr;
   int loop               = accept_till_done;
 
   do {
@@ -482,7 +482,7 @@ NetAccept::acceptLoopEvent(int event, Event *e)
 //
 
 NetAccept::NetAccept(const NetProcessor::AcceptOptions &_opt)
-  : Continuation(NULL), period(0), accept_fn(NULL), ifd(NO_FD), opt(_opt)
+  : Continuation(nullptr), period(0), accept_fn(nullptr), ifd(NO_FD), opt(_opt)
 {
 }
 
diff --git a/iocore/net/UnixNetPages.cc b/iocore/net/UnixNetPages.cc
index 1fe0bfa6b8c..a20e1a8b5d7 100644
--- a/iocore/net/UnixNetPages.cc
+++ b/iocore/net/UnixNetPages.cc
@@ -219,7 +219,7 @@ register_ShowNet(Continuation *c, HTTPHdr *h)
     int query_len;
     const char *query = h->url_get()->query_get(&query_len);
     s->sarg           = ats_strndup(query, query_len);
-    char *gn          = NULL;
+    char *gn          = nullptr;
     if (s->sarg)
       gn = (char *)memchr(s->sarg, '=', strlen(s->sarg));
     if (gn)
@@ -229,7 +229,7 @@ register_ShowNet(Continuation *c, HTTPHdr *h)
     int query_len;
     const char *query = h->url_get()->query_get(&query_len);
     s->sarg           = ats_strndup(query, query_len);
-    char *gn          = NULL;
+    char *gn          = nullptr;
     if (s->sarg)
       gn = (char *)memchr(s->sarg, '=', strlen(s->sarg));
     if (gn)
diff --git a/iocore/net/UnixNetProcessor.cc b/iocore/net/UnixNetProcessor.cc
index e0237c33543..c3d2fa74380 100644
--- a/iocore/net/UnixNetProcessor.cc
+++ b/iocore/net/UnixNetProcessor.cc
@@ -162,7 +162,7 @@ UnixNetProcessor::accept_internal(Continuation *cont, int fd, AcceptOptions cons
       na->init_accept_per_thread();
     }
   } else {
-    na->init_accept(NULL);
+    na->init_accept(nullptr);
   }
 
 #ifdef TCP_DEFER_ACCEPT
@@ -209,7 +209,7 @@ UnixNetProcessor::connect_re_internal(Continuation *cont, sockaddr const *target
                           !socks_conf_stuff->ip_map.contains(target))
 #endif
                         );
-  SocksEntry *socksEntry = NULL;
+  SocksEntry *socksEntry = nullptr;
 
   NET_SUM_GLOBAL_DYN_STAT(net_connections_currently_open_stat, 1);
   vc->id          = net_next_connection_number();
@@ -353,7 +353,7 @@ struct CheckConnect : public Continuation {
     }
   }
 
-  explicit CheckConnect(Ptr &m) : Continuation(m.get()), vc(NULL), connect_status(-1), recursion(0), timeout(0)
+  explicit CheckConnect(Ptr &m) : Continuation(m.get()), vc(nullptr), connect_status(-1), recursion(0), timeout(0)
   {
     SET_HANDLER(&CheckConnect::handle_connect);
     buf    = new_empty_MIOBuffer(1);
@@ -397,7 +397,7 @@ UnixNetProcessor::start(int, size_t)
 
   RecData d;
   d.rec_int = 0;
-  change_net_connections_throttle(NULL, RECD_INT, d, NULL);
+  change_net_connections_throttle(nullptr, RECD_INT, d, nullptr);
 
   // Socks
   if (!netProcessor.socks_conf_stuff) {
@@ -454,7 +454,7 @@ UnixNetProcessor::allocate_vc(EThread *t)
   return vc;
 }
 
-struct socks_conf_struct *NetProcessor::socks_conf_stuff = NULL;
+struct socks_conf_struct *NetProcessor::socks_conf_stuff = nullptr;
 int NetProcessor::accept_mss                             = 0;
 
 UnixNetProcessor unix_netProcessor;
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index 1f902ea02e5..ccfaa9af67f 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -101,11 +101,11 @@ close_UnixNetVConnection(UnixNetVConnection *vc, EThread *t)
 #ifdef INACTIVITY_TIMEOUT
   if (vc->inactivity_timeout) {
     vc->inactivity_timeout->cancel_action(vc);
-    vc->inactivity_timeout = NULL;
+    vc->inactivity_timeout = nullptr;
   }
   if (vc->active_timeout) {
     vc->active_timeout->cancel_action(vc);
-    vc->active_timeout = NULL;
+    vc->active_timeout = nullptr;
   }
 #else
   vc->next_inactivity_timeout_at = 0;
@@ -676,9 +676,9 @@ UnixNetVConnection::outstanding()
 VIO *
 UnixNetVConnection::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf)
 {
-  if (closed && !(c == NULL && nbytes == 0 && buf == NULL)) {
+  if (closed && !(c == nullptr && nbytes == 0 && buf == nullptr)) {
     Error("do_io_read invoked on closed vc %p, cont %p, nbytes %" PRId64 ", buf %p", this, c, nbytes, buf);
-    return NULL;
+    return nullptr;
   }
   read.vio.op        = VIO::READ;
   read.vio.mutex     = c ? c->mutex : this->mutex;
@@ -700,9 +700,9 @@ UnixNetVConnection::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf)
 VIO *
 UnixNetVConnection::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *reader, bool owner)
 {
-  if (closed && !(c == NULL && nbytes == 0 && reader == NULL)) {
+  if (closed && !(c == nullptr && nbytes == 0 && reader == nullptr)) {
     Error("do_io_write invoked on closed vc %p, cont %p, nbytes %" PRId64 ", reader %p", this, c, nbytes, reader);
-    return NULL;
+    return nullptr;
   }
   write.vio.op        = VIO::WRITE;
   write.vio.mutex     = c ? c->mutex : this->mutex;
@@ -729,11 +729,11 @@ UnixNetVConnection::do_io_close(int alerrno /* = -1 */)
   read.vio.buffer.clear();
   read.vio.nbytes = 0;
   read.vio.op     = VIO::NONE;
-  read.vio._cont  = NULL;
+  read.vio._cont  = nullptr;
   write.vio.buffer.clear();
   write.vio.nbytes = 0;
   write.vio.op     = VIO::NONE;
-  write.vio._cont  = NULL;
+  write.vio._cont  = nullptr;
 
   EThread *t        = this_ethread();
   bool close_inline = !recursion && (!nh || nh->mutex->thread_holding == t);
@@ -788,7 +788,7 @@ OOB_callback::retry_OOB_send(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED
 {
   ink_assert(mutex->thread_holding == this_ethread());
   // the NetVC and the OOB_callback share a mutex
-  server_vc->oob_ptr = NULL;
+  server_vc->oob_ptr = nullptr;
   server_vc->send_OOB(server_cont, data, length);
   delete this;
   return EVENT_DONE;
@@ -801,10 +801,10 @@ UnixNetVConnection::cancel_OOB()
   if (u->oob_ptr) {
     if (u->oob_ptr->trigger) {
       u->oob_ptr->trigger->cancel_action();
-      u->oob_ptr->trigger = NULL;
+      u->oob_ptr->trigger = nullptr;
     }
     delete u->oob_ptr;
-    u->oob_ptr = NULL;
+    u->oob_ptr = nullptr;
   }
 }
 
@@ -819,10 +819,10 @@ UnixNetVConnection::send_OOB(Continuation *cont, char *buf, int len)
   ink_assert(cont->mutex->thread_holding == this_ethread());
   written = socketManager.send(u->con.fd, buf, len, MSG_OOB);
   if (written == len) {
-    cont->handleEvent(VC_EVENT_OOB_COMPLETE, NULL);
+    cont->handleEvent(VC_EVENT_OOB_COMPLETE, nullptr);
     return ACTION_RESULT_DONE;
   } else if (!written) {
-    cont->handleEvent(VC_EVENT_EOS, NULL);
+    cont->handleEvent(VC_EVENT_EOS, nullptr);
     return ACTION_RESULT_DONE;
   }
   if (written > 0 && written < len) {
@@ -940,21 +940,21 @@ UnixNetVConnection::UnixNetVConnection()
     inactivity_timeout_in(0),
     active_timeout_in(0),
 #ifdef INACTIVITY_TIMEOUT
-    inactivity_timeout(NULL),
-    active_timeout(NULL),
+    inactivity_timeout(nullptr),
+    active_timeout(nullptr),
 #else
     next_inactivity_timeout_at(0),
     next_activity_timeout_at(0),
 #endif
-    nh(NULL),
+    nh(nullptr),
     id(0),
     flags(0),
     recursion(0),
     submit_time(0),
-    oob_ptr(0),
+    oob_ptr(nullptr),
     from_accept_thread(false),
     origin_trace(false),
-    origin_trace_addr(NULL),
+    origin_trace_addr(nullptr),
     origin_trace_port(0)
 {
   SET_HANDLER((NetVConnHandler)&UnixNetVConnection::startEvent);
@@ -1244,10 +1244,10 @@ UnixNetVConnection::mainEvent(int event, Event *e)
   }
 
   int signal_event;
-  Continuation *reader_cont     = NULL;
-  Continuation *writer_cont     = NULL;
-  ink_hrtime *signal_timeout_at = NULL;
-  Event *t                      = NULL;
+  Continuation *reader_cont     = nullptr;
+  Continuation *writer_cont     = nullptr;
+  ink_hrtime *signal_timeout_at = nullptr;
+  Event *t                      = nullptr;
   Event **signal_timeout        = &t;
 
 #ifdef INACTIVITY_TIMEOUT
@@ -1274,7 +1274,7 @@ UnixNetVConnection::mainEvent(int event, Event *e)
   }
 #endif
 
-  *signal_timeout    = 0;
+  *signal_timeout    = nullptr;
   *signal_timeout_at = 0;
   writer_cont        = write.vio._cont;
 
@@ -1315,7 +1315,7 @@ UnixNetVConnection::populate(Connection &con_in, Continuation *c, void *arg)
   SET_HANDLER(&UnixNetVConnection::mainEvent);
 
   this->nh = get_NetHandler(t);
-  ink_assert(this->nh != NULL);
+  ink_assert(this->nh != nullptr);
   MUTEX_TRY_LOCK(lock, this->nh->mutex, t);
   if (!lock.is_locked()) {
     // Clean up and go home
@@ -1396,7 +1396,7 @@ UnixNetVConnection::connectUp(EThread *t, int fd)
   }
 
   if (fd == NO_FD) {
-    res = con.connect(NULL, options);
+    res = con.connect(nullptr, options);
     if (res != 0) {
       goto fail;
     }
@@ -1436,15 +1436,15 @@ UnixNetVConnection::free(EThread *t)
   write.vio.mutex.clear();
   flags = 0;
   SET_CONTINUATION_HANDLER(this, (NetVConnHandler)&UnixNetVConnection::startEvent);
-  nh                  = NULL;
+  nh                  = nullptr;
   read.triggered      = 0;
   write.triggered     = 0;
   read.enabled        = 0;
   write.enabled       = 0;
-  read.vio._cont      = NULL;
-  write.vio._cont     = NULL;
-  read.vio.vc_server  = NULL;
-  write.vio.vc_server = NULL;
+  read.vio._cont      = nullptr;
+  write.vio._cont     = nullptr;
+  read.vio.vc_server  = nullptr;
+  write.vio.vc_server = nullptr;
   options.reset();
   closed        = 0;
   netvc_context = NET_VCONNECTION_UNSET;
@@ -1524,10 +1524,10 @@ UnixNetVConnection::migrateToCurrentThread(Continuation *cont, EThread *t)
   hold_con.move(this->con);
   SSLNetVConnection *sslvc = dynamic_cast(this);
 
-  SSL *save_ssl = (sslvc) ? sslvc->ssl : NULL;
+  SSL *save_ssl = (sslvc) ? sslvc->ssl : nullptr;
   if (save_ssl) {
     SSLNetVCDetach(sslvc->ssl);
-    sslvc->ssl = NULL;
+    sslvc->ssl = nullptr;
   }
 
   // Do_io_close will signal the VC to be freed on the original thread
@@ -1542,7 +1542,7 @@ UnixNetVConnection::migrateToCurrentThread(Continuation *cont, EThread *t)
     SSLNetVConnection *sslvc = static_cast(sslNetProcessor.allocate_vc(t));
     if (sslvc->populate(hold_con, cont, save_ssl) != EVENT_DONE) {
       sslvc->do_io_close();
-      sslvc = NULL;
+      sslvc = nullptr;
     } else {
       sslvc->set_context(get_context());
     }
@@ -1552,7 +1552,7 @@ UnixNetVConnection::migrateToCurrentThread(Continuation *cont, EThread *t)
     UnixNetVConnection *netvc = static_cast(netProcessor.allocate_vc(t));
     if (netvc->populate(hold_con, cont, save_ssl) != EVENT_DONE) {
       netvc->do_io_close();
-      netvc = NULL;
+      netvc = nullptr;
     } else {
       netvc->set_context(get_context());
     }
diff --git a/iocore/net/UnixUDPConnection.cc b/iocore/net/UnixUDPConnection.cc
index bca80b0d97e..ec2929bcc0c 100644
--- a/iocore/net/UnixUDPConnection.cc
+++ b/iocore/net/UnixUDPConnection.cc
@@ -40,17 +40,17 @@ UnixUDPConnection::~UnixUDPConnection()
     tobedestroyed = 1;
 
   if (p) {
-    UDPPacketInternal *pnext = NULL;
+    UDPPacketInternal *pnext = nullptr;
     while (p) {
       pnext         = p->alink.next;
-      p->alink.next = NULL;
+      p->alink.next = nullptr;
       p->free();
       p = pnext;
     }
   }
   if (callbackAction) {
     callbackAction->cancel();
-    callbackAction = NULL;
+    callbackAction = nullptr;
   }
   Debug("udpnet", "Destroying udp port = %d", getPortNum());
   if (fd != NO_FD) {
@@ -66,8 +66,8 @@ UnixUDPConnection::callbackHandler(int event, void *data)
 {
   (void)event;
   (void)data;
-  callbackAction = NULL;
-  if (continuation == NULL)
+  callbackAction = nullptr;
+  if (continuation == nullptr)
     return EVENT_CONT;
 
   if (m_errno) {
@@ -80,11 +80,11 @@ UnixUDPConnection::callbackHandler(int event, void *data)
     UDPPacketInternal *p = (UDPPacketInternal *)ink_atomiclist_popall(&inQueue);
     if (p) {
       Debug("udpnet", "UDPConnection::callbackHandler");
-      UDPPacketInternal *pnext = NULL;
+      UDPPacketInternal *pnext = nullptr;
       Queue result;
       while (p) {
         pnext         = p->alink.next;
-        p->alink.next = NULL;
+        p->alink.next = nullptr;
         result.push(p);
         p = pnext;
       }
@@ -131,7 +131,7 @@ UDPConnection::send(Continuation *c, UDPPacket *xp)
   p->setContinuation(c);
   p->setConnection(this);
   conn->continuation = c;
-  ink_assert(conn->continuation != NULL);
+  ink_assert(conn->continuation != nullptr);
   mutex               = c->mutex;
   p->reqGenerationNum = conn->sendGenerationNum;
   get_UDPNetHandler(conn->ethread)->udpOutQueue.send(p);
@@ -146,11 +146,11 @@ UDPConnection::Release()
   p->ep.stop();
 
   if (ink_atomic_increment(&p->refcount, -1) == 1) {
-    ink_assert(p->callback_link.next == NULL);
-    ink_assert(p->callback_link.prev == NULL);
-    ink_assert(p->polling_link.next == NULL);
-    ink_assert(p->polling_link.prev == NULL);
-    ink_assert(p->newconn_alink.next == NULL);
+    ink_assert(p->callback_link.next == nullptr);
+    ink_assert(p->callback_link.prev == nullptr);
+    ink_assert(p->polling_link.next == nullptr);
+    ink_assert(p->polling_link.prev == nullptr);
+    ink_assert(p->newconn_alink.next == nullptr);
 
     delete this;
   }
diff --git a/iocore/net/UnixUDPNet.cc b/iocore/net/UnixUDPNet.cc
index 809000ad2ac..b05023a7159 100644
--- a/iocore/net/UnixUDPNet.cc
+++ b/iocore/net/UnixUDPNet.cc
@@ -138,8 +138,8 @@ UDPNetProcessorInternal::udp_read_from_net(UDPNetHandler *nh, UDPConnection *xuc
   }
   // if not already on to-be-called-back queue, then add it.
   if (!uc->onCallbackQueue) {
-    ink_assert(uc->callback_link.next == NULL);
-    ink_assert(uc->callback_link.prev == NULL);
+    ink_assert(uc->callback_link.next == nullptr);
+    ink_assert(uc->callback_link.prev == nullptr);
     uc->AddRef();
     nh->udp_callbacks.enqueue(uc);
     uc->onCallbackQueue = 1;
@@ -158,7 +158,7 @@ UDPNetProcessorInternal::udp_callback(UDPNetHandler *nh, UDPConnection *xuc, ETh
       return 1;
     }
     uc->AddRef();
-    uc->callbackHandler(0, 0);
+    uc->callbackHandler(0, nullptr);
     return 0;
   } else {
     ink_assert(!"doesn't reach here");
@@ -217,11 +217,11 @@ ClassAllocator udpReadContAllocator("udpReadContAllocator")
 #define UNINITIALIZED_EVENT_PTR (Event *)0xdeadbeef
 
 UDPReadContinuation::UDPReadContinuation(Event *completionToken)
-  : Continuation(NULL),
+  : Continuation(nullptr),
     event(completionToken),
-    readbuf(NULL),
+    readbuf(nullptr),
     readlen(0),
-    fromaddrlen(0),
+    fromaddrlen(nullptr),
     fd(-1),
     ifd(-1),
     period(0),
@@ -235,11 +235,11 @@ UDPReadContinuation::UDPReadContinuation(Event *completionToken)
 }
 
 UDPReadContinuation::UDPReadContinuation()
-  : Continuation(NULL),
+  : Continuation(nullptr),
     event(UNINITIALIZED_EVENT_PTR),
-    readbuf(NULL),
+    readbuf(nullptr),
     readlen(0),
-    fromaddrlen(0),
+    fromaddrlen(nullptr),
     fd(-1),
     ifd(-1),
     period(0),
@@ -251,18 +251,18 @@ UDPReadContinuation::UDPReadContinuation()
 inline void
 UDPReadContinuation::free(void)
 {
-  ink_assert(event != NULL);
+  ink_assert(event != nullptr);
   completionUtil::destroy(event);
-  event            = NULL;
-  readbuf          = NULL;
+  event            = nullptr;
+  readbuf          = nullptr;
   readlen          = 0;
-  fromaddrlen      = 0;
+  fromaddrlen      = nullptr;
   fd               = -1;
   ifd              = -1;
   period           = 0;
   elapsed_time     = 0;
   timeout_interval = 0;
-  mutex            = NULL;
+  mutex            = nullptr;
   udpReadContAllocator.free(this);
 }
 
@@ -280,7 +280,7 @@ UDPReadContinuation::init_token(Event *completionToken)
 inline void
 UDPReadContinuation::init_read(int rfd, IOBufferBlock *buf, int len, struct sockaddr *fromaddr_, socklen_t *fromaddrlen_)
 {
-  ink_assert(rfd >= 0 && buf != NULL && fromaddr_ != NULL && fromaddrlen_ != NULL);
+  ink_assert(rfd >= 0 && buf != nullptr && fromaddr_ != nullptr && fromaddrlen_ != nullptr);
   fd          = rfd;
   readbuf     = buf;
   readlen     = len;
@@ -295,9 +295,9 @@ UDPReadContinuation::init_read(int rfd, IOBufferBlock *buf, int len, struct sock
 UDPReadContinuation::~UDPReadContinuation()
 {
   if (event != UNINITIALIZED_EVENT_PTR) {
-    ink_assert(event != NULL);
+    ink_assert(event != nullptr);
     completionUtil::destroy(event);
-    event = NULL;
+    event = nullptr;
   }
 }
 
@@ -315,7 +315,7 @@ UDPReadContinuation::setupPollDescriptor()
   Pollfd *pfd;
   EThread *et  = (EThread *)this_thread();
   PollCont *pc = get_PollCont(et);
-  if (pc->nextPollDescriptor == NULL) {
+  if (pc->nextPollDescriptor == nullptr) {
     pc->nextPollDescriptor = new PollDescriptor();
   }
   pfd     = pc->nextPollDescriptor->alloc();
@@ -389,7 +389,7 @@ UDPReadContinuation::readPollEvent(int event_, Event *e)
     // delete this;
     return EVENT_DONE;
   } else {
-    completionUtil::setThread(event, NULL);
+    completionUtil::setThread(event, nullptr);
   }
 
   if (event->cancelled) {
@@ -552,7 +552,7 @@ UDPNetProcessor::CreateUDPSocket(int *resfd, sockaddr const *remote_addr, sockad
     goto HardError;
   }
   *resfd  = fd;
-  *status = NULL;
+  *status = nullptr;
   Debug("udpnet", "creating a udp socket port = %d, %d---success", ats_ip_port_host_order(remote_addr),
         ats_ip_port_host_order(local_addr));
   return true;
@@ -561,7 +561,7 @@ UDPNetProcessor::CreateUDPSocket(int *resfd, sockaddr const *remote_addr, sockad
   if (fd != -1)
     socketManager.close(fd);
   *resfd  = -1;
-  *status = NULL;
+  *status = nullptr;
   return false;
 HardError:
   Debug("udpnet", "creating a udp socket port = %d---hard failure", ats_ip_port_host_order(local_addr));
@@ -577,7 +577,7 @@ UDPNetProcessor::UDPBind(Continuation *cont, sockaddr const *addr, int send_bufs
 {
   int res              = 0;
   int fd               = -1;
-  UnixUDPConnection *n = NULL;
+  UnixUDPConnection *n = nullptr;
   IpEndpoint myaddr;
   int myaddr_len = sizeof(myaddr);
 
@@ -622,7 +622,7 @@ UDPNetProcessor::UDPBind(Continuation *cont, sockaddr const *addr, int send_bufs
 Lerror:
   if (fd != NO_FD)
     socketManager.close(fd);
-  cont->handleEvent(NET_EVENT_DATAGRAM_ERROR, NULL);
+  cont->handleEvent(NET_EVENT_DATAGRAM_ERROR, nullptr);
   return ACTION_IO_ERROR;
 }
 
@@ -650,12 +650,12 @@ UDPQueue::service(UDPNetHandler *nh)
 
   p = (UDPPacketInternal *)ink_atomiclist_popall(&atomicQueue);
   if (p) {
-    UDPPacketInternal *pnext = NULL;
+    UDPPacketInternal *pnext = nullptr;
     Queue stk;
 
     while (p) {
       pnext         = p->alink.next;
-      p->alink.next = NULL;
+      p->alink.next = nullptr;
       stk.push(p);
       p = pnext;
     }
@@ -663,8 +663,8 @@ UDPQueue::service(UDPNetHandler *nh)
     // walk backwards down list since this is actually an atomic stack.
     while (stk.head) {
       p = stk.pop();
-      ink_assert(p->link.prev == NULL);
-      ink_assert(p->link.next == NULL);
+      ink_assert(p->link.prev == nullptr);
+      ink_assert(p->link.next == nullptr);
       // insert into our queue.
       Debug("udp-send", "Adding %p", p);
       if (p->conn->lastPktStartTime == 0) {
@@ -734,7 +734,7 @@ UDPQueue::SendPackets()
   if ((bytesThisSlot > 0) && sentOne) {
     // redistribute the slack...
     now = Thread::get_hrtime_updated();
-    if (pipeInfo.firstPacket(now) == NULL) {
+    if (pipeInfo.firstPacket(now) == nullptr) {
       pipeInfo.advanceNow(now);
     }
     goto sendPackets;
@@ -758,7 +758,7 @@ UDPQueue::SendUDPPacket(UDPPacketInternal *p, int32_t /* pktLen ATS_UNUSED */)
   Debug("udp-send", "Sending %p", p);
 
 #if !defined(solaris)
-  msg.msg_control    = 0;
+  msg.msg_control    = nullptr;
   msg.msg_controllen = 0;
   msg.msg_flags      = 0;
 #endif
@@ -766,7 +766,7 @@ UDPQueue::SendUDPPacket(UDPPacketInternal *p, int32_t /* pktLen ATS_UNUSED */)
   msg.msg_namelen = sizeof(p->to);
   iov_len         = 0;
 
-  for (IOBufferBlock *b = p->chain.get(); b != NULL; b = b->next.get()) {
+  for (IOBufferBlock *b = p->chain.get(); b != nullptr; b = b->next.get()) {
     iov[iov_len].iov_base = (caddr_t)b->start();
     iov[iov_len].iov_len  = b->size();
     real_len += iov[iov_len].iov_len;
@@ -839,7 +839,7 @@ UDPNetHandler::mainNetEvent(int event, Event *e)
   int i;
   int nread = 0;
 
-  EventIO *temp_eptr = NULL;
+  EventIO *temp_eptr = nullptr;
   for (i = 0; i < pc->pollDescriptor->result; i++) {
     temp_eptr = (EventIO *)get_ev_data(pc->pollDescriptor, i);
     if ((get_ev_events(pc->pollDescriptor, i) & EVENTIO_READ) && temp_eptr->type == EVENTIO_UDP_CONNECTION) {
@@ -878,12 +878,12 @@ UDPNetHandler::mainNetEvent(int event, Event *e)
     ink_assert(uc->mutex && uc->continuation);
     if (udpNetInternal.udp_callback(this, uc, trigger_event->ethread)) { // not successful
       // schedule on a thread of its own.
-      ink_assert(uc->callback_link.next == NULL);
-      ink_assert(uc->callback_link.prev == NULL);
+      ink_assert(uc->callback_link.next == nullptr);
+      ink_assert(uc->callback_link.prev == nullptr);
       udp_callbacks.enqueue(uc);
     } else {
-      ink_assert(uc->callback_link.next == NULL);
-      ink_assert(uc->callback_link.prev == NULL);
+      ink_assert(uc->callback_link.next == nullptr);
+      ink_assert(uc->callback_link.prev == nullptr);
       uc->onCallbackQueue = 0;
       uc->Release();
     }
diff --git a/iocore/net/test_I_Net.cc b/iocore/net/test_I_Net.cc
index d687ca22f87..cb8e91160cf 100644
--- a/iocore/net/test_I_Net.cc
+++ b/iocore/net/test_I_Net.cc
@@ -36,12 +36,12 @@ int
 main()
 {
   // do not buffer stdout
-  setbuf(stdout, NULL);
+  setbuf(stdout, nullptr);
   int nproc = ink_number_of_processors();
 
   RecModeT mode_type = RECM_STAND_ALONE;
 
-  init_diags("net_test", NULL);
+  init_diags("net_test", nullptr);
   RecProcessInit(mode_type);
   ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
   ink_net_init(NET_SYSTEM_MODULE_VERSION);
diff --git a/iocore/net/test_I_UDPNet.cc b/iocore/net/test_I_UDPNet.cc
index 1a0c18620c4..81afccedeae 100644
--- a/iocore/net/test_I_UDPNet.cc
+++ b/iocore/net/test_I_UDPNet.cc
@@ -98,7 +98,7 @@ main(int argc, char *argv[])
 {
   int port = (argc > 1) ? atoi(argv[1]) : 39680;
 
-  init_diags((argc > 2) ? argv[2] : "udp.*", NULL);
+  init_diags((argc > 2) ? argv[2] : "udp.*", nullptr);
   ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
   eventProcessor.start(2);
   udpNet.start(1);
diff --git a/iocore/net/test_P_Net.cc b/iocore/net/test_P_Net.cc
index 6cbfaf5ce23..248b8bdeebc 100644
--- a/iocore/net/test_P_Net.cc
+++ b/iocore/net/test_P_Net.cc
@@ -45,7 +45,7 @@ struct NetTesterSM : public Continuation {
   handle_read(int event, void *data)
   {
     int r;
-    char *str = NULL;
+    char *str = nullptr;
     switch (event) {
     case VC_EVENT_READ_READY:
       r   = reader->read_avail();
diff --git a/iocore/net/test_P_UDPNet.cc b/iocore/net/test_P_UDPNet.cc
index cb1b8a3250a..874e47d0ec2 100644
--- a/iocore/net/test_P_UDPNet.cc
+++ b/iocore/net/test_P_UDPNet.cc
@@ -98,7 +98,7 @@ main(int argc, char *argv[])
 {
   int port = (argc > 1) ? atoi(argv[1]) : 39680;
 
-  init_diags((argc > 2) ? argv[2] : "udp.*", NULL);
+  init_diags((argc > 2) ? argv[2] : "udp.*", nullptr);
   ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
   eventProcessor.start(2);
   udpNet.start(1);
diff --git a/iocore/net/test_certlookup.cc b/iocore/net/test_certlookup.cc
index 2ccaf9ba7b3..d5930817481 100644
--- a/iocore/net/test_certlookup.cc
+++ b/iocore/net/test_certlookup.cc
@@ -52,11 +52,11 @@ REGRESSION_TEST(SSLCertificateLookup)(RegressionTest *t, int /* atype ATS_UNUSED
 
   box = REGRESSION_TEST_PASSED;
 
-  assert(wild != NULL);
-  assert(notwild != NULL);
-  assert(b_notwild != NULL);
-  assert(foo != NULL);
-  assert(all_com != NULL);
+  assert(wild != nullptr);
+  assert(notwild != nullptr);
+  assert(b_notwild != nullptr);
+  assert(foo != nullptr);
+  assert(all_com != nullptr);
 
   box.check(lookup.insert("www.foo.com", foo_cc) >= 0, "insert host context");
   // Insert the same SSL_CTX instance under another name too
@@ -88,8 +88,8 @@ REGRESSION_TEST(SSLCertificateLookup)(RegressionTest *t, int /* atype ATS_UNUSED
 
   // Basic hostname cases.
   box.check(lookup.find("www.foo.com")->ctx == foo, "host lookup for www.foo.com");
-  box.check(lookup.find("www.bar.com") == NULL, "www.bar.com won't match *.com because we only match one level");
-  box.check(lookup.find("www.bar.net") == NULL, "host lookup for www.bar.net");
+  box.check(lookup.find("www.bar.com") == nullptr, "www.bar.com won't match *.com because we only match one level");
+  box.check(lookup.find("www.bar.net") == nullptr, "host lookup for www.bar.net");
 
   // Make sure cases are lowered
   box.check(lookup.find("WWW.foo.com")->ctx == foo, "mixed case lookup for www.foo.com");
@@ -214,7 +214,7 @@ int
 main(int argc, const char **argv)
 {
   BaseLogFile *blf = new BaseLogFile("stdout");
-  diags            = new Diags("test_certlookup", NULL, NULL, blf);
+  diags            = new Diags("test_certlookup", nullptr, nullptr, blf);
   res_track_memory = 1;
 
   SSL_library_init();
@@ -232,7 +232,7 @@ main(int argc, const char **argv)
 
   } else {
     // Standard regression tests.
-    RegressionTest::run(NULL, REGRESSION_TEST_QUICK);
+    RegressionTest::run(nullptr, REGRESSION_TEST_QUICK);
   }
 
   ink_freelists_dump(stdout);
diff --git a/iocore/utils/I_Machine.h b/iocore/utils/I_Machine.h
index ef9d7e0ec22..d9296c19767 100644
--- a/iocore/utils/I_Machine.h
+++ b/iocore/utils/I_Machine.h
@@ -69,7 +69,7 @@ struct Machine {
   ~Machine();
 
   /** Initialize the singleton.
-      If @a hostname or @a ip are @c NULL then system defaults are used.
+      If @a hostname or @a ip are @c nullptr then system defaults are used.
 
       @note This must be called before called @c instance so that the
       singleton is not @em inadvertently default initialized.
diff --git a/iocore/utils/I_OneWayMultiTunnel.h b/iocore/utils/I_OneWayMultiTunnel.h
index 0be538c5715..0189cc48b68 100644
--- a/iocore/utils/I_OneWayMultiTunnel.h
+++ b/iocore/utils/I_OneWayMultiTunnel.h
@@ -45,10 +45,10 @@
   to the target vcs. The maximum number of Target VCs is limited by
   ONE_WAY_MULTI_TUNNEL_LIMIT.
 
-  If manipulate_fn is not NULL, then the tunnel acts as a filter,
+  If manipulate_fn is not nullptr, then the tunnel acts as a filter,
   processing all data arriving from the source vc by the manipulate_fn
   function, before sending to the target vcs. By default, the
-  manipulate_fn is set to NULL, yielding the identity function.
+  manipulate_fn is set to nullptr, yielding the identity function.
 
   @see OneWayTunnel
 
@@ -108,10 +108,10 @@ struct OneWayMultiTunnel : public OneWayTunnel {
     @param water_mark for the MIOBuffer used for reading.
 
   */
-  void init(VConnection *vcSource, VConnection **vcTargets, int n_vcTargets, Continuation *aCont = NULL,
+  void init(VConnection *vcSource, VConnection **vcTargets, int n_vcTargets, Continuation *aCont = nullptr,
             int size_estimate = 0, // 0 == best guess
             int64_t nbytes = TUNNEL_TILL_DONE, bool asingle_buffer = true, bool aclose_source = true, bool aclose_target = true,
-            Transform_fn manipulate_fn = NULL, int water_mark = 0);
+            Transform_fn manipulate_fn = nullptr, int water_mark = 0);
 
   /**
     Use this init function if both the read and the write sides have
@@ -140,7 +140,7 @@ struct OneWayMultiTunnel : public OneWayTunnel {
   int startEvent(int event, void *data);
 
   virtual void reenable_all();
-  virtual void close_target_vio(int result, VIO *vio = NULL);
+  virtual void close_target_vio(int result, VIO *vio = nullptr);
 
   int n_vioTargets;
   VIO *vioTargets[ONE_WAY_MULTI_TUNNEL_LIMIT];
diff --git a/iocore/utils/I_OneWayTunnel.h b/iocore/utils/I_OneWayTunnel.h
index 479d4935099..595b354b3c3 100644
--- a/iocore/utils/I_OneWayTunnel.h
+++ b/iocore/utils/I_OneWayTunnel.h
@@ -41,7 +41,7 @@
 
 #define TUNNEL_TILL_DONE INT64_MAX
 
-#define ONE_WAY_TUNNEL_CLOSE_ALL NULL
+#define ONE_WAY_TUNNEL_CLOSE_ALL nullptr
 
 typedef void (*Transform_fn)(MIOBufferAccessor &in_buf, MIOBufferAccessor &out_buf);
 
@@ -54,10 +54,10 @@ typedef void (*Transform_fn)(MIOBufferAccessor &in_buf, MIOBufferAccessor &out_b
   its done. On success it calls back the continuation with VC_EVENT_EOS,
   and with VC_EVENT_ERROR on failure.
 
-  If manipulate_fn is not NULL, then the tunnel acts as a filter,
+  If manipulate_fn is not nullptr, then the tunnel acts as a filter,
   processing all data arriving from the source vc by the manipulate_fn
   function, before sending to the target vc. By default, the manipulate_fn
-  is set to NULL, yielding the identity function. manipulate_fn takes
+  is set to nullptr, yielding the identity function. manipulate_fn takes
   a IOBuffer containing the data to be written into the target virtual
   connection which it may manipulate in any manner it sees fit.
 
@@ -121,9 +121,9 @@ struct OneWayTunnel : public Continuation {
     @param water_mark watermark for the MIOBuffer used for reading.
 
   */
-  void init(VConnection *vcSource, VConnection *vcTarget, Continuation *aCont = NULL, int size_estimate = 0, // 0 = best guess
-            ProxyMutex *aMutex = NULL, int64_t nbytes = TUNNEL_TILL_DONE, bool asingle_buffer = true, bool aclose_source = true,
-            bool aclose_target = true, Transform_fn manipulate_fn = NULL, int water_mark = 0);
+  void init(VConnection *vcSource, VConnection *vcTarget, Continuation *aCont = nullptr, int size_estimate = 0, // 0 = best guess
+            ProxyMutex *aMutex = nullptr, int64_t nbytes = TUNNEL_TILL_DONE, bool asingle_buffer = true, bool aclose_source = true,
+            bool aclose_target = true, Transform_fn manipulate_fn = nullptr, int water_mark = 0);
 
   /**
     This init function sets up only the write side. It assumes that the
@@ -173,7 +173,7 @@ struct OneWayTunnel : public Continuation {
   //
   // Private
   //
-  OneWayTunnel(Continuation *aCont, Transform_fn manipulate_fn = NULL, bool aclose_source = false, bool aclose_target = false);
+  OneWayTunnel(Continuation *aCont, Transform_fn manipulate_fn = nullptr, bool aclose_source = false, bool aclose_target = false);
 
   int startEvent(int event, void *data);
 
@@ -202,7 +202,7 @@ struct OneWayTunnel : public Continuation {
   bool close_target;
   bool tunnel_till_done;
 
-  /** Non-NULL when this is one side of a two way tunnel. */
+  /** Non-nullptr when this is one side of a two way tunnel. */
   OneWayTunnel *tunnel_peer;
   bool free_vcs;
 
diff --git a/iocore/utils/Machine.cc b/iocore/utils/Machine.cc
index 32808d4f1a9..aeb62b8cff9 100644
--- a/iocore/utils/Machine.cc
+++ b/iocore/utils/Machine.cc
@@ -32,7 +32,7 @@
 #endif
 
 // Singleton
-Machine *Machine::_instance = NULL;
+Machine *Machine::_instance = nullptr;
 
 Machine *
 Machine::instance()
@@ -50,7 +50,7 @@ Machine::init(char const *name, sockaddr const *ip)
 }
 
 Machine::Machine(char const *the_hostname, sockaddr const *addr)
-  : hostname(0), hostname_len(0), ip_string_len(0), ip_hex_string_len(0)
+  : hostname(nullptr), hostname_len(0), ip_string_len(0), ip_hex_string_len(0)
 {
   char localhost[1024];
   int status; // return for system calls.
@@ -62,7 +62,7 @@ Machine::Machine(char const *the_hostname, sockaddr const *addr)
   ink_zero(ip6);
 
   uuid.initialize(TS_UUID_V4);
-  ink_release_assert(NULL != uuid.getString()); // The Process UUID must be available on startup
+  ink_release_assert(nullptr != uuid.getString()); // The Process UUID must be available on startup
 
   localhost[sizeof(localhost) - 1] = 0; // ensure termination.
 
@@ -74,7 +74,7 @@ Machine::Machine(char const *the_hostname, sockaddr const *addr)
     hostname = ats_strdup(the_hostname);
 
 #if HAVE_IFADDRS_H
-    ifaddrs *ifa_addrs = 0;
+    ifaddrs *ifa_addrs = nullptr;
     status             = getifaddrs(&ifa_addrs);
 #else
     int s = socket(AF_INET, SOCK_DGRAM, 0);
@@ -183,7 +183,7 @@ Machine::Machine(char const *the_hostname, sockaddr const *addr)
       ats_ip_copy(&ip6, addr);
     }
 
-    status = getnameinfo(addr, ats_ip_size(addr), localhost, sizeof(localhost) - 1, 0, 0, 0); // no flags
+    status = getnameinfo(addr, ats_ip_size(addr), localhost, sizeof(localhost) - 1, nullptr, 0, 0); // no flags
 
     if (0 != status) {
       ip_text_buffer ipbuff;
diff --git a/iocore/utils/OneWayMultiTunnel.cc b/iocore/utils/OneWayMultiTunnel.cc
index 77c14eb92ae..4de85236950 100644
--- a/iocore/utils/OneWayMultiTunnel.cc
+++ b/iocore/utils/OneWayMultiTunnel.cc
@@ -52,7 +52,7 @@ OneWayMultiTunnel::OneWayMultiTunnel_alloc()
 void
 OneWayMultiTunnel::OneWayMultiTunnel_free(OneWayMultiTunnel *pOWT)
 {
-  pOWT->mutex = NULL;
+  pOWT->mutex = nullptr;
   OneWayMultiTunnelAllocator.free(pOWT);
 }
 
@@ -83,7 +83,7 @@ OneWayMultiTunnel::init(VConnection *vcSource, VConnection **vcTargets, int n_vc
   tunnel_till_done = (nbytes == TUNNEL_TILL_DONE);
 
   MIOBuffer *buf1 = new_MIOBuffer(size_index);
-  MIOBuffer *buf2 = NULL;
+  MIOBuffer *buf2 = nullptr;
 
   single_buffer = asingle_buffer;
 
@@ -111,7 +111,7 @@ OneWayMultiTunnel::init(Continuation *aCont, VIO *SourceVio, VIO **TargetVios, i
   mutex         = aCont ? aCont->mutex : make_ptr(new_ProxyMutex());
   cont          = aCont;
   single_buffer = true;
-  manipulate_fn = 0;
+  manipulate_fn = nullptr;
   n_connections = n_TargetVios + 1;
   ;
   close_source = aclose_source;
@@ -236,7 +236,7 @@ OneWayMultiTunnel::close_target_vio(int result, VIO *vio)
         free_MIOBuffer(v->buffer.writer());
       if (close_target)
         v->vc_server->do_io(result ? VIO::ABORT : VIO::CLOSE);
-      vioTargets[i] = NULL;
+      vioTargets[i] = nullptr;
       n_connections--;
     }
   }
diff --git a/iocore/utils/OneWayTunnel.cc b/iocore/utils/OneWayTunnel.cc
index be5b25e6598..d35c45d7586 100644
--- a/iocore/utils/OneWayTunnel.cc
+++ b/iocore/utils/OneWayTunnel.cc
@@ -63,18 +63,18 @@ transfer_data(MIOBufferAccessor &in_buf, MIOBufferAccessor &out_buf)
 }
 
 OneWayTunnel::OneWayTunnel()
-  : Continuation(0),
-    vioSource(0),
-    vioTarget(0),
-    cont(0),
-    manipulate_fn(0),
+  : Continuation(nullptr),
+    vioSource(nullptr),
+    vioTarget(nullptr),
+    cont(nullptr),
+    manipulate_fn(nullptr),
     n_connections(0),
     lerrno(0),
     single_buffer(0),
     close_source(0),
     close_target(0),
     tunnel_till_done(0),
-    tunnel_peer(0),
+    tunnel_peer(nullptr),
     free_vcs(true)
 {
 }
@@ -88,7 +88,7 @@ OneWayTunnel::OneWayTunnel_alloc()
 void
 OneWayTunnel::OneWayTunnel_free(OneWayTunnel *pOWT)
 {
-  pOWT->mutex = NULL;
+  pOWT->mutex = nullptr;
   OneWayTunnelAllocator.free(pOWT);
 }
 
@@ -127,7 +127,7 @@ OneWayTunnel::init(VConnection *vcSource, VConnection *vcTarget, Continuation *a
                    int water_mark)
 {
   mutex            = aCont ? aCont->mutex.get() : (aMutex ? aMutex : new_ProxyMutex());
-  cont             = aMutex ? NULL : aCont;
+  cont             = aMutex ? nullptr : aCont;
   single_buffer    = asingle_buffer;
   manipulate_fn    = aManipulate_fn;
   n_connections    = 2;
@@ -149,7 +149,7 @@ OneWayTunnel::init(VConnection *vcSource, VConnection *vcTarget, Continuation *a
 
   // enqueue read request on vcSource.
   MIOBuffer *buf1 = new_MIOBuffer(size_index);
-  MIOBuffer *buf2 = NULL;
+  MIOBuffer *buf2 = nullptr;
   if (single_buffer)
     buf2 = buf1;
   else
@@ -173,7 +173,7 @@ OneWayTunnel::init(VConnection *vcSource, VConnection *vcTarget, Continuation *a
   mutex            = aCont ? aCont->mutex : make_ptr(new_ProxyMutex());
   cont             = aCont;
   single_buffer    = true;
-  manipulate_fn    = 0;
+  manipulate_fn    = nullptr;
   n_connections    = 2;
   close_source     = aclose_source;
   close_target     = aclose_target;
@@ -199,7 +199,7 @@ OneWayTunnel::init(Continuation *aCont, VIO *SourceVio, VIO *TargetVio, bool acl
   mutex            = aCont ? aCont->mutex : make_ptr(new_ProxyMutex());
   cont             = aCont;
   single_buffer    = true;
-  manipulate_fn    = 0;
+  manipulate_fn    = nullptr;
   n_connections    = 2;
   close_source     = aclose_source;
   close_target     = aclose_target;
@@ -256,7 +256,7 @@ OneWayTunnel::startEvent(int event, void *data)
   case ONE_WAY_TUNNEL_EVENT_PEER_CLOSE:
     /* This event is sent out by our peer */
     ink_assert(tunnel_peer);
-    tunnel_peer = NULL;
+    tunnel_peer = nullptr;
     free_vcs    = false;
     goto Ldone;
 
@@ -333,7 +333,7 @@ OneWayTunnel::close_source_vio(int result)
     if (close_source && free_vcs) {
       vioSource->vc_server->do_io_close(result ? lerrno : -1);
     }
-    vioSource = NULL;
+    vioSource = nullptr;
     n_connections--;
   }
 }
@@ -350,7 +350,7 @@ OneWayTunnel::close_target_vio(int result, VIO *vio)
     if (close_target && free_vcs) {
       vioTarget->vc_server->do_io_close(result ? lerrno : -1);
     }
-    vioTarget = NULL;
+    vioTarget = nullptr;
     n_connections--;
   }
 }
diff --git a/iocore/utils/diags.i b/iocore/utils/diags.i
index 847184392b9..2ad28fe4bb0 100644
--- a/iocore/utils/diags.i
+++ b/iocore/utils/diags.i
@@ -42,8 +42,8 @@ reconfigure_diags()
 
 
   // initial value set to 0 or 1 based on command line tags
-  c.enabled[DiagsTagType_Debug] = (diags->base_debug_tags != NULL);
-  c.enabled[DiagsTagType_Action] = (diags->base_action_tags != NULL);
+  c.enabled[DiagsTagType_Debug] = (diags->base_debug_tags != nullptr);
+  c.enabled[DiagsTagType_Action] = (diags->base_action_tags != nullptr);
 
   c.enabled[DiagsTagType_Debug] = 1;
   c.enabled[DiagsTagType_Action] = 1;
diff --git a/lib/bindings/bindings.cc b/lib/bindings/bindings.cc
index 32e996f86cd..1bc25473dbc 100644
--- a/lib/bindings/bindings.cc
+++ b/lib/bindings/bindings.cc
@@ -32,7 +32,7 @@ is_indexable(lua_State *L, int index)
   return lua_istable(L, index) || lua_isuserdata(L, index);
 }
 
-BindingInstance::BindingInstance() : lua(NULL)
+BindingInstance::BindingInstance() : lua(nullptr)
 {
 }
 
@@ -53,7 +53,7 @@ void *
 BindingInstance::retrieve_ptr(const char *name)
 {
   auto ptr = this->attachments.find(name);
-  return (ptr == this->attachments.end()) ? NULL : ptr->second;
+  return (ptr == this->attachments.end()) ? nullptr : ptr->second;
 }
 
 bool
@@ -221,7 +221,7 @@ BindingInstance::bind_value(const char *name, int value)
 bool
 BindingInstance::construct()
 {
-  ink_release_assert(this->lua == NULL);
+  ink_release_assert(this->lua == nullptr);
 
   if ((this->lua = luaL_newstate())) {
     luaL_openlibs(this->lua);
@@ -239,7 +239,7 @@ BindingInstance::construct()
 bool
 BindingInstance::require(const char *path)
 {
-  ink_release_assert(this->lua != NULL);
+  ink_release_assert(this->lua != nullptr);
 
   if (luaL_dofile(this->lua, path) != 0) {
     Warning("%s", lua_tostring(this->lua, -1));
@@ -273,7 +273,7 @@ BindingInstance::self(lua_State *lua)
   lua_getfield(lua, LUA_REGISTRYINDEX, selfkey);
   binding = (BindingInstance *)lua_touserdata(lua, -1);
 
-  ink_release_assert(binding != NULL);
+  ink_release_assert(binding != nullptr);
   ink_release_assert(binding->lua == lua);
 
   lua_pop(lua, 1);
@@ -323,7 +323,7 @@ BindingInstance::register_metatable(lua_State *lua, const char *name, const luaL
   // Pop one of those copies and assign it to __index field on the 1st metatable
   lua_setfield(lua, -2, "__index");
   // register functions in the metatable
-  luaL_register(lua, NULL, metatable);
+  luaL_register(lua, nullptr, metatable);
 
   lua_pop(lua, 1); /* drop metatable */
 
diff --git a/lib/bindings/lua.h b/lib/bindings/lua.h
index db5c732e75d..c0a49f89976 100644
--- a/lib/bindings/lua.h
+++ b/lib/bindings/lua.h
@@ -62,7 +62,7 @@ lua_newuserobject(lua_State *L)
     return new (ptr) T();
   }
 
-  return (T *)NULL;
+  return (T *)nullptr;
 }
 
 // Index the given key in the table at the specified index. If the
diff --git a/lib/bindings/metrics.cc b/lib/bindings/metrics.cc
index 869ff2991b1..5f0943a6e41 100644
--- a/lib/bindings/metrics.cc
+++ b/lib/bindings/metrics.cc
@@ -47,7 +47,7 @@ metrics_binding::check(lua_State *L, int index)
 
   luaL_checktype(L, index, LUA_TUSERDATA);
   m = (metrics_binding *)luaL_checkudata(L, index, BINDING);
-  if (m == NULL) {
+  if (m == nullptr) {
     luaL_typerror(L, index, "userdata");
   }
 
@@ -96,7 +96,7 @@ metrics_index(lua_State *L)
   size_t len;
 
   key = luaL_checklstring(L, 2, &len);
-  ink_release_assert(key != NULL && len != 0);
+  ink_release_assert(key != nullptr && len != 0);
 
   // First, check whether we have a reference stored for this key.
   ptr = m->refs.find(std::string(key, len));
@@ -196,7 +196,9 @@ lua_metrics_new(const char *prefix, lua_State *L)
 void
 lua_metrics_register(lua_State *L)
 {
-  static const luaL_reg metatable[] = {{"__gc", metrics_gc}, {"__index", metrics_index}, {"__newindex", metrics_newindex}, {0, 0}};
+  static const luaL_reg metatable[] = {
+    {"__gc", metrics_gc}, {"__index", metrics_index}, {"__newindex", metrics_newindex}, {nullptr, nullptr},
+  };
 
   BindingInstance::register_metatable(L, BINDING, metatable);
 }
diff --git a/lib/bindings/repl.cc b/lib/bindings/repl.cc
index 2931db83faa..c6b73b58461 100644
--- a/lib/bindings/repl.cc
+++ b/lib/bindings/repl.cc
@@ -37,7 +37,7 @@ repl(BindingInstance &binding)
     char *line;
 
     line = readline("> ");
-    if (line == NULL) {
+    if (line == nullptr) {
       exit(0);
     }
 
diff --git a/lib/cppapi/AsyncHttpFetch.cc b/lib/cppapi/AsyncHttpFetch.cc
index 8e6d2804f60..6985a68c517 100644
--- a/lib/cppapi/AsyncHttpFetch.cc
+++ b/lib/cppapi/AsyncHttpFetch.cc
@@ -56,12 +56,12 @@ struct atscppapi::AsyncHttpFetchState : noncopyable {
                       AsyncHttpFetch::StreamingFlag streaming_flag)
     : request_body_(request_body),
       result_(AsyncHttpFetch::RESULT_FAILURE),
-      body_(NULL),
+      body_(nullptr),
       body_size_(0),
-      hdr_buf_(NULL),
-      hdr_loc_(NULL),
+      hdr_buf_(nullptr),
+      hdr_loc_(nullptr),
       streaming_flag_(streaming_flag),
-      fetch_sm_(NULL)
+      fetch_sm_(nullptr)
   {
     request_.reset(new Request(url_str, http_method,
                                (streaming_flag_ == AsyncHttpFetch::STREAMING_DISABLED) ? HTTP_VERSION_1_0 : HTTP_VERSION_1_1));
@@ -73,7 +73,7 @@ struct atscppapi::AsyncHttpFetchState : noncopyable {
   ~AsyncHttpFetchState()
   {
     if (hdr_loc_) {
-      TSMLoc null_parent_loc = NULL;
+      TSMLoc null_parent_loc = nullptr;
       TSHandleMLocRelease(hdr_buf_, null_parent_loc, hdr_loc_);
     }
     if (hdr_buf_) {
diff --git a/lib/cppapi/AsyncTimer.cc b/lib/cppapi/AsyncTimer.cc
index 6122b1b867f..2a013e0c27b 100644
--- a/lib/cppapi/AsyncTimer.cc
+++ b/lib/cppapi/AsyncTimer.cc
@@ -38,8 +38,8 @@ struct atscppapi::AsyncTimerState {
     : type_(type),
       period_in_ms_(period_in_ms),
       initial_period_in_ms_(initial_period_in_ms),
-      initial_timer_action_(NULL),
-      periodic_timer_action_(NULL),
+      initial_timer_action_(nullptr),
+      periodic_timer_action_(nullptr),
       timer_(timer)
   {
   }
@@ -53,7 +53,7 @@ handleTimerEvent(TSCont cont, TSEvent event, void *edata)
   AsyncTimerState *state = static_cast(TSContDataGet(cont));
   if (state->initial_timer_action_) {
     LOG_DEBUG("Received initial timer event.");
-    state->initial_timer_action_ = NULL; // mark it so that it won't be canceled later on
+    state->initial_timer_action_ = nullptr; // mark it so that it won't be canceled later on
     if (state->type_ == AsyncTimer::TYPE_PERIODIC) {
       LOG_DEBUG("Scheduling periodic event now");
       state->periodic_timer_action_ = TSContScheduleEvery(state->cont_, state->period_in_ms_, TS_THREAD_POOL_DEFAULT);
@@ -113,7 +113,7 @@ AsyncTimer::cancel()
   }
   LOG_DEBUG("Destroying cont");
   TSContDestroy(state_->cont_);
-  state_->cont_ = NULL;
+  state_->cont_ = nullptr;
 }
 
 AsyncTimer::~AsyncTimer()
diff --git a/lib/cppapi/ClientRequest.cc b/lib/cppapi/ClientRequest.cc
index 8df7964a161..f9519759e3c 100644
--- a/lib/cppapi/ClientRequest.cc
+++ b/lib/cppapi/ClientRequest.cc
@@ -36,7 +36,7 @@ struct atscppapi::ClientRequestState : noncopyable {
   TSMBuffer pristine_hdr_buf_;
   TSMLoc pristine_url_loc_;
   Url pristine_url_;
-  ClientRequestState(TSHttpTxn txn) : txn_(txn), pristine_hdr_buf_(NULL), pristine_url_loc_(NULL) {}
+  ClientRequestState(TSHttpTxn txn) : txn_(txn), pristine_hdr_buf_(nullptr), pristine_url_loc_(nullptr) {}
 };
 
 atscppapi::ClientRequest::ClientRequest(void *ats_txn_handle, void *hdr_buf, void *hdr_loc) : Request(hdr_buf, hdr_loc)
@@ -47,7 +47,7 @@ atscppapi::ClientRequest::ClientRequest(void *ats_txn_handle, void *hdr_buf, voi
 atscppapi::ClientRequest::~ClientRequest()
 {
   if (state_->pristine_url_loc_ && state_->pristine_hdr_buf_) {
-    TSMLoc null_parent_loc = NULL;
+    TSMLoc null_parent_loc = nullptr;
     LOG_DEBUG("Releasing pristine url loc for transaction %p; hdr_buf %p, url_loc %p", state_->txn_, state_->pristine_hdr_buf_,
               state_->pristine_url_loc_);
     TSHandleMLocRelease(state_->pristine_hdr_buf_, null_parent_loc, state_->pristine_url_loc_);
@@ -62,7 +62,7 @@ atscppapi::ClientRequest::getPristineUrl() const
   if (!state_->pristine_url_loc_) {
     TSHttpTxnPristineUrlGet(state_->txn_, &state_->pristine_hdr_buf_, &state_->pristine_url_loc_);
 
-    if ((state_->pristine_hdr_buf_ != NULL) && (state_->pristine_url_loc_ != NULL)) {
+    if ((state_->pristine_hdr_buf_ != nullptr) && (state_->pristine_url_loc_ != nullptr)) {
       state_->pristine_url_.init(state_->pristine_hdr_buf_, state_->pristine_url_loc_);
       LOG_DEBUG("Pristine URL initialized");
     } else {
diff --git a/lib/cppapi/GlobalPlugin.cc b/lib/cppapi/GlobalPlugin.cc
index fa0e6246edf..caeb01eb310 100644
--- a/lib/cppapi/GlobalPlugin.cc
+++ b/lib/cppapi/GlobalPlugin.cc
@@ -66,7 +66,7 @@ GlobalPlugin::GlobalPlugin(bool ignore_internal_transactions)
 {
   utils::internal::initTransactionManagement();
   state_        = new GlobalPluginState(this, ignore_internal_transactions);
-  TSMutex mutex = NULL;
+  TSMutex mutex = nullptr;
   state_->cont_ = TSContCreate(handleGlobalPluginEvents, mutex);
   TSContDataSet(state_->cont_, static_cast(state_));
 }
diff --git a/lib/cppapi/GzipDeflateTransformation.cc b/lib/cppapi/GzipDeflateTransformation.cc
index fec2fcccff6..43aa71c90e5 100644
--- a/lib/cppapi/GzipDeflateTransformation.cc
+++ b/lib/cppapi/GzipDeflateTransformation.cc
@@ -109,7 +109,7 @@ GzipDeflateTransformation::consume(const string &data)
 
     int err = deflate(&state_->z_stream_, Z_SYNC_FLUSH);
     if (Z_OK != err) {
-      state_->z_stream_.next_out = NULL;
+      state_->z_stream_.next_out = nullptr;
       LOG_ERROR("Iteration %d: Deflate failed to compress %ld bytes with error code '%d'", iteration, data.size(), err);
       return;
     }
@@ -122,7 +122,7 @@ GzipDeflateTransformation::consume(const string &data)
     produce(string(reinterpret_cast(&buffer[0]), static_cast(bytes_to_write)));
   } while (state_->z_stream_.avail_out == 0);
 
-  state_->z_stream_.next_out = NULL;
+  state_->z_stream_.next_out = nullptr;
 
   if (state_->z_stream_.avail_in != 0) {
     LOG_ERROR("Inflate finished with data still remaining in the buffer of size '%u'", state_->z_stream_.avail_in);
diff --git a/lib/cppapi/GzipInflateTransformation.cc b/lib/cppapi/GzipInflateTransformation.cc
index 4e040f06726..bd73b3f19a2 100644
--- a/lib/cppapi/GzipInflateTransformation.cc
+++ b/lib/cppapi/GzipInflateTransformation.cc
@@ -117,7 +117,7 @@ GzipInflateTransformation::consume(const string &data)
 
     if (err != Z_OK && err != Z_STREAM_END) {
       LOG_ERROR("Iteration %d: Inflate failed with error '%d'", iteration, err);
-      state_->z_stream_.next_out = NULL;
+      state_->z_stream_.next_out = nullptr;
       return;
     }
 
@@ -126,7 +126,7 @@ GzipInflateTransformation::consume(const string &data)
     produce(string(&buffer[0], (inflate_block_size - state_->z_stream_.avail_out)));
     state_->bytes_produced_ += (inflate_block_size - state_->z_stream_.avail_out);
   }
-  state_->z_stream_.next_out = NULL;
+  state_->z_stream_.next_out = nullptr;
 }
 
 void
diff --git a/lib/cppapi/Headers.cc b/lib/cppapi/Headers.cc
index c2304af2a2a..805d218440e 100644
--- a/lib/cppapi/Headers.cc
+++ b/lib/cppapi/Headers.cc
@@ -105,7 +105,7 @@ struct HeaderFieldValueIteratorState : noncopyable {
   TSMLoc hdr_loc_;
   TSMLoc field_loc_;
   int index_;
-  HeaderFieldValueIteratorState() : hdr_buf_(NULL), hdr_loc_(NULL), field_loc_(NULL), index_(0) {}
+  HeaderFieldValueIteratorState() : hdr_buf_(nullptr), hdr_loc_(nullptr), field_loc_(nullptr), index_(0) {}
   void
   reset(TSMBuffer bufp, TSMLoc hdr_loc, TSMLoc field_loc, int index)
   {
@@ -490,7 +490,7 @@ struct HeadersState : noncopyable {
     hdr_buf_ = bufp;
     hdr_loc_ = hdr_loc;
   }
-  ~HeadersState() { reset(NULL, NULL); }
+  ~HeadersState() { reset(nullptr, nullptr); }
 };
 
 Headers::Headers()
diff --git a/lib/cppapi/InterceptPlugin.cc b/lib/cppapi/InterceptPlugin.cc
index 8609585c309..86caf158757 100644
--- a/lib/cppapi/InterceptPlugin.cc
+++ b/lib/cppapi/InterceptPlugin.cc
@@ -48,7 +48,7 @@ struct InterceptPlugin::State {
     TSVIO vio_;
     TSIOBuffer buffer_;
     TSIOBufferReader reader_;
-    IoHandle() : vio_(NULL), buffer_(NULL), reader_(NULL){};
+    IoHandle() : vio_(nullptr), buffer_(nullptr), reader_(nullptr){};
     ~IoHandle()
     {
       if (reader_) {
@@ -86,15 +86,15 @@ struct InterceptPlugin::State {
 
   State(TSCont cont, InterceptPlugin *plugin)
     : cont_(cont),
-      net_vc_(NULL),
+      net_vc_(nullptr),
       expected_body_size_(0),
       num_body_bytes_read_(0),
       hdr_parsed_(false),
-      hdr_buf_(NULL),
-      hdr_loc_(NULL),
+      hdr_buf_(nullptr),
+      hdr_loc_(nullptr),
       num_bytes_written_(0),
       plugin_(plugin),
-      timeout_action_(NULL),
+      timeout_action_(nullptr),
       plugin_io_done_(false)
   {
     plugin_mutex_ = plugin->getMutex();
@@ -136,8 +136,8 @@ InterceptPlugin::~InterceptPlugin()
 {
   if (state_->cont_) {
     LOG_DEBUG("Relying on callback for cleanup");
-    state_->plugin_ = NULL; // prevent callback from invoking plugin
-  } else {                  // safe to cleanup
+    state_->plugin_ = nullptr; // prevent callback from invoking plugin
+  } else {                     // safe to cleanup
     LOG_DEBUG("Normal cleanup");
     delete state_;
   }
@@ -207,7 +207,7 @@ InterceptPlugin::doRead()
     int64_t data_len; // size of all data (header + body) in a block
     const char *data, *startptr;
     TSIOBufferBlock block = TSIOBufferReaderStart(state_->input_.reader_);
-    while (block != NULL) {
+    while (block != nullptr) {
       startptr = data         = TSIOBufferBlockReadStart(block, state_->input_.reader_, &data_len);
       num_body_bytes_in_block = 0;
       if (!state_->hdr_parsed_) {
@@ -349,10 +349,10 @@ handleEvents(TSCont cont, TSEvent pristine_event, void *pristine_edata)
     return 0;
   }
   if (event == TS_EVENT_TIMEOUT) { // we have a saved event to restore
-    state->timeout_action_ = NULL;
+    state->timeout_action_ = nullptr;
     if (state->plugin_io_done_) { // plugin is done, so can't send it saved event
       event = TS_EVENT_VCONN_EOS; // fake completion
-      edata = NULL;
+      edata = nullptr;
     } else {
       event = state->saved_event_;
       edata = state->saved_edata_;
@@ -364,7 +364,7 @@ handleEvents(TSCont cont, TSEvent pristine_event, void *pristine_edata)
   } else {                             // plugin was destroyed before intercept was completed; cleaning up here
     LOG_DEBUG("Cleaning up as intercept plugin is already destroyed");
     destroyCont(state);
-    TSContDataSet(cont, NULL);
+    TSContDataSet(cont, nullptr);
     delete state;
   }
   return 0;
@@ -376,11 +376,11 @@ destroyCont(InterceptPlugin::State *state)
   if (state->net_vc_) {
     TSVConnShutdown(state->net_vc_, 1, 1);
     TSVConnClose(state->net_vc_);
-    state->net_vc_ = NULL;
+    state->net_vc_ = nullptr;
   }
   if (!state->timeout_action_) {
     TSContDestroy(state->cont_);
-    state->cont_ = NULL;
+    state->cont_ = nullptr;
   }
 }
 }
diff --git a/lib/cppapi/Logger.cc b/lib/cppapi/Logger.cc
index 3033dcef250..ee1b3dd5582 100644
--- a/lib/cppapi/Logger.cc
+++ b/lib/cppapi/Logger.cc
@@ -56,7 +56,7 @@ struct atscppapi::LoggerState : noncopyable {
       level_(Logger::LOG_LEVEL_NO_LOG),
       rolling_enabled_(false),
       rolling_interval_seconds_(-1),
-      text_log_obj_(NULL),
+      text_log_obj_(nullptr),
       initialized_(false){};
   ~LoggerState(){};
 };
diff --git a/lib/cppapi/Request.cc b/lib/cppapi/Request.cc
index 1c3ca939053..37e69ebe34a 100644
--- a/lib/cppapi/Request.cc
+++ b/lib/cppapi/Request.cc
@@ -42,9 +42,9 @@ struct atscppapi::RequestState : noncopyable {
   HttpVersion version_;
   bool destroy_buf_;
   RequestState()
-    : hdr_buf_(NULL),
-      hdr_loc_(NULL),
-      url_loc_(NULL),
+    : hdr_buf_(nullptr),
+      hdr_loc_(nullptr),
+      url_loc_(nullptr),
       method_(HTTP_METHOD_UNKNOWN),
       version_(HTTP_VERSION_UNKNOWN),
       destroy_buf_(false)
@@ -80,7 +80,7 @@ Request::Request(const string &url_str, HttpMethod method, HttpVersion version)
       state_->url_.init(state_->hdr_buf_, state_->url_loc_);
     }
   } else {
-    state_->url_loc_ = NULL;
+    state_->url_loc_ = nullptr;
     LOG_ERROR("Could not create URL field; hdr_buf %p", state_->hdr_buf_);
   }
 }
@@ -95,7 +95,7 @@ Request::init(void *hdr_buf, void *hdr_loc)
   state_->hdr_buf_ = static_cast(hdr_buf);
   state_->hdr_loc_ = static_cast(hdr_loc);
   state_->headers_.reset(state_->hdr_buf_, state_->hdr_loc_);
-  state_->url_loc_ = NULL;
+  state_->url_loc_ = nullptr;
   TSHttpHdrUrlGet(state_->hdr_buf_, state_->hdr_loc_, &state_->url_loc_);
   if (!state_->url_loc_) {
     LOG_ERROR("TSHttpHdrUrlGet returned a null url loc, hdr_buf=%p, hdr_loc=%p", state_->hdr_buf_, state_->hdr_loc_);
@@ -108,10 +108,10 @@ Request::init(void *hdr_buf, void *hdr_loc)
 void
 Request::reset()
 {
-  state_->hdr_buf_ = NULL;
-  state_->hdr_loc_ = NULL;
-  state_->headers_.reset(NULL, NULL);
-  state_->url_loc_ = NULL;
+  state_->hdr_buf_ = nullptr;
+  state_->hdr_loc_ = nullptr;
+  state_->headers_.reset(nullptr, nullptr);
+  state_->url_loc_ = nullptr;
   LOG_DEBUG("Reset request %p", this);
 }
 
@@ -183,7 +183,7 @@ Request::~Request()
     if (state_->destroy_buf_) {
       // usually, hdr_loc is the parent of url_loc, but we created this url_loc "directly" in hdr_buf,
       // so we use null as parent loc in this case
-      TSMLoc null_parent_loc = NULL;
+      TSMLoc null_parent_loc = nullptr;
       TSHandleMLocRelease(state_->hdr_buf_, null_parent_loc, state_->url_loc_);
       TSMBufferDestroy(state_->hdr_buf_);
     } else {
diff --git a/lib/cppapi/Response.cc b/lib/cppapi/Response.cc
index 50da522fc35..1f54a76bc09 100644
--- a/lib/cppapi/Response.cc
+++ b/lib/cppapi/Response.cc
@@ -35,7 +35,7 @@ struct ResponseState : noncopyable {
   TSMBuffer hdr_buf_;
   TSMLoc hdr_loc_;
   Headers headers_;
-  ResponseState() : hdr_buf_(NULL), hdr_loc_(NULL) {}
+  ResponseState() : hdr_buf_(nullptr), hdr_loc_(nullptr) {}
 };
 }
 
@@ -61,9 +61,9 @@ Response::init(void *hdr_buf, void *hdr_loc)
 void
 Response::reset()
 {
-  state_->hdr_buf_ = NULL;
-  state_->hdr_loc_ = NULL;
-  state_->headers_.reset(NULL, NULL);
+  state_->hdr_buf_ = nullptr;
+  state_->hdr_loc_ = nullptr;
+  state_->headers_.reset(nullptr, nullptr);
   LOG_DEBUG("Reset response %p", this);
 }
 
diff --git a/lib/cppapi/Transaction.cc b/lib/cppapi/Transaction.cc
index 500f79e515f..66bc8172977 100644
--- a/lib/cppapi/Transaction.cc
+++ b/lib/cppapi/Transaction.cc
@@ -69,16 +69,16 @@ struct atscppapi::TransactionState : noncopyable {
       client_request_hdr_buf_(client_request_hdr_buf),
       client_request_hdr_loc_(client_request_hdr_loc),
       client_request_(txn, client_request_hdr_buf, client_request_hdr_loc),
-      server_request_hdr_buf_(NULL),
-      server_request_hdr_loc_(NULL),
-      server_response_hdr_buf_(NULL),
-      server_response_hdr_loc_(NULL),
-      client_response_hdr_buf_(NULL),
-      client_response_hdr_loc_(NULL),
-      cached_response_hdr_buf_(NULL),
-      cached_response_hdr_loc_(NULL),
-      cached_request_hdr_buf_(NULL),
-      cached_request_hdr_loc_(NULL){};
+      server_request_hdr_buf_(nullptr),
+      server_request_hdr_loc_(nullptr),
+      server_response_hdr_buf_(nullptr),
+      server_response_hdr_loc_(nullptr),
+      client_response_hdr_buf_(nullptr),
+      client_response_hdr_loc_(nullptr),
+      cached_response_hdr_buf_(nullptr),
+      cached_response_hdr_loc_(nullptr),
+      cached_request_hdr_buf_(nullptr),
+      cached_request_hdr_loc_(nullptr){};
 };
 
 Transaction::Transaction(void *raw_txn)
@@ -182,7 +182,7 @@ Transaction::setErrorBody(const std::string &page)
   LOG_DEBUG("Transaction tshttptxn=%p setting error body page length: %lu", state_->txn_, page.length());
   char *body = (char *)TSmalloc(page.length());
   memcpy(body, page.data(), page.length());
-  TSHttpTxnErrorBodySet(state_->txn_, body, page.length(), NULL); // Default to text/html
+  TSHttpTxnErrorBodySet(state_->txn_, body, page.length(), nullptr); // Default to text/html
 }
 
 void
@@ -419,8 +419,8 @@ class initializeHandles
   bool
   operator()(TSHttpTxn txn, TSMBuffer &hdr_buf, TSMLoc &hdr_loc, const char *handles_name)
   {
-    hdr_buf = NULL;
-    hdr_loc = NULL;
+    hdr_buf = nullptr;
+    hdr_loc = nullptr;
     if (getter_(txn, &hdr_buf, &hdr_loc) == TS_SUCCESS) {
       return true;
     } else {
@@ -439,7 +439,7 @@ Request &
 Transaction::getServerRequest()
 {
   static initializeHandles initializeServerRequestHandles(TSHttpTxnServerReqGet);
-  if (NULL == state_->server_request_hdr_buf_) {
+  if (nullptr == state_->server_request_hdr_buf_) {
     initializeServerRequestHandles(state_->txn_, state_->server_request_hdr_buf_, state_->server_request_hdr_loc_,
                                    "server request");
     LOG_DEBUG("Initializing server request, event %d", state_->event_);
@@ -452,7 +452,7 @@ Response &
 Transaction::getServerResponse()
 {
   static initializeHandles initializeServerResponseHandles(TSHttpTxnServerRespGet);
-  if (NULL == state_->server_response_hdr_buf_) {
+  if (nullptr == state_->server_response_hdr_buf_) {
     initializeServerResponseHandles(state_->txn_, state_->server_response_hdr_buf_, state_->server_response_hdr_loc_,
                                     "server response");
     LOG_DEBUG("Initializing server response, event %d", state_->event_);
@@ -465,7 +465,7 @@ Response &
 Transaction::getClientResponse()
 {
   static initializeHandles initializeClientResponseHandles(TSHttpTxnClientRespGet);
-  if (NULL == state_->client_response_hdr_buf_) {
+  if (nullptr == state_->client_response_hdr_buf_) {
     initializeClientResponseHandles(state_->txn_, state_->client_response_hdr_buf_, state_->client_response_hdr_loc_,
                                     "client response");
     LOG_DEBUG("Initializing client response, event %d", state_->event_);
@@ -484,7 +484,7 @@ Transaction::getCachedRequest()
     state_->cached_request_.reset();
     LOG_DEBUG("Reset cached request, event %d", state_->event_);
   } else {
-    if (NULL == state_->cached_request_hdr_buf_) {
+    if (nullptr == state_->cached_request_hdr_buf_) {
       initializeCachedRequestHandles(state_->txn_, state_->cached_request_hdr_buf_, state_->cached_request_hdr_loc_,
                                      "cached request");
       LOG_DEBUG("Initializing cached request, event %d", state_->event_);
@@ -498,7 +498,7 @@ Response &
 Transaction::getCachedResponse()
 {
   static initializeHandles initializeCachedResponseHandles(TSHttpTxnCachedRespGet);
-  if (NULL == state_->cached_response_hdr_buf_) {
+  if (nullptr == state_->cached_response_hdr_buf_) {
     initializeCachedResponseHandles(state_->txn_, state_->cached_response_hdr_buf_, state_->cached_response_hdr_loc_,
                                     "cached response");
     LOG_DEBUG("Initializing cached response, event %d", state_->event_);
@@ -510,16 +510,16 @@ Transaction::getCachedResponse()
 void
 Transaction::resetHandles()
 {
-  state_->cached_request_hdr_buf_  = NULL;
-  state_->cached_request_hdr_loc_  = NULL;
-  state_->cached_response_hdr_buf_ = NULL;
-  state_->cached_response_hdr_loc_ = NULL;
+  state_->cached_request_hdr_buf_  = nullptr;
+  state_->cached_request_hdr_loc_  = nullptr;
+  state_->cached_response_hdr_buf_ = nullptr;
+  state_->cached_response_hdr_loc_ = nullptr;
 
-  state_->client_response_hdr_buf_ = NULL;
-  state_->client_response_hdr_loc_ = NULL;
+  state_->client_response_hdr_buf_ = nullptr;
+  state_->client_response_hdr_loc_ = nullptr;
 
-  state_->server_request_hdr_buf_  = NULL;
-  state_->server_request_hdr_loc_  = NULL;
-  state_->server_response_hdr_buf_ = NULL;
-  state_->server_response_hdr_loc_ = NULL;
+  state_->server_request_hdr_buf_  = nullptr;
+  state_->server_request_hdr_loc_  = nullptr;
+  state_->server_response_hdr_buf_ = nullptr;
+  state_->server_response_hdr_loc_ = nullptr;
 }
diff --git a/lib/cppapi/TransactionPlugin.cc b/lib/cppapi/TransactionPlugin.cc
index 67f0c5f4417..29f5fc9e081 100644
--- a/lib/cppapi/TransactionPlugin.cc
+++ b/lib/cppapi/TransactionPlugin.cc
@@ -60,7 +60,7 @@ handleTransactionPluginEvents(TSCont cont, TSEvent event, void *edata)
 TransactionPlugin::TransactionPlugin(Transaction &transaction)
 {
   state_        = new TransactionPluginState(static_cast(transaction.getAtsHandle()));
-  TSMutex mutex = NULL;
+  TSMutex mutex = nullptr;
   state_->cont_ = TSContCreate(handleTransactionPluginEvents, mutex);
   TSContDataSet(state_->cont_, static_cast(this));
   LOG_DEBUG("Creating new TransactionPlugin=%p tshttptxn=%p, cont=%p", this, state_->ats_txn_handle_, state_->cont_);
diff --git a/lib/cppapi/TransformationPlugin.cc b/lib/cppapi/TransformationPlugin.cc
index 66e6141a9b6..20e7821b2e3 100644
--- a/lib/cppapi/TransformationPlugin.cc
+++ b/lib/cppapi/TransformationPlugin.cc
@@ -60,14 +60,14 @@ struct atscppapi::TransformationPluginState : noncopyable {
 
   TransformationPluginState(atscppapi::Transaction &transaction, TransformationPlugin &transformation_plugin,
                             TransformationPlugin::Type type, TSHttpTxn txn)
-    : vconn_(NULL),
+    : vconn_(nullptr),
       transaction_(transaction),
       transformation_plugin_(transformation_plugin),
       type_(type),
-      output_vio_(NULL),
+      output_vio_(nullptr),
       txn_(txn),
-      output_buffer_(NULL),
-      output_buffer_reader_(NULL),
+      output_buffer_(nullptr),
+      output_buffer_reader_(nullptr),
       bytes_written_(0),
       input_complete_dispatched_(false)
   {
@@ -79,12 +79,12 @@ struct atscppapi::TransformationPluginState : noncopyable {
   {
     if (output_buffer_reader_) {
       TSIOBufferReaderFree(output_buffer_reader_);
-      output_buffer_reader_ = NULL;
+      output_buffer_reader_ = nullptr;
     }
 
     if (output_buffer_) {
       TSIOBufferDestroy(output_buffer_);
-      output_buffer_ = NULL;
+      output_buffer_ = nullptr;
     }
   }
 };
@@ -176,7 +176,7 @@ handleTransformationPluginRead(TSCont contp, TransformationPluginState *state)
         if (!state->input_complete_dispatched_) {
           state->transformation_plugin_.handleInputComplete();
           state->input_complete_dispatched_ = true;
-          if (vio_cont && 0 != TSVIOBufferGet(write_vio)) {
+          if (vio_cont && nullptr != TSVIOBufferGet(write_vio)) {
             TSContCall(vio_cont, static_cast(TS_EVENT_VCONN_WRITE_COMPLETE), write_vio);
           }
         }
@@ -189,13 +189,13 @@ handleTransformationPluginRead(TSCont contp, TransformationPluginState *state)
       if (!state->input_complete_dispatched_) {
         state->transformation_plugin_.handleInputComplete();
         state->input_complete_dispatched_ = true;
-        if (vio_cont && 0 != TSVIOBufferGet(write_vio)) {
+        if (vio_cont && nullptr != TSVIOBufferGet(write_vio)) {
           TSContCall(vio_cont, static_cast(TS_EVENT_VCONN_WRITE_COMPLETE), write_vio);
         }
       }
     }
   } else {
-    LOG_ERROR("Transformation contp=%p write_vio=%p was NULL!", contp, write_vio);
+    LOG_ERROR("Transformation contp=%p write_vio=%p was nullptr!", contp, write_vio);
   }
   return 0;
 }
diff --git a/lib/cppapi/Url.cc b/lib/cppapi/Url.cc
index 7fc4d63fb3f..24a3f5c474c 100644
--- a/lib/cppapi/Url.cc
+++ b/lib/cppapi/Url.cc
@@ -38,7 +38,7 @@ struct atscppapi::UrlState : noncopyable {
 
 Url::Url()
 {
-  state_ = new UrlState(static_cast(NULL), static_cast(NULL));
+  state_ = new UrlState(static_cast(nullptr), static_cast(nullptr));
 }
 
 Url::Url(void *hdr_buf, void *url_loc)
diff --git a/lib/cppapi/include/atscppapi/Async.h b/lib/cppapi/include/atscppapi/Async.h
index e24c1e6a4dd..1104d1e851b 100644
--- a/lib/cppapi/include/atscppapi/Async.h
+++ b/lib/cppapi/include/atscppapi/Async.h
@@ -129,13 +129,13 @@ class AsyncDispatchController : public AsyncDispatchControllerBase
   disable()
   {
     ScopedSharedMutexLock scopedLock(dispatch_mutex_);
-    event_receiver_ = NULL;
+    event_receiver_ = nullptr;
   }
 
   bool
   isEnabled()
   {
-    return (event_receiver_ != NULL);
+    return (event_receiver_ != nullptr);
   }
 
   /**
@@ -177,7 +177,7 @@ template  class Asy
   ~AsyncReceiverPromise()
   {
     ScopedSharedMutexLock scopedLock(dispatch_controller_->dispatch_mutex_);
-    dispatch_controller_->event_receiver_ = NULL;
+    dispatch_controller_->event_receiver_ = nullptr;
   }
 
 protected:
@@ -223,7 +223,7 @@ class Async : noncopyable
    * @param mutex The mutex that is locked during the dispatch of the async event complete.
    *              One will be created if nothing is passed in. Transaction plugins should use
    *              TransactionPlugin::getMutex() here and global plugins can pass an appropriate
-   *              or NULL mutex.
+   *              or nullptr mutex.
    */
   template 
   static void
diff --git a/lib/cppapi/include/atscppapi/AsyncHttpFetch.h b/lib/cppapi/include/atscppapi/AsyncHttpFetch.h
index 90e4e8335b3..c511c2c38e8 100644
--- a/lib/cppapi/include/atscppapi/AsyncHttpFetch.h
+++ b/lib/cppapi/include/atscppapi/AsyncHttpFetch.h
@@ -110,7 +110,7 @@ class AsyncHttpFetch : public AsyncProvider
 
   /**
    * Used to extract the body of the response after request completion. On
-   * unsuccessful completion, values (NULL, 0) are set.
+   * unsuccessful completion, values (nullptr, 0) are set.
    *
    * When streaming is enabled, this can be called on either body result.
    *
diff --git a/lib/cppapi/include/atscppapi/Transaction.h b/lib/cppapi/include/atscppapi/Transaction.h
index 60256b5dc3f..8c1a3c15ca7 100644
--- a/lib/cppapi/include/atscppapi/Transaction.h
+++ b/lib/cppapi/include/atscppapi/Transaction.h
@@ -94,7 +94,7 @@ class Transaction : noncopyable
    * and the value can be a std::shared_ptr to any type that extends ContextValue.
    * @param key the key to search for.
    * @return Shared pointer that is correctly initialized if the
-   *         value existed. It should be checked with .get() != NULL before use.
+   *         value existed. It should be checked with .get() != nullptr before use.
    */
   std::shared_ptr getContextValue(const std::string &key);
 
diff --git a/lib/cppapi/utils.cc b/lib/cppapi/utils.cc
index 8ccd5ec2dc7..22945968b23 100644
--- a/lib/cppapi/utils.cc
+++ b/lib/cppapi/utils.cc
@@ -29,8 +29,8 @@
 std::string
 atscppapi::utils::getIpString(const sockaddr *sockaddress)
 {
-  if (sockaddress == NULL) {
-    LOG_ERROR("Cannot work on NULL sockaddress");
+  if (sockaddress == nullptr) {
+    LOG_ERROR("Cannot work on nullptr sockaddress");
     return std::string();
   }
 
@@ -52,8 +52,8 @@ atscppapi::utils::getIpString(const sockaddr *sockaddress)
 uint16_t
 atscppapi::utils::getPort(const sockaddr *sockaddress)
 {
-  if (sockaddress == NULL) {
-    LOG_ERROR("Cannot work on NULL sockaddress");
+  if (sockaddress == nullptr) {
+    LOG_ERROR("Cannot work on nullptr sockaddress");
     return 0;
   }
 
@@ -70,8 +70,8 @@ atscppapi::utils::getPort(const sockaddr *sockaddress)
 std::string
 atscppapi::utils::getIpPortString(const sockaddr *sockaddress)
 {
-  if (sockaddress == NULL) {
-    LOG_ERROR("Cannot work on NULL sockaddress");
+  if (sockaddress == nullptr) {
+    LOG_ERROR("Cannot work on nullptr sockaddress");
     return std::string();
   }
 
diff --git a/lib/cppapi/utils_internal.cc b/lib/cppapi/utils_internal.cc
index 8ed78a532d0..ed3740055c3 100644
--- a/lib/cppapi/utils_internal.cc
+++ b/lib/cppapi/utils_internal.cc
@@ -100,7 +100,7 @@ setupTransactionManagement()
   // Reserve a transaction slot
   TSAssert(TS_SUCCESS == TSHttpArgIndexReserve("atscppapi", "ATS CPP API", &TRANSACTION_STORAGE_INDEX));
   // We must always have a cleanup handler available
-  TSMutex mutex = NULL;
+  TSMutex mutex = nullptr;
   TSCont cont   = TSContCreate(handleTransactionEvents, mutex);
   TSHttpHookAdd(TS_HTTP_POST_REMAP_HOOK, cont);
   TSHttpHookAdd(TS_HTTP_SEND_REQUEST_HDR_HOOK, cont);
@@ -244,7 +244,7 @@ utils::internal::consumeFromTSIOBufferReader(TSIOBufferReader reader)
       int64_t data_len;
       const char *char_data;
       TSIOBufferBlock block = TSIOBufferReaderStart(reader);
-      while (block != NULL) {
+      while (block != nullptr) {
         char_data = TSIOBufferBlockReadStart(block, reader, &data_len);
         str.append(char_data, data_len);
         consumed += data_len;
diff --git a/lib/records/I_RecCore.h b/lib/records/I_RecCore.h
index 5e7d0ff45fa..52d8d4825e3 100644
--- a/lib/records/I_RecCore.h
+++ b/lib/records/I_RecCore.h
@@ -70,11 +70,11 @@ char *RecConfigReadBinDir();
 
 // Return a copy of a configuration file that is relative to sysconfdir. The relative path to the configuration
 // file is specified in the configuration variable named by "file_variable". If the configuration variable has no
-// value, NULL is returned. The caller MUST release the result with ats_free().
-char *RecConfigReadConfigPath(const char *file_variable, const char *default_value = NULL);
+// value, nullptr is returned. The caller MUST release the result with ats_free().
+char *RecConfigReadConfigPath(const char *file_variable, const char *default_value = nullptr);
 
 // This is the same as RecConfigReadConfigPath, except it makes the paths relative to $PREFIX.
-char *RecConfigReadPrefixPath(const char *file_variable, const char *default_value = NULL);
+char *RecConfigReadPrefixPath(const char *file_variable, const char *default_value = nullptr);
 
 // Return a copy of the persistent stats file. This is $RUNTIMEDIR/records.snap.
 // The caller MUST release the result with ats_free().
@@ -317,6 +317,6 @@ RecErrT RecSetSyncRequired(char *name, bool lock = true);
 // Manager Callback
 //------------------------------------------------------------------------
 typedef void *(*RecManagerCb)(void *opaque_cb_data, char *data_raw, int data_len);
-int RecRegisterManagerCb(int _signal, RecManagerCb _fn, void *_data = NULL);
+int RecRegisterManagerCb(int _signal, RecManagerCb _fn, void *_data = nullptr);
 
 #endif
diff --git a/lib/records/I_RecDefs.h b/lib/records/I_RecDefs.h
index 37a7b9668f0..b825886c547 100644
--- a/lib/records/I_RecDefs.h
+++ b/lib/records/I_RecDefs.h
@@ -41,7 +41,7 @@ enum RecErrT {
 //-------------------------------------------------------------------------
 // Types
 //-------------------------------------------------------------------------
-#define RecStringNull NULL
+#define RecStringNull nullptr
 
 typedef int64_t RecInt;
 typedef float RecFloat;
diff --git a/lib/records/I_RecHttp.h b/lib/records/I_RecHttp.h
index cba4292c2ca..75ddd6f2de6 100644
--- a/lib/records/I_RecHttp.h
+++ b/lib/records/I_RecHttp.h
@@ -183,7 +183,7 @@ class SessionProtocolNameRegistry
   int indexFor(const char *name) const;
 
   /** Convert an @a index to the corresponding name.
-      @return A pointer to the name or @c NULL if the index isn't registered.
+      @return A pointer to the name or @c nullptr if the index isn't registered.
   */
   const char *nameFor(int index) const;
 
@@ -320,7 +320,7 @@ struct HttpProxyPort {
   /** Load ports from a value string.
 
       Load ports from single string with port descriptors. Ports
-      found are added to @a ports. @a value may safely be @c NULL or empty.
+      found are added to @a ports. @a value may safely be @c nullptr or empty.
 
       @note This is used primarily internally but is available if needed.
       @return @c true if a valid port was found, @c false if none.
@@ -332,7 +332,7 @@ struct HttpProxyPort {
   /** Load ports from a value string into the global ports.
 
       Load ports from single string of port descriptors into the
-      global set of ports. @a value may safely be @c NULL or empty.
+      global set of ports. @a value may safely be @c nullptr or empty.
 
       @return @c true if a valid port was found, @c false if none.
   */
@@ -351,7 +351,7 @@ struct HttpProxyPort {
   /** Find an HTTP port in @a ports.
       If @a family is specified then only ports for that family
       are checked.
-      @return The port if found, @c NULL if not.
+      @return The port if found, @c nullptr if not.
   */
   static self *findHttp(Group const &ports,         ///< Group to search.
                         uint16_t family = AF_UNSPEC ///< Desired address family.
@@ -360,7 +360,7 @@ struct HttpProxyPort {
   /** Find an HTTP port in the global ports.
       If @a family is specified then only ports for that family
       are checked.
-      @return The port if found, @c NULL if not.
+      @return The port if found, @c nullptr if not.
   */
   static self *findHttp(uint16_t family = AF_UNSPEC);
 
@@ -404,7 +404,7 @@ struct HttpProxyPort {
   void processSessionProtocolPreference(const char *value);
 
   /** Check a prefix option and find the value.
-      @return The address of the start of the value, or @c NULL if the prefix doesn't match.
+      @return The address of the start of the value, or @c nullptr if the prefix doesn't match.
   */
 
   const char *checkPrefix(char const *src ///< Input text
diff --git a/lib/records/I_RecLocal.h b/lib/records/I_RecLocal.h
index fdec68cbd99..b48d254090e 100644
--- a/lib/records/I_RecLocal.h
+++ b/lib/records/I_RecLocal.h
@@ -32,7 +32,7 @@ class FileManager;
 // Initialization
 //-------------------------------------------------------------------------
 
-int RecLocalInit(Diags *diags = NULL);
+int RecLocalInit(Diags *diags = nullptr);
 int RecLocalInitMessage();
 int RecLocalStart(FileManager *);
 
diff --git a/lib/records/I_RecMutex.h b/lib/records/I_RecMutex.h
index 6067439cf8d..d175a067cc6 100644
--- a/lib/records/I_RecMutex.h
+++ b/lib/records/I_RecMutex.h
@@ -38,7 +38,7 @@ struct RecMutex {
   ink_mutex the_mutex;
 };
 
-int rec_mutex_init(RecMutex *m, const char *name = NULL);
+int rec_mutex_init(RecMutex *m, const char *name = nullptr);
 int rec_mutex_destroy(RecMutex *m);
 int rec_mutex_acquire(RecMutex *m);
 int rec_mutex_release(RecMutex *m);
diff --git a/lib/records/I_RecProcess.h b/lib/records/I_RecProcess.h
index d32b349b570..b3f5c374232 100644
--- a/lib/records/I_RecProcess.h
+++ b/lib/records/I_RecProcess.h
@@ -30,7 +30,7 @@
 //-------------------------------------------------------------------------
 // Initialization/Starting
 //-------------------------------------------------------------------------
-int RecProcessInit(RecModeT mode_type, Diags *diags = NULL);
+int RecProcessInit(RecModeT mode_type, Diags *diags = nullptr);
 int RecProcessInitMessage(RecModeT mode_type);
 int RecProcessStart(void);
 
@@ -117,7 +117,7 @@ inline RecRawStat *
 raw_stat_get_tlp(RecRawStatBlock *rsb, int id, EThread *ethread)
 {
   ink_assert((id >= 0) && (id < rsb->max_stats));
-  if (ethread == NULL) {
+  if (ethread == nullptr) {
     ethread = this_ethread();
   }
   return (((RecRawStat *)((char *)(ethread) + rsb->ethr_stat_offset)) + id);
diff --git a/lib/records/P_RecCore.cc b/lib/records/P_RecCore.cc
index 564361ab92f..6e8d0d29eca 100644
--- a/lib/records/P_RecCore.cc
+++ b/lib/records/P_RecCore.cc
@@ -192,7 +192,7 @@ recv_message_cb(RecMessage *msg, RecMessageT msg_type, void * /* cookie */)
         if (REC_TYPE_IS_STAT(r->rec_type)) {
           RecSetRecord(r->rec_type, r->name, r->data_type, &(r->data), &(r->stat_meta.data_raw), REC_SOURCE_EXPLICIT);
         } else {
-          RecSetRecord(r->rec_type, r->name, r->data_type, &(r->data), NULL, REC_SOURCE_EXPLICIT);
+          RecSetRecord(r->rec_type, r->name, r->data_type, &(r->data), nullptr, REC_SOURCE_EXPLICIT);
         }
       } while (RecMessageUnmarshalNext(msg, &itr, &r) != REC_ERR_FAIL);
     }
@@ -206,7 +206,7 @@ recv_message_cb(RecMessage *msg, RecMessageT msg_type, void * /* cookie */)
         if (REC_TYPE_IS_STAT(r->rec_type)) {
           RecResetStatRecord(r->name);
         } else {
-          RecSetRecord(r->rec_type, r->name, r->data_type, &(r->data), NULL, REC_SOURCE_EXPLICIT);
+          RecSetRecord(r->rec_type, r->name, r->data_type, &(r->data), nullptr, REC_SOURCE_EXPLICIT);
         }
       } while (RecMessageUnmarshalNext(msg, &itr, &r) != REC_ERR_FAIL);
     }
@@ -266,7 +266,7 @@ recv_message_cb(RecMessage *msg, RecMessageT msg_type, void * /* cookie */)
   RecRecord *r;                                                                                                                 \
   RecData my_data_default;                                                                                                      \
   my_data_default.A = data_default;                                                                                             \
-  if ((r = RecRegisterStat(rec_type, name, B, my_data_default, persist_type)) != NULL) {                                        \
+  if ((r = RecRegisterStat(rec_type, name, B, my_data_default, persist_type)) != nullptr) {                                     \
     if (i_am_the_record_owner(r->rec_type)) {                                                                                   \
       r->sync_required = r->sync_required | REC_PEER_SYNC_REQUIRED;                                                             \
     } else {                                                                                                                    \
@@ -309,7 +309,7 @@ _RecRegisterStatCounter(RecT rec_type, const char *name, RecCounter data_default
   RecData my_data_default;                                                                                                      \
   my_data_default.A = data_default;                                                                                             \
   if ((r = RecRegisterConfig(rec_type, name, B, my_data_default, update_type, check_type, check_regex, source, access_type)) != \
-      NULL) {                                                                                                                   \
+      nullptr) {                                                                                                                \
     if (i_am_the_record_owner(r->rec_type)) {                                                                                   \
       r->sync_required = r->sync_required | REC_PEER_SYNC_REQUIRED;                                                             \
     } else {                                                                                                                    \
@@ -378,7 +378,7 @@ RecSetRecord(RecT rec_type, const char *name, RecDataT data_type, RecData *data,
         if (data_type == RECD_NULL) {
           // If the caller didn't know the data type, they gave us a string
           // and we should convert based on the record's data type.
-          ink_release_assert(data->rec_string != NULL);
+          ink_release_assert(data->rec_string != nullptr);
           RecDataSetFromString(r1->data_type, &(r1->data), data->rec_string);
         } else {
           RecDataSet(data_type, &(r1->data), data);
@@ -393,7 +393,7 @@ RecSetRecord(RecT rec_type, const char *name, RecDataT data_type, RecData *data,
           r1->config_meta.update_required = REC_UPDATE_REQUIRED;
         }
 
-        if (REC_TYPE_IS_STAT(r1->rec_type) && (data_raw != NULL)) {
+        if (REC_TYPE_IS_STAT(r1->rec_type) && (data_raw != nullptr)) {
           r1->stat_meta.data_raw = *data_raw;
         } else if (REC_TYPE_IS_CONFIG(r1->rec_type)) {
           r1->config_meta.source = source;
@@ -410,7 +410,7 @@ RecSetRecord(RecT rec_type, const char *name, RecDataT data_type, RecData *data,
       r2.name      = name;
       r2.data_type = (data_type != RECD_NULL) ? data_type : r1->data_type;
       r2.data      = *data;
-      if (REC_TYPE_IS_STAT(r2.rec_type) && (data_raw != NULL)) {
+      if (REC_TYPE_IS_STAT(r2.rec_type) && (data_raw != nullptr)) {
         r2.stat_meta.data_raw = *data_raw;
       } else if (REC_TYPE_IS_CONFIG(r2.rec_type)) {
         r2.config_meta.source = source;
@@ -430,7 +430,7 @@ RecSetRecord(RecT rec_type, const char *name, RecDataT data_type, RecData *data,
     }
     r1 = RecAlloc(rec_type, name, data_type);
     RecDataSet(data_type, &(r1->data), data);
-    if (REC_TYPE_IS_STAT(r1->rec_type) && (data_raw != NULL)) {
+    if (REC_TYPE_IS_STAT(r1->rec_type) && (data_raw != nullptr)) {
       r1->stat_meta.data_raw = *data_raw;
     } else if (REC_TYPE_IS_CONFIG(r1->rec_type)) {
       r1->config_meta.source = source;
@@ -456,7 +456,7 @@ RecSetRecordConvert(const char *name, const RecString rec_string, RecSourceT sou
 {
   RecData data;
   data.rec_string = rec_string;
-  return RecSetRecord(RECT_NULL, name, RECD_NULL, &data, NULL, source, lock, inc_version);
+  return RecSetRecord(RECT_NULL, name, RECD_NULL, &data, nullptr, source, lock, inc_version);
 }
 
 RecErrT
@@ -464,7 +464,7 @@ RecSetRecordInt(const char *name, RecInt rec_int, RecSourceT source, bool lock,
 {
   RecData data;
   data.rec_int = rec_int;
-  return RecSetRecord(RECT_NULL, name, RECD_INT, &data, NULL, source, lock, inc_version);
+  return RecSetRecord(RECT_NULL, name, RECD_INT, &data, nullptr, source, lock, inc_version);
 }
 
 RecErrT
@@ -472,7 +472,7 @@ RecSetRecordFloat(const char *name, RecFloat rec_float, RecSourceT source, bool
 {
   RecData data;
   data.rec_float = rec_float;
-  return RecSetRecord(RECT_NULL, name, RECD_FLOAT, &data, NULL, source, lock, inc_version);
+  return RecSetRecord(RECT_NULL, name, RECD_FLOAT, &data, nullptr, source, lock, inc_version);
 }
 
 RecErrT
@@ -480,7 +480,7 @@ RecSetRecordString(const char *name, const RecString rec_string, RecSourceT sour
 {
   RecData data;
   data.rec_string = rec_string;
-  return RecSetRecord(RECT_NULL, name, RECD_STRING, &data, NULL, source, lock, inc_version);
+  return RecSetRecord(RECT_NULL, name, RECD_STRING, &data, nullptr, source, lock, inc_version);
 }
 
 RecErrT
@@ -488,7 +488,7 @@ RecSetRecordCounter(const char *name, RecCounter rec_counter, RecSourceT source,
 {
   RecData data;
   data.rec_counter = rec_counter;
-  return RecSetRecord(RECT_NULL, name, RECD_COUNTER, &data, NULL, source, lock, inc_version);
+  return RecSetRecord(RECT_NULL, name, RECD_COUNTER, &data, nullptr, source, lock, inc_version);
 }
 
 //-------------------------------------------------------------------------
@@ -506,10 +506,10 @@ RecReadStatsFile()
   // lock our hash table
   ink_rwlock_wrlock(&g_records_rwlock);
 
-  if ((m = RecMessageReadFromDisk(snap_fpath)) != NULL) {
+  if ((m = RecMessageReadFromDisk(snap_fpath)) != nullptr) {
     if (RecMessageUnmarshalFirst(m, &itr, &r) != REC_ERR_FAIL) {
       do {
-        if ((r->name == NULL) || (!strlen(r->name))) {
+        if ((r->name == nullptr) || (!strlen(r->name))) {
           continue;
         }
 
@@ -598,7 +598,7 @@ RecConsumeConfigEntry(RecT rec_type, RecDataT data_type, const char *name, const
 
   memset(&data, 0, sizeof(RecData));
   RecDataSetFromString(data_type, &data, value);
-  RecSetRecord(rec_type, name, data_type, &data, NULL, source, false, inc_version);
+  RecSetRecord(rec_type, name, data_type, &data, nullptr, source, false, inc_version);
   RecDataZero(data_type, &data);
 }
 
@@ -630,7 +630,7 @@ RecSyncConfigToTB(textBuffer *tb, bool *inc_version)
 {
   RecErrT err = REC_ERR_FAIL;
 
-  if (inc_version != NULL) {
+  if (inc_version != nullptr) {
     *inc_version = false;
   }
 
@@ -660,13 +660,13 @@ RecSyncConfigToTB(textBuffer *tb, bool *inc_version)
             cfe->entry_type = RECE_RECORD;
             cfe->entry      = ats_strdup(r->name);
             enqueue(g_rec_config_contents_llq, (void *)cfe);
-            ink_hash_table_insert(g_rec_config_contents_ht, r->name, NULL);
+            ink_hash_table_insert(g_rec_config_contents_ht, r->name, nullptr);
           }
           r->sync_required = r->sync_required & ~REC_DISK_SYNC_REQUIRED;
           sync_to_disk     = true;
           if (r->sync_required & REC_INC_CONFIG_VERSION) {
             r->sync_required = r->sync_required & ~REC_INC_CONFIG_VERSION;
-            if (r->rec_type != RECT_LOCAL && inc_version != NULL) {
+            if (r->rec_type != RECT_LOCAL && inc_version != nullptr) {
               *inc_version = true;
             }
           }
@@ -685,7 +685,7 @@ RecSyncConfigToTB(textBuffer *tb, bool *inc_version)
       ink_rwlock_rdlock(&g_records_rwlock);
 
       LLQrec *llq_rec = g_rec_config_contents_llq->head;
-      while (llq_rec != NULL) {
+      while (llq_rec != nullptr) {
         cfe = (RecConfigFileEntry *)llq_rec->data;
         if (cfe->entry_type == RECE_COMMENT) {
           tb->copyFrom(cfe->entry, strlen(cfe->entry));
@@ -734,7 +734,7 @@ RecSyncConfigToTB(textBuffer *tb, bool *inc_version)
               if (r->data.rec_string) {
                 tb->copyFrom(r->data.rec_string, strlen(r->data.rec_string));
               } else {
-                tb->copyFrom("NULL", strlen("NULL"));
+                tb->copyFrom("nullptr", strlen("NULL"));
               }
               break;
             case RECD_COUNTER:
@@ -792,7 +792,7 @@ RecExecConfigUpdateCbs(unsigned int update_required_type)
       }
 
       if ((r->config_meta.update_required & update_required_type) && (r->config_meta.update_cb_list)) {
-        RecConfigUpdateCbList *cur_callback = NULL;
+        RecConfigUpdateCbList *cur_callback = nullptr;
         for (cur_callback = r->config_meta.update_cb_list; cur_callback; cur_callback = cur_callback->next) {
           (*(cur_callback->update_cb))(r->name, r->data_type, r->data, cur_callback->update_cookie);
         }
@@ -837,7 +837,7 @@ reset_stat_record(RecRecord *rec)
 RecErrT
 RecResetStatRecord(const char *name)
 {
-  RecRecord *r1 = NULL;
+  RecRecord *r1 = nullptr;
   RecErrT err   = REC_ERR_FAIL;
 
   if (ink_hash_table_lookup(g_records_ht, name, (void **)&r1)) {
diff --git a/lib/records/P_RecCore.h b/lib/records/P_RecCore.h
index f1f5d4ace66..4acdf06b676 100644
--- a/lib/records/P_RecCore.h
+++ b/lib/records/P_RecCore.h
@@ -81,7 +81,7 @@ RecErrT RecReadStatsFile();
 RecErrT RecSyncStatsFile();
 RecErrT RecReadConfigFile(bool inc_version);
 RecErrT RecWriteConfigFile(textBuffer *tb);
-RecErrT RecSyncConfigToTB(textBuffer *tb, bool *inc_version = NULL);
+RecErrT RecSyncConfigToTB(textBuffer *tb, bool *inc_version = nullptr);
 
 //-------------------------------------------------------------------------
 // Misc
diff --git a/lib/records/RecConfigParse.cc b/lib/records/RecConfigParse.cc
index 87a5a30c402..1c321183fb8 100644
--- a/lib/records/RecConfigParse.cc
+++ b/lib/records/RecConfigParse.cc
@@ -35,9 +35,9 @@
 #include "P_RecCore.h"
 #include "ts/I_Layout.h"
 
-const char *g_rec_config_fpath         = NULL;
-LLQ *g_rec_config_contents_llq         = NULL;
-InkHashTable *g_rec_config_contents_ht = NULL;
+const char *g_rec_config_fpath         = nullptr;
+LLQ *g_rec_config_contents_llq         = nullptr;
+InkHashTable *g_rec_config_contents_ht = nullptr;
 ink_mutex g_rec_config_lock;
 
 //-------------------------------------------------------------------------
@@ -46,7 +46,7 @@ ink_mutex g_rec_config_lock;
 void
 RecConfigFileInit(void)
 {
-  ink_mutex_init(&g_rec_config_lock, NULL);
+  ink_mutex_init(&g_rec_config_lock, nullptr);
   g_rec_config_contents_llq = create_queue();
   g_rec_config_contents_ht  = ink_hash_table_create(InkHashTableKeyType_String);
 }
@@ -62,7 +62,7 @@ RecFileImport_Xmalloc(const char *file, char **file_buf, int *file_size)
   int bytes_read;
 
   if (file && file_buf && file_size) {
-    *file_buf  = 0;
+    *file_buf  = nullptr;
     *file_size = 0;
     if ((h_file = RecFileOpenR(file)) != REC_HANDLE_INVALID) {
       *file_size = RecFileGetSize(h_file);
@@ -72,7 +72,7 @@ RecFileImport_Xmalloc(const char *file, char **file_buf, int *file_size)
         err                     = REC_ERR_OKAY;
       } else {
         ats_free(*file_buf);
-        *file_buf  = 0;
+        *file_buf  = nullptr;
         *file_size = 0;
       }
       RecFileClose(h_file);
@@ -89,7 +89,7 @@ const char *
 RecConfigOverrideFromEnvironment(const char *name, const char *value)
 {
   ats_scoped_str envname(ats_strdup(name));
-  const char *envval = NULL;
+  const char *envval = nullptr;
 
   // Munge foo.bar.config into FOO_BAR_CONFIG.
   for (char *c = envname; *c != '\0'; ++c) {
@@ -170,8 +170,8 @@ RecConfigFileParse(const char *path, RecConfigEntryCallback handler, bool inc_ve
       goto L_next_line;
     }
 
-    name_str      = strtok_r(NULL, " \t", &ln);
-    data_type_str = strtok_r(NULL, " \t", &ln);
+    name_str      = strtok_r(nullptr, " \t", &ln);
+    data_type_str = strtok_r(nullptr, " \t", &ln);
 
     // extract the string data (a little bit tricker since it can have spaces)
     if (ln) {
@@ -185,7 +185,7 @@ RecConfigFileParse(const char *path, RecConfigEntryCallback handler, bool inc_ve
         ln++;
       }
       if (*ln == '\0') {
-        data_str = NULL;
+        data_str = nullptr;
       } else {
         data_str = ln;
         while (*ln != '\0') {
@@ -199,7 +199,7 @@ RecConfigFileParse(const char *path, RecConfigEntryCallback handler, bool inc_ve
         *ln = '\0';
       }
     } else {
-      data_str = NULL;
+      data_str = nullptr;
     }
 
     // check for errors
@@ -247,7 +247,7 @@ RecConfigFileParse(const char *path, RecConfigEntryCallback handler, bool inc_ve
     cfe->entry_type = RECE_RECORD;
     cfe->entry      = ats_strdup(name_str);
     enqueue(g_rec_config_contents_llq, (void *)cfe);
-    ink_hash_table_insert(g_rec_config_contents_ht, name_str, NULL);
+    ink_hash_table_insert(g_rec_config_contents_ht, name_str, nullptr);
     goto L_done;
 
   L_next_line:
diff --git a/lib/records/RecCore.cc b/lib/records/RecCore.cc
index 858631fcaec..7e92db41d58 100644
--- a/lib/records/RecCore.cc
+++ b/lib/records/RecCore.cc
@@ -32,8 +32,8 @@
 
 static bool g_initialized = false;
 
-RecRecord *g_records       = NULL;
-InkHashTable *g_records_ht = NULL;
+RecRecord *g_records       = nullptr;
+InkHashTable *g_records_ht = nullptr;
 ink_rwlock g_records_rwlock;
 int g_num_records = 0;
 
@@ -42,9 +42,9 @@ int g_num_records = 0;
 //-------------------------------------------------------------------------
 static RecRecord *
 register_record(RecT rec_type, const char *name, RecDataT data_type, RecData data_default, RecPersistT persist_type,
-                bool *updated_p = NULL)
+                bool *updated_p = nullptr)
 {
-  RecRecord *r = NULL;
+  RecRecord *r = nullptr;
 
   // Metrics are restored from persistence before they are registered. In this case, when the registration arrives, we
   // might find that they yave changed. For example, a metric might change it's type due to a software upgrade. Records
@@ -78,8 +78,8 @@ register_record(RecT rec_type, const char *name, RecDataT data_type, RecData dat
       *updated_p = true;
     }
   } else {
-    if ((r = RecAlloc(rec_type, name, data_type)) == NULL) {
-      return NULL;
+    if ((r = RecAlloc(rec_type, name, data_type)) == nullptr) {
+      return nullptr;
     }
 
     // Set the r->data to its default value as this is a new record
@@ -162,7 +162,7 @@ static int
 link_string_alloc(const char * /* name */, RecDataT /* data_type */, RecData data, void *cookie)
 {
   RecString _ss        = data.rec_string;
-  RecString _new_value = NULL;
+  RecString _new_value = nullptr;
 
   if (_ss) {
     _new_value = ats_strdup(_ss);
@@ -210,17 +210,17 @@ RecCoreInit(RecModeT mode_type, Diags *_diags)
   }
   // read configs
   if ((mode_type == RECM_SERVER) || (mode_type == RECM_STAND_ALONE)) {
-    ink_mutex_init(&g_rec_config_lock, NULL);
+    ink_mutex_init(&g_rec_config_lock, nullptr);
     // Import the file into memory; try the following in this order:
     // ./etc/trafficserver/records.config.shadow
     // ./records.config.shadow
     // ./etc/trafficserver/records.config
     // ./records.config
     bool file_exists   = true;
-    g_rec_config_fpath = RecConfigReadConfigPath(NULL, REC_CONFIG_FILE REC_SHADOW_EXT);
+    g_rec_config_fpath = RecConfigReadConfigPath(nullptr, REC_CONFIG_FILE REC_SHADOW_EXT);
     if (RecFileExists(g_rec_config_fpath) == REC_ERR_FAIL) {
       ats_free((char *)g_rec_config_fpath);
-      g_rec_config_fpath = RecConfigReadConfigPath(NULL, REC_CONFIG_FILE);
+      g_rec_config_fpath = RecConfigReadConfigPath(nullptr, REC_CONFIG_FILE);
       if (RecFileExists(g_rec_config_fpath) == REC_ERR_FAIL) {
         RecLog(DL_Warning, "Could not find '%s', system will run with defaults\n", REC_CONFIG_FILE);
         file_exists = false;
@@ -332,14 +332,14 @@ RecRegisterConfigUpdateCb(const char *name, RecConfigUpdateCb update_cb, void *c
       new_callback->update_cb     = update_cb;
       new_callback->update_cookie = cookie;
 
-      new_callback->next = NULL;
+      new_callback->next = nullptr;
 
       ink_assert(new_callback);
       if (!r->config_meta.update_cb_list) {
         r->config_meta.update_cb_list = new_callback;
       } else {
-        RecConfigUpdateCbList *cur_callback  = NULL;
-        RecConfigUpdateCbList *prev_callback = NULL;
+        RecConfigUpdateCbList *cur_callback  = nullptr;
+        RecConfigUpdateCbList *prev_callback = nullptr;
         for (cur_callback = r->config_meta.update_cb_list; cur_callback; cur_callback = cur_callback->next) {
           prev_callback = cur_callback;
         }
@@ -396,7 +396,7 @@ RecGetRecordString(const char *name, char *buf, int buf_len, bool lock)
     if (!r->registered || (r->data_type != RECD_STRING)) {
       err = REC_ERR_FAIL;
     } else {
-      if (r->data.rec_string == NULL) {
+      if (r->data.rec_string == nullptr) {
         buf[0] = '\0';
       } else {
         ink_strlcpy(buf, r->data.rec_string, buf_len);
@@ -542,7 +542,7 @@ int
 RecGetRecordDataType(const char *name, RecDataT *data_type, bool lock)
 {
   int err      = REC_ERR_FAIL;
-  RecRecord *r = NULL;
+  RecRecord *r = nullptr;
 
   if (lock) {
     ink_rwlock_rdlock(&g_records_rwlock);
@@ -570,7 +570,7 @@ int
 RecGetRecordPersistenceType(const char *name, RecPersistT *persist_type, bool lock)
 {
   int err      = REC_ERR_FAIL;
-  RecRecord *r = NULL;
+  RecRecord *r = nullptr;
 
   if (lock) {
     ink_rwlock_rdlock(&g_records_rwlock);
@@ -598,7 +598,7 @@ int
 RecGetRecordOrderAndId(const char *name, int *order, int *id, bool lock)
 {
   int err      = REC_ERR_FAIL;
-  RecRecord *r = NULL;
+  RecRecord *r = nullptr;
 
   if (lock) {
     ink_rwlock_rdlock(&g_records_rwlock);
@@ -629,7 +629,7 @@ int
 RecGetRecordUpdateType(const char *name, RecUpdateT *update_type, bool lock)
 {
   int err      = REC_ERR_FAIL;
-  RecRecord *r = NULL;
+  RecRecord *r = nullptr;
 
   if (lock) {
     ink_rwlock_rdlock(&g_records_rwlock);
@@ -657,7 +657,7 @@ int
 RecGetRecordCheckType(const char *name, RecCheckT *check_type, bool lock)
 {
   int err      = REC_ERR_FAIL;
-  RecRecord *r = NULL;
+  RecRecord *r = nullptr;
 
   if (lock) {
     ink_rwlock_rdlock(&g_records_rwlock);
@@ -685,7 +685,7 @@ int
 RecGetRecordCheckExpr(const char *name, char **check_expr, bool lock)
 {
   int err      = REC_ERR_FAIL;
-  RecRecord *r = NULL;
+  RecRecord *r = nullptr;
 
   if (lock) {
     ink_rwlock_rdlock(&g_records_rwlock);
@@ -713,7 +713,7 @@ int
 RecGetRecordDefaultDataString_Xmalloc(char *name, char **buf, bool lock)
 {
   int err;
-  RecRecord *r = NULL;
+  RecRecord *r = nullptr;
 
   if (lock) {
     ink_rwlock_rdlock(&g_records_rwlock);
@@ -736,7 +736,7 @@ RecGetRecordDefaultDataString_Xmalloc(char *name, char **buf, bool lock)
         ink_strlcpy(*buf, r->data_default.rec_string, 1024);
       } else {
         ats_free(*buf);
-        *buf = NULL;
+        *buf = nullptr;
       }
       break;
     case RECD_COUNTER:
@@ -745,7 +745,7 @@ RecGetRecordDefaultDataString_Xmalloc(char *name, char **buf, bool lock)
     default:
       ink_assert(!"Unexpected RecD type");
       ats_free(*buf);
-      *buf = NULL;
+      *buf = nullptr;
       break;
     }
   } else {
@@ -763,7 +763,7 @@ int
 RecGetRecordAccessType(const char *name, RecAccessT *access, bool lock)
 {
   int err      = REC_ERR_FAIL;
-  RecRecord *r = NULL;
+  RecRecord *r = nullptr;
 
   if (lock) {
     ink_rwlock_rdlock(&g_records_rwlock);
@@ -787,7 +787,7 @@ int
 RecSetRecordAccessType(const char *name, RecAccessT access, bool lock)
 {
   int err      = REC_ERR_FAIL;
-  RecRecord *r = NULL;
+  RecRecord *r = nullptr;
 
   if (lock) {
     ink_rwlock_rdlock(&g_records_rwlock);
@@ -813,10 +813,10 @@ RecSetRecordAccessType(const char *name, RecAccessT access, bool lock)
 RecRecord *
 RecRegisterStat(RecT rec_type, const char *name, RecDataT data_type, RecData data_default, RecPersistT persist_type)
 {
-  RecRecord *r = NULL;
+  RecRecord *r = nullptr;
 
   ink_rwlock_wrlock(&g_records_rwlock);
-  if ((r = register_record(rec_type, name, data_type, data_default, persist_type)) != NULL) {
+  if ((r = register_record(rec_type, name, data_type, data_default, persist_type)) != nullptr) {
     // If the persistence type we found in the records hash is not the same as the persistence
     // type we are registering, then that means that it changed between the previous software
     // version and the current version. If the metric changed to non-persistent, reset to the
@@ -848,7 +848,7 @@ RecRegisterConfig(RecT rec_type, const char *name, RecDataT data_type, RecData d
   bool updated_p;
 
   ink_rwlock_wrlock(&g_records_rwlock);
-  if ((r = register_record(rec_type, name, data_type, data_default, RECP_NULL, &updated_p)) != NULL) {
+  if ((r = register_record(rec_type, name, data_type, data_default, RECP_NULL, &updated_p)) != nullptr) {
     // Note: do not modify 'record->config_meta.update_required'
     r->config_meta.update_type = update_type;
     r->config_meta.check_type  = check_type;
@@ -856,7 +856,7 @@ RecRegisterConfig(RecT rec_type, const char *name, RecDataT data_type, RecData d
       ats_free(r->config_meta.check_expr);
     }
     r->config_meta.check_expr     = ats_strdup(check_expr);
-    r->config_meta.update_cb_list = NULL;
+    r->config_meta.update_cb_list = nullptr;
     r->config_meta.access_type    = access_type;
     if (!updated_p) {
       r->config_meta.source = source;
@@ -908,7 +908,7 @@ RecGetRecord_Xmalloc(const char *name, RecDataT data_type, RecData *data, bool l
 RecRecord *
 RecForceInsert(RecRecord *record)
 {
-  RecRecord *r = NULL;
+  RecRecord *r = nullptr;
   bool r_is_a_new_record;
 
   ink_rwlock_wrlock(&g_records_rwlock);
@@ -920,9 +920,9 @@ RecForceInsert(RecRecord *record)
     r->data_type = record->data_type;
   } else {
     r_is_a_new_record = true;
-    if ((r = RecAlloc(record->rec_type, record->name, record->data_type)) == NULL) {
+    if ((r = RecAlloc(record->rec_type, record->name, record->data_type)) == nullptr) {
       ink_rwlock_unlock(&g_records_rwlock);
-      return NULL;
+      return nullptr;
     }
   }
 
@@ -971,7 +971,7 @@ debug_record_callback(RecT /* rec_type */, void * /* edata */, int registered, c
     RecDebug(DL_Note, "  ([%d] '%s', '%f')", registered, name, datum->rec_float);
     break;
   case RECD_STRING:
-    RecDebug(DL_Note, "  ([%d] '%s', '%s')", registered, name, datum->rec_string ? datum->rec_string : "NULL");
+    RecDebug(DL_Note, "  ([%d] '%s', '%s')", registered, name, datum->rec_string ? datum->rec_string : "nullptr");
     break;
   case RECD_COUNTER:
     RecDebug(DL_Note, "  ([%d] '%s', '%" PRId64 "')", registered, name, datum->rec_counter);
@@ -1002,7 +1002,7 @@ void
 RecDumpRecordsHt(RecT rec_type)
 {
   RecDebug(DL_Note, "Dumping Records:");
-  RecDumpRecords(rec_type, debug_record_callback, NULL);
+  RecDumpRecords(rec_type, debug_record_callback, nullptr);
 }
 
 //-------------------------------------------------------------------------
@@ -1019,7 +1019,7 @@ REC_ConfigReadInteger(const char *name)
 char *
 REC_ConfigReadString(const char *name)
 {
-  char *t = 0;
+  char *t = nullptr;
   RecGetRecordString_Xmalloc(name, (RecString *)&t);
   return t;
 }
@@ -1086,7 +1086,7 @@ RecString
 REC_readString(const char *name, bool *found, bool lock)
 {
   ink_assert(name);
-  RecString _tmp = NULL;
+  RecString _tmp = nullptr;
   bool _found;
   _found = (RecGetRecordString_Xmalloc(name, &_tmp, lock) == REC_ERR_OKAY);
   if (found) {
@@ -1196,7 +1196,7 @@ RecConfigReadConfigPath(const char *file_variable, const char *default_value)
     return Layout::get()->relative_to(sysconfdir, default_value);
   }
 
-  return NULL;
+  return nullptr;
 }
 
 //-------------------------------------------------------------------------
@@ -1221,7 +1221,7 @@ RecConfigReadPrefixPath(const char *file_variable, const char *default_value)
     return Layout::get()->relative_to(Layout::get()->prefix, default_value);
   }
 
-  return NULL;
+  return nullptr;
 }
 
 //-------------------------------------------------------------------------
@@ -1262,5 +1262,5 @@ RecConfigWarnIfUnregistered()
                    if (!registered_p)
                      Warning("Unrecognized configuration value '%s'", name);
                  },
-                 NULL);
+                 nullptr);
 }
diff --git a/lib/records/RecDebug.cc b/lib/records/RecDebug.cc
index 13ea9b671c7..722e928de38 100644
--- a/lib/records/RecDebug.cc
+++ b/lib/records/RecDebug.cc
@@ -24,7 +24,7 @@
 #include "P_RecUtils.h"
 #include "P_RecCore.h"
 
-static Diags *g_diags = NULL;
+static Diags *g_diags = nullptr;
 
 //-------------------------------------------------------------------------
 // RecSetDiags
@@ -74,5 +74,5 @@ _RecDebug(DiagsLevel dl, const SourceLocation &loc, const char *fmt, ...)
 void
 RecDebugOff()
 {
-  g_diags = NULL;
+  g_diags = nullptr;
 }
diff --git a/lib/records/RecHttp.cc b/lib/records/RecHttp.cc
index 9dcf792876d..2076f5ac9d1 100644
--- a/lib/records/RecHttp.cc
+++ b/lib/records/RecHttp.cc
@@ -179,7 +179,7 @@ HttpProxyPort *
 HttpProxyPort::findHttp(Group const &ports, uint16_t family)
 {
   bool check_family_p = ats_is_ip(family);
-  self *zret          = 0;
+  self *zret          = nullptr;
   for (int i = 0, n = ports.length(); i < n && !zret; ++i) {
     HttpProxyPort &p = ports[i];
     if (p.m_port &&                               // has a valid port
@@ -195,7 +195,7 @@ HttpProxyPort::findHttp(Group const &ports, uint16_t family)
 const char *
 HttpProxyPort::checkPrefix(const char *src, char const *prefix, size_t prefix_len)
 {
-  const char *zret = 0;
+  const char *zret = nullptr;
   if (0 == strncasecmp(prefix, src, prefix_len)) {
     src += prefix_len;
     if ('-' == *src || '=' == *src) {
@@ -271,7 +271,7 @@ HttpProxyPort::processOptions(const char *opts)
   memcpy(text, opts, opts_len);
 
   // Split the copy in to tokens.
-  char *token = 0;
+  char *token = nullptr;
   for (char *spot = text; *spot; ++spot) {
     if (bracket_p) {
       if (']' == *spot) {
@@ -279,7 +279,7 @@ HttpProxyPort::processOptions(const char *opts)
       }
     } else if (':' == *spot) {
       *spot = 0;
-      token = 0;
+      token = nullptr;
     } else {
       if (!token) {
         token = spot;
@@ -309,7 +309,7 @@ HttpProxyPort::processOptions(const char *opts)
         m_port = port;
         zret   = true;
       }
-    } else if (0 != (value = this->checkPrefix(item, OPT_FD_PREFIX, OPT_FD_PREFIX_LEN))) {
+    } else if (nullptr != (value = this->checkPrefix(item, OPT_FD_PREFIX, OPT_FD_PREFIX_LEN))) {
       char *ptr; // tmp for syntax check.
       int fd = strtoul(value, &ptr, 10);
       if (ptr == value) {
@@ -318,13 +318,13 @@ HttpProxyPort::processOptions(const char *opts)
         m_fd = fd;
         zret = true;
       }
-    } else if (0 != (value = this->checkPrefix(item, OPT_INBOUND_IP_PREFIX, OPT_INBOUND_IP_PREFIX_LEN))) {
+    } else if (nullptr != (value = this->checkPrefix(item, OPT_INBOUND_IP_PREFIX, OPT_INBOUND_IP_PREFIX_LEN))) {
       if (0 == ip.load(value)) {
         m_inbound_ip = ip;
       } else {
         Warning("Invalid IP address value '%s' in port descriptor '%s'", item, opts);
       }
-    } else if (0 != (value = this->checkPrefix(item, OPT_OUTBOUND_IP_PREFIX, OPT_OUTBOUND_IP_PREFIX_LEN))) {
+    } else if (nullptr != (value = this->checkPrefix(item, OPT_OUTBOUND_IP_PREFIX, OPT_OUTBOUND_IP_PREFIX_LEN))) {
       if (0 == ip.load(value)) {
         this->outboundIp(ip.family()) = ip;
       } else {
@@ -369,10 +369,10 @@ HttpProxyPort::processOptions(const char *opts)
 #else
       Warning("Transparent pass-through requested [%s] in port descriptor '%s' but TPROXY was not configured.", item, opts);
 #endif
-    } else if (0 != (value = this->checkPrefix(item, OPT_HOST_RES_PREFIX, OPT_HOST_RES_PREFIX_LEN))) {
+    } else if (nullptr != (value = this->checkPrefix(item, OPT_HOST_RES_PREFIX, OPT_HOST_RES_PREFIX_LEN))) {
       this->processFamilyPreference(value);
       host_res_set_p = true;
-    } else if (0 != (value = this->checkPrefix(item, OPT_PROTO_PREFIX, OPT_PROTO_PREFIX_LEN))) {
+    } else if (nullptr != (value = this->checkPrefix(item, OPT_PROTO_PREFIX, OPT_PROTO_PREFIX_LEN))) {
       this->processSessionProtocolPreference(value);
       sp_set_p = true;
     } else {
@@ -651,12 +651,13 @@ ts_session_protocol_well_known_name_indices_init()
 const char *
 RecNormalizeProtoTag(const char *tag)
 {
-  const char *retval = NULL;
   InkHashTableValue value;
+
   if (ink_hash_table_lookup(TSProtoTags, tag, &value)) {
-    retval = reinterpret_cast(value);
+    return reinterpret_cast(value);
   }
-  return retval;
+
+  return nullptr;
 }
 
 SessionProtocolNameRegistry::SessionProtocolNameRegistry() : m_n(0)
@@ -719,5 +720,5 @@ SessionProtocolNameRegistry::indexFor(const char *name) const
 const char *
 SessionProtocolNameRegistry::nameFor(int idx) const
 {
-  return 0 <= idx && idx < static_cast(m_n) ? m_names[idx] : 0;
+  return 0 <= idx && idx < static_cast(m_n) ? m_names[idx] : nullptr;
 }
diff --git a/lib/records/RecLocal.cc b/lib/records/RecLocal.cc
index b6cd5aa2603..842ad6458af 100644
--- a/lib/records/RecLocal.cc
+++ b/lib/records/RecLocal.cc
@@ -80,7 +80,7 @@ sync_thr(void *data)
 
     if (!disabled && RecSyncConfigToTB(tb, &inc_version) == REC_ERR_OKAY) {
       bool written = false;
-      Rollback *rb = NULL;
+      Rollback *rb = nullptr;
 
       if (configFiles->getRollbackObj(REC_CONFIG_FILE, &rb)) {
         if (inc_version) {
@@ -111,7 +111,7 @@ sync_thr(void *data)
     usleep(REC_REMOTE_SYNC_INTERVAL_MS * 1000);
   }
 
-  return NULL;
+  return nullptr;
 }
 
 //-------------------------------------------------------------------------
@@ -141,7 +141,7 @@ config_update_thr(void * /* data */)
 
     usleep(REC_CONFIG_UPDATE_INTERVAL_MS * 1000);
   }
-  return NULL;
+  return nullptr;
 }
 
 //-------------------------------------------------------------------------
@@ -151,7 +151,7 @@ void
 RecMessageInit()
 {
   ink_assert(g_mode_type != RECM_NULL);
-  lmgmt->registerMgmtCallback(MGMT_SIGNAL_LIBRECORDS, RecMessageRecvThis, NULL);
+  lmgmt->registerMgmtCallback(MGMT_SIGNAL_LIBRECORDS, RecMessageRecvThis, nullptr);
   message_initialized_p = true;
 }
 
@@ -179,7 +179,7 @@ RecLocalInit(Diags *_diags)
      return REC_ERR_FAIL;
      }
 
-     if (RecMessageRegisterRecvCb(recv_message_cb, NULL)) {
+     if (RecMessageRegisterRecvCb(recv_message_cb, nullptr)) {
      return REC_ERR_FAIL;
      }
    */
@@ -201,7 +201,7 @@ RecLocalInitMessage()
   }
 
   RecMessageInit();
-  if (RecMessageRegisterRecvCb(recv_message_cb, NULL)) {
+  if (RecMessageRegisterRecvCb(recv_message_cb, nullptr)) {
     return REC_ERR_FAIL;
   }
 
@@ -216,8 +216,8 @@ RecLocalInitMessage()
 int
 RecLocalStart(FileManager *configFiles)
 {
-  ink_thread_create(sync_thr, configFiles, 0, 0, NULL);
-  ink_thread_create(config_update_thr, NULL, 0, 0, NULL);
+  ink_thread_create(sync_thr, configFiles, 0, 0, nullptr);
+  ink_thread_create(config_update_thr, nullptr, 0, 0, nullptr);
   return REC_ERR_OKAY;
 }
 
diff --git a/lib/records/RecMessage.cc b/lib/records/RecMessage.cc
index 840521ef928..bcb35cf211a 100644
--- a/lib/records/RecMessage.cc
+++ b/lib/records/RecMessage.cc
@@ -32,8 +32,8 @@
 #include "P_RecCore.h"
 #include "ts/I_Layout.h"
 
-static RecMessageRecvCb g_recv_cb = NULL;
-static void *g_recv_cookie        = NULL;
+static RecMessageRecvCb g_recv_cb = nullptr;
+static void *g_recv_cookie        = nullptr;
 
 //-------------------------------------------------------------------------
 // RecMessageAlloc
@@ -165,7 +165,7 @@ RecMessageUnmarshalFirst(RecMessage *msg, RecMessageItr *itr, RecRecord **record
   itr->ele_hdr = (RecMessageEleHdr *)((char *)msg + msg->o_start);
   itr->next    = 1;
 
-  return RecMessageUnmarshalNext(msg, NULL, record);
+  return RecMessageUnmarshalNext(msg, nullptr, record);
 }
 
 //-------------------------------------------------------------------------
@@ -178,7 +178,7 @@ RecMessageUnmarshalNext(RecMessage *msg, RecMessageItr *itr, RecRecord **record)
   RecMessageEleHdr *eh;
   RecRecord *r;
 
-  if (itr == NULL) {
+  if (itr == nullptr) {
     if (msg->entries == 0) {
       return REC_ERR_FAIL;
     } else {
@@ -248,7 +248,7 @@ RecMessageRecvThis(void * /* cookie */, char *data_raw, int /* data_len */)
 {
   RecMessage *msg = (RecMessage *)data_raw;
   g_recv_cb(msg, msg->msg_type, g_recv_cookie);
-  return NULL;
+  return nullptr;
 }
 
 //-------------------------------------------------------------------------
@@ -259,7 +259,7 @@ RecMessage *
 RecMessageReadFromDisk(const char *fpath)
 {
   RecMessageHdr msg_hdr;
-  RecMessage *msg = NULL;
+  RecMessage *msg = nullptr;
   RecHandle h_file;
   int bytes_read;
 
@@ -279,7 +279,7 @@ RecMessageReadFromDisk(const char *fpath)
 
 Lerror:
   ats_free(msg);
-  msg = NULL;
+  msg = nullptr;
 
 Ldone:
   if (h_file != REC_HANDLE_INVALID) {
diff --git a/lib/records/RecMutex.cc b/lib/records/RecMutex.cc
index 94fcf1bbda1..a03a8e6b3c7 100644
--- a/lib/records/RecMutex.cc
+++ b/lib/records/RecMutex.cc
@@ -28,7 +28,7 @@ int
 rec_mutex_init(RecMutex *m, const char *name)
 {
   m->nthread_holding = 0;
-  m->thread_holding  = 0;
+  m->thread_holding  = ink_thread_null();
   return ink_mutex_init(&(m->the_mutex), name);
 }
 
@@ -36,7 +36,7 @@ int
 rec_mutex_destroy(RecMutex *m)
 {
   ink_assert(m->nthread_holding == 0);
-  ink_assert(m->thread_holding == 0);
+  ink_assert(m->thread_holding == ink_thread_null());
   return ink_mutex_destroy(&(m->the_mutex));
 }
 
@@ -60,7 +60,7 @@ rec_mutex_release(RecMutex *m)
   if (m->nthread_holding != 0) {
     m->nthread_holding--;
     if (m->nthread_holding == 0) {
-      m->thread_holding = 0;
+      m->thread_holding = ink_thread_null();
       ink_mutex_release(&(m->the_mutex));
     }
   }
diff --git a/lib/records/RecProcess.cc b/lib/records/RecProcess.cc
index 1a74fb0bdb3..55899093562 100644
--- a/lib/records/RecProcess.cc
+++ b/lib/records/RecProcess.cc
@@ -181,9 +181,9 @@ struct sync_cont : public Continuation {
 
   ~sync_cont()
   {
-    if (m_tb != NULL) {
+    if (m_tb != nullptr) {
       delete m_tb;
-      m_tb = NULL;
+      m_tb = nullptr;
     }
   }
 
@@ -230,12 +230,12 @@ RecProcessInit(RecModeT mode_type, Diags *_diags)
    return REC_ERR_FAIL;
    }
 
-   if (RecMessageRegisterRecvCb(recv_message_cb__process, NULL)) {
+   if (RecMessageRegisterRecvCb(recv_message_cb__process, nullptr)) {
    return REC_ERR_FAIL;
    }
 
    ink_cond_init(&g_force_req_cond);
-   ink_mutex_init(&g_force_req_mutex, NULL);
+   ink_mutex_init(&g_force_req_mutex, nullptr);
    if (mode_type == RECM_CLIENT) {
    send_pull_message(RECG_PULL_REQ);
    ink_cond_wait(&g_force_req_cond, &g_force_req_mutex);
@@ -252,7 +252,7 @@ void
 RecMessageInit()
 {
   ink_assert(g_mode_type != RECM_NULL);
-  pmgmt->registerMgmtCallback(MGMT_EVENT_LIBRECORDS, RecMessageRecvThis, NULL);
+  pmgmt->registerMgmtCallback(MGMT_EVENT_LIBRECORDS, RecMessageRecvThis, nullptr);
   message_initialized_p = true;
 }
 
@@ -269,7 +269,7 @@ RecProcessInitMessage(RecModeT mode_type)
   }
 
   RecMessageInit();
-  if (RecMessageRegisterRecvCb(recv_message_cb__process, NULL)) {
+  if (RecMessageRegisterRecvCb(recv_message_cb__process, nullptr)) {
     return REC_ERR_FAIL;
   }
 
diff --git a/lib/records/RecRawStats.cc b/lib/records/RecRawStats.cc
index fc36c502adf..b23703fb604 100644
--- a/lib/records/RecRawStats.cc
+++ b/lib/records/RecRawStats.cc
@@ -221,7 +221,7 @@ RecAllocateRawStatBlock(int num_stats)
 
   // allocate thread-local raw-stat memory
   if ((ethr_stat_offset = eventProcessor.allocate(num_stats * sizeof(RecRawStat))) == -1) {
-    return NULL;
+    return nullptr;
   }
 
   // create the raw-stat-block structure
@@ -258,7 +258,7 @@ _RecRegisterRawStat(RecRawStatBlock *rsb, RecT rec_type, const char *name, RecDa
   memset(&data_default, 0, sizeof(RecData));
 
   // register the record
-  if ((r = RecRegisterStat(rec_type, name, data_type, data_default, persist_type)) == NULL) {
+  if ((r = RecRegisterStat(rec_type, name, data_type, data_default, persist_type)) == nullptr) {
     err = REC_ERR_FAIL;
     goto Ldone;
   }
@@ -596,7 +596,7 @@ int
 RecRawStatUpdateSum(RecRawStatBlock *rsb, int id)
 {
   RecRawStat *raw = rsb->global[id];
-  if (NULL != raw) {
+  if (nullptr != raw) {
     RecRecord *r = reinterpret_cast(reinterpret_cast(raw) -
                                                  (reinterpret_cast(&reinterpret_cast(0)->stat_meta) -
                                                   reinterpret_cast(reinterpret_cast(0))));
diff --git a/lib/records/RecUtils.cc b/lib/records/RecUtils.cc
index 88c38f10b1b..b2807203999 100644
--- a/lib/records/RecUtils.cc
+++ b/lib/records/RecUtils.cc
@@ -34,7 +34,7 @@ void
 RecRecordInit(RecRecord *r)
 {
   ink_zero(*r);
-  rec_mutex_init(&(r->lock), NULL);
+  rec_mutex_init(&(r->lock), nullptr);
 }
 
 void
@@ -51,7 +51,7 @@ RecAlloc(RecT rec_type, const char *name, RecDataT data_type)
 {
   if (g_num_records >= REC_MAX_RECORDS) {
     Warning("too many stats/configs, please increase REC_MAX_RECORDS or rebuild with --with_max_api_stats=");
-    return NULL;
+    return nullptr;
   }
 
   int i        = ink_atomic_increment(&g_num_records, 1);
@@ -132,14 +132,14 @@ RecDataSet(RecDataT data_type, RecData *data_dst, RecData *data_src)
 
   switch (data_type) {
   case RECD_STRING:
-    if (data_src->rec_string == NULL) {
-      if (data_dst->rec_string != NULL) {
+    if (data_src->rec_string == nullptr) {
+      if (data_dst->rec_string != nullptr) {
         ats_free(data_dst->rec_string);
-        data_dst->rec_string = NULL;
+        data_dst->rec_string = nullptr;
         rec_set              = true;
       }
     } else if (((data_dst->rec_string) && (strcmp(data_dst->rec_string, data_src->rec_string) != 0)) ||
-               ((data_dst->rec_string == NULL) && (data_src->rec_string != NULL))) {
+               ((data_dst->rec_string == nullptr) && (data_src->rec_string != nullptr))) {
       if (data_dst->rec_string) {
         ats_free(data_dst->rec_string);
       }
@@ -419,8 +419,8 @@ RecDataSetFromString(RecDataT data_type, RecData *data_dst, const char *data_str
     data_src.rec_float = atof(data_string);
     break;
   case RECD_STRING:
-    if (data_string && strcmp((data_string), "NULL") == 0) {
-      data_src.rec_string = NULL;
+    if (data_string && strcmp((data_string), "nullptr") == 0) {
+      data_src.rec_string = nullptr;
     } else {
       // It's OK to cast away the const here, because RecDataSet will copy the string.
       data_src.rec_string = (char *)data_string;
diff --git a/lib/records/test_I_RecLocal.cc b/lib/records/test_I_RecLocal.cc
index 5b769c1fad8..01c4fcb0943 100644
--- a/lib/records/test_I_RecLocal.cc
+++ b/lib/records/test_I_RecLocal.cc
@@ -27,7 +27,7 @@
 
 #include "P_RecCore.h"
 
-Diags *diags = NULL;
+Diags *diags = nullptr;
 void RecDumpRecordsHt(RecT rec_type);
 
 //-------------------------------------------------------------------------
@@ -174,16 +174,16 @@ main(int argc, char **argv)
 {
   // start diags logging
   FILE *log_fp;
-  if ((log_fp = fopen("reclocal.log", "a+")) != NULL) {
-    int status = setvbuf(log_fp, NULL, _IOLBF, 512);
+  if ((log_fp = fopen("reclocal.log", "a+")) != nullptr) {
+    int status = setvbuf(log_fp, nullptr, _IOLBF, 512);
     if (status != 0) {
       fclose(log_fp);
-      log_fp = NULL;
+      log_fp = nullptr;
     }
   }
-  diags = new Diags("rec", NULL, log_fp);
+  diags = new Diags("rec", nullptr, log_fp);
   diags->activate_taglist(diags->base_debug_tags, DiagsTagType_Debug);
-  diags->log(NULL, DTA(DL_Note), "Starting '%s'", argv[0]);
+  diags->log(nullptr, DTA(DL_Note), "Starting '%s'", argv[0]);
 
   // system initialization
   RecLocalInit(diags);
diff --git a/lib/records/test_RecTree.cc b/lib/records/test_RecTree.cc
index 64d99a28f1c..e8abef33f46 100644
--- a/lib/records/test_RecTree.cc
+++ b/lib/records/test_RecTree.cc
@@ -27,7 +27,7 @@
 int
 main(int argc, char **argv)
 {
-  RecTree *new_rec_tree = new RecTree(NULL);
+  RecTree *new_rec_tree = new RecTree(nullptr);
 
   new_rec_tree->rec_tree_insert("proxy.process.librecords.first_child");
   printf("\n");
diff --git a/lib/records/test_RecordsConfig.cc b/lib/records/test_RecordsConfig.cc
index da1daa27244..a9018908801 100644
--- a/lib/records/test_RecordsConfig.cc
+++ b/lib/records/test_RecordsConfig.cc
@@ -30,21 +30,21 @@
 void
 RecordsConfigRegister()
 {
-  RecRegisterConfigString(RECT_CONFIG, "proxy.config.parse_test_2a", NULL, RECU_DYNAMIC, RECC_NULL, NULL);
-  RecRegisterConfigString(RECT_CONFIG, "proxy.config.parse_test_2b", NULL, RECU_DYNAMIC, RECC_NULL, NULL);
-  RecRegisterConfigString(RECT_CONFIG, "proxy.config.parse_test_3a", NULL, RECU_DYNAMIC, RECC_NULL, NULL);
-  RecRegisterConfigString(RECT_CONFIG, "proxy.config.parse_test_3b", NULL, RECU_DYNAMIC, RECC_NULL, NULL);
-  RecRegisterConfigString(RECT_CONFIG, "proxy.config.parse_test_4a", NULL, RECU_DYNAMIC, RECC_NULL, NULL);
-  RecRegisterConfigString(RECT_CONFIG, "proxy.config.parse_test_4b", NULL, RECU_DYNAMIC, RECC_NULL, NULL);
-
-  RecRegisterConfigString(RECT_CONFIG, "proxy.config.cb_test_1", "cb_test_1__original", RECU_DYNAMIC, RECC_NULL, NULL);
-  RecRegisterConfigString(RECT_CONFIG, "proxy.config.cb_test_2", "cb_test_2__original", RECU_DYNAMIC, RECC_NULL, NULL);
-  RecRegisterConfigString(RECT_CONFIG, "proxy.config.local.cb_test_1", "cb_test_1__original", RECU_DYNAMIC, RECC_NULL, NULL);
-  RecRegisterConfigString(RECT_CONFIG, "proxy.config.local.cb_test_2", "cb_test_2__original", RECU_DYNAMIC, RECC_NULL, NULL);
-  RecRegisterConfigString(RECT_CONFIG, "proxy.config.local.cb_test_3", "cb_test_3__original", RECU_DYNAMIC, RECC_NULL, NULL);
-  RecRegisterConfigInt(RECT_CONFIG, "proxy.config.link_test_1", 0, RECU_DYNAMIC, RECC_NULL, NULL);
-  RecRegisterConfigFloat(RECT_CONFIG, "proxy.config.link_test_2", 0.0f, RECU_DYNAMIC, RECC_NULL, NULL);
-  RecRegisterConfigCounter(RECT_CONFIG, "proxy.config.link_test_3", 0, RECU_DYNAMIC, RECC_NULL, NULL);
+  RecRegisterConfigString(RECT_CONFIG, "proxy.config.parse_test_2a", nullptr, RECU_DYNAMIC, RECC_NULL, nullptr);
+  RecRegisterConfigString(RECT_CONFIG, "proxy.config.parse_test_2b", nullptr, RECU_DYNAMIC, RECC_NULL, nullptr);
+  RecRegisterConfigString(RECT_CONFIG, "proxy.config.parse_test_3a", nullptr, RECU_DYNAMIC, RECC_NULL, nullptr);
+  RecRegisterConfigString(RECT_CONFIG, "proxy.config.parse_test_3b", nullptr, RECU_DYNAMIC, RECC_NULL, nullptr);
+  RecRegisterConfigString(RECT_CONFIG, "proxy.config.parse_test_4a", nullptr, RECU_DYNAMIC, RECC_NULL, nullptr);
+  RecRegisterConfigString(RECT_CONFIG, "proxy.config.parse_test_4b", nullptr, RECU_DYNAMIC, RECC_NULL, nullptr);
+
+  RecRegisterConfigString(RECT_CONFIG, "proxy.config.cb_test_1", "cb_test_1__original", RECU_DYNAMIC, RECC_NULL, nullptr);
+  RecRegisterConfigString(RECT_CONFIG, "proxy.config.cb_test_2", "cb_test_2__original", RECU_DYNAMIC, RECC_NULL, nullptr);
+  RecRegisterConfigString(RECT_CONFIG, "proxy.config.local.cb_test_1", "cb_test_1__original", RECU_DYNAMIC, RECC_NULL, nullptr);
+  RecRegisterConfigString(RECT_CONFIG, "proxy.config.local.cb_test_2", "cb_test_2__original", RECU_DYNAMIC, RECC_NULL, nullptr);
+  RecRegisterConfigString(RECT_CONFIG, "proxy.config.local.cb_test_3", "cb_test_3__original", RECU_DYNAMIC, RECC_NULL, nullptr);
+  RecRegisterConfigInt(RECT_CONFIG, "proxy.config.link_test_1", 0, RECU_DYNAMIC, RECC_NULL, nullptr);
+  RecRegisterConfigFloat(RECT_CONFIG, "proxy.config.link_test_2", 0.0f, RECU_DYNAMIC, RECC_NULL, nullptr);
+  RecRegisterConfigCounter(RECT_CONFIG, "proxy.config.link_test_3", 0, RECU_DYNAMIC, RECC_NULL, nullptr);
 
   // NODE
   RecRegisterStatString(RECT_NODE, "proxy.node.cb_test_1", "cb_test_1__original", RECP_NON_PERSISTENT);
diff --git a/lib/ts/Allocator.h b/lib/ts/Allocator.h
index 7df42f92aeb..30f345374c2 100644
--- a/lib/ts/Allocator.h
+++ b/lib/ts/Allocator.h
@@ -77,7 +77,7 @@ class Allocator
     ink_freelist_free_bulk(this->fl, head, tail, num_item);
   }
 
-  Allocator() { fl = NULL; }
+  Allocator() { fl = nullptr; }
   /**
     Creates a new allocator.
 
@@ -218,8 +218,8 @@ template  class TrackerClassAllocator : public ClassAllocator
     int frames = backtrace(callstack, 3);
     C *ptr     = ClassAllocator::alloc();
 
-    const void *symbol = NULL;
-    if (frames == 3 && callstack[2] != NULL) {
+    const void *symbol = nullptr;
+    if (frames == 3 && callstack[2] != nullptr) {
       symbol = callstack[2];
     }
 
@@ -238,7 +238,7 @@ template  class TrackerClassAllocator : public ClassAllocator
     ink_mutex_acquire(&trackerLock);
     std::map::iterator it = reverse_lookup.find(ptr);
     if (it != reverse_lookup.end()) {
-      tracker.increment((const void *)it->second, (int64_t)sizeof(C) * -1, NULL);
+      tracker.increment((const void *)it->second, (int64_t)sizeof(C) * -1, nullptr);
       reverse_lookup.erase(it);
     }
     ink_mutex_release(&trackerLock);
diff --git a/lib/ts/Arena.cc b/lib/ts/Arena.cc
index 31a8525eb10..8b03300b66b 100644
--- a/lib/ts/Arena.cc
+++ b/lib/ts/Arena.cc
@@ -47,7 +47,7 @@ blk_alloc(int size)
     blk = (ArenaBlock *)ats_malloc(size + sizeof(ArenaBlock) - 8);
   }
 
-  blk->next          = NULL;
+  blk->next          = nullptr;
   blk->m_heap_end    = &blk->data[size];
   blk->m_water_level = &blk->data[0];
 
@@ -88,7 +88,7 @@ block_alloc(ArenaBlock *block, size_t size, size_t alignment)
     return mem;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 void *
@@ -155,5 +155,5 @@ Arena::reset()
     blk_free(m_blocks);
     m_blocks = b;
   }
-  ink_assert(m_blocks == NULL);
+  ink_assert(m_blocks == nullptr);
 }
diff --git a/lib/ts/Arena.h b/lib/ts/Arena.h
index 1ced5a42274..cd5ad688459 100644
--- a/lib/ts/Arena.h
+++ b/lib/ts/Arena.h
@@ -38,7 +38,7 @@ struct ArenaBlock {
 class Arena
 {
 public:
-  Arena() : m_blocks(NULL) {}
+  Arena() : m_blocks(nullptr) {}
   ~Arena() { reset(); }
   inkcoreapi void *alloc(size_t size, size_t alignment = sizeof(double));
   void free(void *mem, size_t size);
diff --git a/lib/ts/BaseLogFile.cc b/lib/ts/BaseLogFile.cc
index 5993d0617ba..062eb63c35e 100644
--- a/lib/ts/BaseLogFile.cc
+++ b/lib/ts/BaseLogFile.cc
@@ -48,7 +48,7 @@ BaseLogFile::BaseLogFile(const char *name, uint64_t sig) : m_signature(sig), m_h
  * This copy constructor creates a BaseLogFile based on a given copy.
  */
 BaseLogFile::BaseLogFile(const BaseLogFile ©)
-  : m_fp(NULL),
+  : m_fp(nullptr),
     m_start_time(copy.m_start_time),
     m_end_time(0L),
     m_bytes_written(0),
@@ -58,7 +58,7 @@ BaseLogFile::BaseLogFile(const BaseLogFile ©)
     m_hostname(ats_strdup(copy.m_hostname)),
     m_is_regfile(false),
     m_is_init(copy.m_is_init),
-    m_meta_info(NULL)
+    m_meta_info(nullptr)
 {
   log_log_trace("exiting BaseLogFile copy constructor, m_name=%s, this=%p\n", m_name.get(), this);
 }
@@ -84,15 +84,15 @@ BaseLogFile::~BaseLogFile()
 void
 BaseLogFile::init(const char *name)
 {
-  m_fp            = NULL;
-  m_start_time    = time(0);
+  m_fp            = nullptr;
+  m_start_time    = time(nullptr);
   m_end_time      = 0L;
   m_bytes_written = 0;
   m_name          = ats_strdup(name);
-  m_hostname      = NULL;
+  m_hostname      = nullptr;
   m_is_regfile    = false;
   m_is_init       = false;
-  m_meta_info     = NULL;
+  m_meta_info     = nullptr;
 }
 
 /*
@@ -122,7 +122,7 @@ int
 BaseLogFile::roll(long interval_start, long interval_end)
 {
   // First, let's see if a roll is even needed.
-  if (m_name == NULL || !BaseLogFile::exists(m_name.get())) {
+  if (m_name == nullptr || !BaseLogFile::exists(m_name.get())) {
     log_log_trace("Roll not needed for %s; file doesn't exist\n", (m_name.get()) ? m_name.get() : "no_name\n");
     return 0;
   }
@@ -239,7 +239,7 @@ int
 BaseLogFile::roll()
 {
   long start;
-  time_t now = time(NULL);
+  time_t now = time(nullptr);
 
   if (!m_meta_info || !m_meta_info->get_creation_time(&start))
     start = 0L;
@@ -271,7 +271,7 @@ BaseLogFile::rolled_logfile(char *path)
 bool
 BaseLogFile::exists(const char *pathname)
 {
-  ink_assert(pathname != NULL);
+  ink_assert(pathname != nullptr);
   return (pathname && ::access(pathname, F_OK) == 0);
 }
 
@@ -288,7 +288,7 @@ BaseLogFile::open_file(int perm)
   }
 
   if (!m_name.get()) {
-    log_log_error("BaseLogFile: m_name is NULL, aborting open_file()\n");
+    log_log_error("BaseLogFile: m_name is nullptr, aborting open_file()\n");
     return LOG_FILE_COULD_NOT_OPEN_FILE;
   } else if (!strcmp(m_name.get(), "stdout")) {
     log_log_trace("BaseLogFile: stdout opened\n");
@@ -320,9 +320,9 @@ BaseLogFile::open_file(int perm)
     // The log file does not exist, so we create a new MetaInfo object
     //  which will save itself to disk right away (in the constructor)
     if (m_has_signature)
-      m_meta_info = new BaseMetaInfo(m_name.get(), (long)time(0), m_signature);
+      m_meta_info = new BaseMetaInfo(m_name.get(), (long)time(nullptr), m_signature);
     else
-      m_meta_info = new BaseMetaInfo(m_name.get(), (long)time(0));
+      m_meta_info = new BaseMetaInfo(m_name.get(), (long)time(nullptr));
   }
 
   // open actual log file (not metainfo)
@@ -363,7 +363,7 @@ BaseLogFile::close_file()
   if (is_open()) {
     fclose(m_fp);
     log_log_trace("BaseLogFile %s is closed\n", m_name.get());
-    m_fp      = NULL;
+    m_fp      = nullptr;
     m_is_init = false;
   }
 }
@@ -401,7 +401,7 @@ BaseLogFile::log_log(LogLogPriorityLevel priority, const char *format, ...)
 {
   va_list args;
 
-  const char *priority_name = NULL;
+  const char *priority_name = nullptr;
   FILE *output              = stdout;
   switch (priority) {
   case LL_Debug:
@@ -430,7 +430,7 @@ BaseLogFile::log_log(LogLogPriorityLevel priority, const char *format, ...)
   struct timeval now;
   double now_f;
 
-  gettimeofday(&now, NULL);
+  gettimeofday(&now, nullptr);
   now_f = now.tv_sec + now.tv_usec / 1000000.0f;
 
   fprintf(output, "<%.4f> [%s]: ", now_f, priority_name);
@@ -468,10 +468,10 @@ BaseMetaInfo::_build_name(const char *filename)
   _filename = (char *)ats_malloc(l + 7);
 
   if (i < 0) {
-    ink_string_concatenate_strings(_filename, ".", filename, ".meta", NULL);
+    ink_string_concatenate_strings(_filename, ".", filename, ".meta", nullptr);
   } else {
     memcpy(_filename, filename, i + 1);
-    ink_string_concatenate_strings(&_filename[i + 1], ".", &filename[i + 1], ".meta", NULL);
+    ink_string_concatenate_strings(&_filename[i + 1], ".", &filename[i + 1], ".meta", nullptr);
   }
 }
 
@@ -568,7 +568,7 @@ BaseMetaInfo::_write_to_file()
  *
  * Since the resulting buffer is passed in, this routine is thread-safe.
  * Return value is the number of characters placed into the array, not
- * including the NULL.
+ * including the nullptr.
  */
 
 int
diff --git a/lib/ts/BaseLogFile.h b/lib/ts/BaseLogFile.h
index ee866055780..9068e5a4528 100644
--- a/lib/ts/BaseLogFile.h
+++ b/lib/ts/BaseLogFile.h
@@ -186,7 +186,7 @@ class BaseLogFile
   bool
   is_open()
   {
-    return (m_fp != NULL);
+    return (m_fp != nullptr);
   }
   off_t
   get_size_bytes() const
diff --git a/lib/ts/ConsistentHash.cc b/lib/ts/ConsistentHash.cc
index d49a10c01b3..88ddeff0710 100644
--- a/lib/ts/ConsistentHash.cc
+++ b/lib/ts/ConsistentHash.cc
@@ -80,7 +80,7 @@ ATSConsistentHash::lookup(const char *url, ATSConsistentHashIter *i, bool *w, AT
   } else if (hash) {
     thash = hash;
   } else {
-    return NULL;
+    return nullptr;
   }
 
   if (w) {
@@ -117,7 +117,7 @@ ATSConsistentHash::lookup(const char *url, ATSConsistentHashIter *i, bool *w, AT
   }
 
   if (*wptr && *iter == NodeMap.end()) {
-    return NULL;
+    return nullptr;
   }
 
   return (*iter)->second;
@@ -136,7 +136,7 @@ ATSConsistentHash::lookup_available(const char *url, ATSConsistentHashIter *i, b
   } else if (hash) {
     thash = hash;
   } else {
-    return NULL;
+    return nullptr;
   }
 
   if (w) {
@@ -172,7 +172,7 @@ ATSConsistentHash::lookup_available(const char *url, ATSConsistentHashIter *i, b
       *wptr = true;
       *iter = NodeMap.begin();
     } else if (*wptr && *iter == NodeMap.end()) {
-      return NULL;
+      return nullptr;
     }
   }
 
diff --git a/lib/ts/ConsistentHash.h b/lib/ts/ConsistentHash.h
index dbfd6c3de70..c728763695b 100644
--- a/lib/ts/ConsistentHash.h
+++ b/lib/ts/ConsistentHash.h
@@ -47,12 +47,12 @@ typedef std::map::iterator ATSConsistentHashI
  */
 
 struct ATSConsistentHash {
-  ATSConsistentHash(int r = 1024, ATSHash64 *h = NULL);
-  void insert(ATSConsistentHashNode *node, float weight = 1.0, ATSHash64 *h = NULL);
-  ATSConsistentHashNode *lookup(const char *url = NULL, ATSConsistentHashIter *i = NULL, bool *w = NULL, ATSHash64 *h = NULL);
-  ATSConsistentHashNode *lookup_available(const char *url = NULL, ATSConsistentHashIter *i = NULL, bool *w = NULL,
-                                          ATSHash64 *h = NULL);
-  ATSConsistentHashNode *lookup_by_hashval(uint64_t hashval, ATSConsistentHashIter *i = NULL, bool *w = NULL);
+  ATSConsistentHash(int r = 1024, ATSHash64 *h = nullptr);
+  void insert(ATSConsistentHashNode *node, float weight = 1.0, ATSHash64 *h = nullptr);
+  ATSConsistentHashNode *lookup(const char *url = nullptr, ATSConsistentHashIter *i = NULL, bool *w = NULL, ATSHash64 *h = NULL);
+  ATSConsistentHashNode *lookup_available(const char *url = nullptr, ATSConsistentHashIter *i = NULL, bool *w = NULL,
+                                          ATSHash64 *h = nullptr);
+  ATSConsistentHashNode *lookup_by_hashval(uint64_t hashval, ATSConsistentHashIter *i = nullptr, bool *w = NULL);
   ~ATSConsistentHash();
 
 private:
diff --git a/lib/ts/ContFlags.cc b/lib/ts/ContFlags.cc
index dce7cdeef88..ef84768f4e6 100644
--- a/lib/ts/ContFlags.cc
+++ b/lib/ts/ContFlags.cc
@@ -29,7 +29,7 @@ static inkcoreapi ink_thread_key flags_data_key = init_thread_key();
 static ink_thread_key
 init_thread_key()
 {
-  ink_thread_key_create(&flags_data_key, NULL);
+  ink_thread_key_create(&flags_data_key, nullptr);
   return flags_data_key;
 }
 
diff --git a/lib/ts/Diags.cc b/lib/ts/Diags.cc
index 825ad1d348c..0d850a1b391 100644
--- a/lib/ts/Diags.cc
+++ b/lib/ts/Diags.cc
@@ -48,7 +48,7 @@ int diags_on_for_plugins          = 0;
 bool DiagsConfigState::enabled[2] = {false, false};
 
 // Global, used for all diagnostics
-inkcoreapi Diags *diags = NULL;
+inkcoreapi Diags *diags = nullptr;
 
 static bool setup_diagslog(BaseLogFile *blf);
 
@@ -92,8 +92,8 @@ vprintline(FILE *fp, char (&buffer)[Size], va_list ap)
 //      to override the records.config values.  They current come from
 //      command-line options.
 //
-//      If bdt is not NULL, and not "", it overrides records.config settings.
-//      If bat is not NULL, and not "", it overrides records.config settings.
+//      If bdt is not nullptr, and not "", it overrides records.config settings.
+//      If bat is not nullptr, and not "", it overrides records.config settings.
 //
 //      When the constructor is done, records.config callbacks will be set,
 //      the initial values read, and the Diags instance will be ready to use.
@@ -101,17 +101,17 @@ vprintline(FILE *fp, char (&buffer)[Size], va_list ap)
 //////////////////////////////////////////////////////////////////////////////
 
 Diags::Diags(const char *prefix_string, const char *bdt, const char *bat, BaseLogFile *_diags_log)
-  : diags_log(NULL),
-    stdout_log(NULL),
-    stderr_log(NULL),
+  : diags_log(nullptr),
+    stdout_log(nullptr),
+    stderr_log(nullptr),
     magic(DIAGS_MAGIC),
     show_location(SHOW_LOCATION_NONE),
-    base_debug_tags(NULL),
-    base_action_tags(NULL)
+    base_debug_tags(nullptr),
+    base_action_tags(nullptr)
 {
   int i;
 
-  cleanup_func = NULL;
+  cleanup_func = nullptr;
   ink_mutex_init(&tag_table_lock, "Diags::tag_table_lock");
 
   ////////////////////////////////////////////////////////
@@ -125,8 +125,8 @@ Diags::Diags(const char *prefix_string, const char *bdt, const char *bat, BaseLo
     base_action_tags = ats_strdup(bat);
   }
 
-  config.enabled[DiagsTagType_Debug]  = (base_debug_tags != NULL);
-  config.enabled[DiagsTagType_Action] = (base_action_tags != NULL);
+  config.enabled[DiagsTagType_Debug]  = (base_debug_tags != nullptr);
+  config.enabled[DiagsTagType_Action] = (base_action_tags != nullptr);
   diags_on_for_plugins                = config.enabled[DiagsTagType_Debug];
   prefix_str                          = prefix_string;
 
@@ -152,8 +152,8 @@ Diags::Diags(const char *prefix_string, const char *bdt, const char *bat, BaseLo
   // start off with empty tag tables, will build in reconfigure() //
   //////////////////////////////////////////////////////////////////
 
-  activated_tags[DiagsTagType_Debug]  = NULL;
-  activated_tags[DiagsTagType_Action] = NULL;
+  activated_tags[DiagsTagType_Debug]  = nullptr;
+  activated_tags[DiagsTagType_Action] = nullptr;
 
   outputlog_rolling_enabled  = RollingEnabledValues::NO_ROLLING;
   outputlog_rolling_interval = -1;
@@ -162,8 +162,8 @@ Diags::Diags(const char *prefix_string, const char *bdt, const char *bat, BaseLo
   diagslog_rolling_interval  = -1;
   diagslog_rolling_size      = -1;
 
-  outputlog_time_last_roll = time(0);
-  diagslog_time_last_roll  = time(0);
+  outputlog_time_last_roll = time(nullptr);
+  diagslog_time_last_roll  = time(nullptr);
 
   if (setup_diagslog(_diags_log)) {
     diags_log = _diags_log;
@@ -174,17 +174,17 @@ Diags::~Diags()
 {
   if (diags_log) {
     delete diags_log;
-    diags_log = NULL;
+    diags_log = nullptr;
   }
 
   if (stdout_log) {
     delete stdout_log;
-    stdout_log = NULL;
+    stdout_log = nullptr;
   }
 
   if (stderr_log) {
     delete stderr_log;
-    stderr_log = NULL;
+    stderr_log = nullptr;
   }
 
   ats_free((void *)base_debug_tags);
@@ -203,10 +203,10 @@ Diags::~Diags()
 //      in the standard format.
 //
 //      This routine takes an optional , which is printed in
-//      parentheses if its value is not NULL.  It takes a ,
+//      parentheses if its value is not nullptr.  It takes a ,
 //      which is converted to a prefix string.
 //      print_va takes an optional source location structure pointer ,
-//      which can be NULL.  If  is not NULL, the source code location
+//      which can be nullptr.  If  is not NULL, the source code location
 //      is converted to a string, and printed between angle brackets.
 //      Finally, it takes a printf format string , and a
 //      va_list list of varargs.
@@ -411,7 +411,7 @@ Diags::print_va(const char *debug_tag, DiagsLevel diags_level, const SourceLocat
 //
 //      This routine inquires if a particular  in the tag table of
 //      type  is activated, returning true if it is, false if it
-//      isn't.  If  is NULL, true is returned.  The call uses a lock
+//      isn't.  If  is nullptr, true is returned.  The call uses a lock
 //      to get atomic access to the tag tables.
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -421,7 +421,7 @@ Diags::tag_activated(const char *tag, DiagsTagType mode) const
 {
   bool activated = false;
 
-  if (tag == NULL)
+  if (tag == nullptr)
     return (true);
 
   lock();
@@ -439,7 +439,7 @@ Diags::tag_activated(const char *tag, DiagsTagType mode) const
 //      This routine adds all tags in the vertical-bar-separated taglist
 //      to the tag table of type .  Each addition is done under a lock.
 //      If an individual tag is already set, that tag is ignored.  If
-//       is NULL, this routine exits immediately.
+//       is nullptr, this routine exits immediately.
 //
 //////////////////////////////////////////////////////////////////////////////
 
@@ -473,7 +473,7 @@ Diags::deactivate_all(DiagsTagType mode)
   lock();
   if (activated_tags[mode]) {
     delete activated_tags[mode];
-    activated_tags[mode] = NULL;
+    activated_tags[mode] = nullptr;
   }
   unlock();
 }
@@ -527,9 +527,9 @@ Diags::dump(FILE *fp) const
 
   fprintf(fp, "Diags:\n");
   fprintf(fp, "  debug.enabled: %d\n", config.enabled[DiagsTagType_Debug]);
-  fprintf(fp, "  debug default tags: '%s'\n", (base_debug_tags ? base_debug_tags : "NULL"));
+  fprintf(fp, "  debug default tags: '%s'\n", (base_debug_tags ? base_debug_tags : "nullptr"));
   fprintf(fp, "  action.enabled: %d\n", config.enabled[DiagsTagType_Action]);
-  fprintf(fp, "  action default tags: '%s'\n", (base_action_tags ? base_action_tags : "NULL"));
+  fprintf(fp, "  action default tags: '%s'\n", (base_action_tags ? base_action_tags : "nullptr"));
   fprintf(fp, "  outputs:\n");
   for (i = 0; i < DiagsLevel_Count; i++) {
     fprintf(fp, "    %10s [stdout=%d, stderr=%d, syslog=%d, diagslog=%d]\n", level_name((DiagsLevel)i), config.outputs[i].to_stdout,
@@ -546,7 +546,7 @@ Diags::error_va(DiagsLevel level, const SourceLocation *loc, const char *format_
     va_copy(ap2, ap);
   }
 
-  print_va(NULL, level, loc, format_string, ap);
+  print_va(nullptr, level, loc, format_string, ap);
 
   if (DiagsLevel_IsTerminal(level)) {
     if (cleanup_func) {
@@ -567,7 +567,7 @@ Diags::error_va(DiagsLevel level, const SourceLocation *loc, const char *format_
 static bool
 setup_diagslog(BaseLogFile *blf)
 {
-  if (blf != NULL) {
+  if (blf != nullptr) {
     if (blf->open_file() != BaseLogFile::LOG_FILE_NO_ERROR) {
       log_log_error("Could not open diags log file: %s\n", strerror(errno));
       delete blf;
@@ -616,7 +616,7 @@ Diags::should_roll_diagslog()
   log_log_trace("%s: rolling_enabled = %d, output_rolling_size = %d, output_rolling_interval = %d\n", __func__,
                 diagslog_rolling_enabled, diagslog_rolling_size, diagslog_rolling_interval);
   log_log_trace("%s: RollingEnabledValues::ROLL_ON_TIME = %d\n", __func__, RollingEnabledValues::ROLL_ON_TIME);
-  log_log_trace("%s: time(0) - last_roll_time = %d\n", __func__, time(0) - diagslog_time_last_roll);
+  log_log_trace("%s: time(0) - last_roll_time = %d\n", __func__, time(nullptr) - diagslog_time_last_roll);
 
   // Roll diags_log if necessary
   if (diags_log && diags_log->is_init()) {
@@ -645,7 +645,7 @@ Diags::should_roll_diagslog()
         }
       }
     } else if (diagslog_rolling_enabled == RollingEnabledValues::ROLL_ON_TIME) {
-      time_t now = time(0);
+      time_t now = time(nullptr);
       if (diagslog_rolling_interval != -1 && (now - diagslog_time_last_roll) >= diagslog_rolling_interval) {
         fflush(diags_log->m_fp);
         if (diags_log->roll()) {
@@ -686,9 +686,9 @@ Diags::should_roll_diagslog()
 bool
 Diags::should_roll_outputlog()
 {
-  // stdout_log and stderr_log should never be NULL as this point in time
-  ink_assert(stdout_log != NULL);
-  ink_assert(stderr_log != NULL);
+  // stdout_log and stderr_log should never be nullptr as this point in time
+  ink_assert(stdout_log != nullptr);
+  ink_assert(stderr_log != nullptr);
 
   bool ret_val              = false;
   bool need_consider_stderr = true;
@@ -697,7 +697,7 @@ Diags::should_roll_outputlog()
   log_log_trace("%s: rolling_enabled = %d, output_rolling_size = %d, output_rolling_interval = %d\n", __func__,
                 outputlog_rolling_enabled, outputlog_rolling_size, outputlog_rolling_interval);
   log_log_trace("%s: RollingEnabledValues::ROLL_ON_TIME = %d\n", __func__, RollingEnabledValues::ROLL_ON_TIME);
-  log_log_trace("%s: time(0) - last_roll_time = %d\n", __func__, time(0) - outputlog_time_last_roll);
+  log_log_trace("%s: time(0) - last_roll_time = %d\n", __func__, time(nullptr) - outputlog_time_last_roll);
   log_log_trace("%s: stdout_log = %p\n", __func__, stdout_log);
 
   // Roll stdout_log if necessary
@@ -733,7 +733,7 @@ Diags::should_roll_outputlog()
         }
       }
     } else if (outputlog_rolling_enabled == RollingEnabledValues::ROLL_ON_TIME) {
-      time_t now = time(0);
+      time_t now = time(nullptr);
       if (outputlog_rolling_interval != -1 && (now - outputlog_time_last_roll) >= outputlog_rolling_interval) {
         // since usually stdout and stderr are the same file on disk, we should just
         // play it safe and just flush both BaseLogFiles
@@ -800,16 +800,16 @@ Diags::set_stdout_output(const char *stdout_path)
     log_log_error("[Warning]: stdout is currently not bound to anything\n");
     delete new_stdout_log;
     lock();
-    stdout_log = NULL;
+    stdout_log = nullptr;
     unlock();
     return false;
   }
   if (!new_stdout_log->is_open()) {
-    log_log_error("[Warning]: file pointer for stdout %s = NULL\n", stdout_path);
+    log_log_error("[Warning]: file pointer for stdout %s = nullptr\n", stdout_path);
     log_log_error("[Warning]: stdout is currently not bound to anything\n");
     delete new_stdout_log;
     lock();
-    stdout_log = NULL;
+    stdout_log = nullptr;
     unlock();
     return false;
   }
@@ -850,16 +850,16 @@ Diags::set_stderr_output(const char *stderr_path)
     log_log_error("[Warning]: stderr is currently not bound to anything\n");
     delete new_stderr_log;
     lock();
-    stderr_log = NULL;
+    stderr_log = nullptr;
     unlock();
     return false;
   }
   if (!new_stderr_log->is_open()) {
-    log_log_error("[Warning]: file pointer for stderr %s = NULL\n", stderr_path);
+    log_log_error("[Warning]: file pointer for stderr %s = nullptr\n", stderr_path);
     log_log_error("[Warning]: stderr is currently not bound to anything\n");
     delete new_stderr_log;
     lock();
-    stderr_log = NULL;
+    stderr_log = nullptr;
     unlock();
     return false;
   }
diff --git a/lib/ts/Diags.h b/lib/ts/Diags.h
index ddfba84fcc1..e9f72d5220c 100644
--- a/lib/ts/Diags.h
+++ b/lib/ts/Diags.h
@@ -265,7 +265,7 @@ class Diags
 
 #if !defined(__GNUC__)
 #ifndef __FUNCTION__
-#define __FUNCTION__ NULL
+#define __FUNCTION__ nullptr
 #endif
 #endif
 
diff --git a/lib/ts/DynArray.h b/lib/ts/DynArray.h
index d991d5c2a64..449a2880996 100644
--- a/lib/ts/DynArray.h
+++ b/lib/ts/DynArray.h
@@ -53,7 +53,7 @@ template  class DynArray
 };
 
 template 
-inline DynArray::DynArray(const T *val, intptr_t initial_size) : data(NULL), default_val(val), size(0), pos(-1)
+inline DynArray::DynArray(const T *val, intptr_t initial_size) : data(nullptr), default_val(val), size(0), pos(-1)
 {
   if (initial_size > 0) {
     int i = 1;
@@ -123,7 +123,7 @@ DynArray::detach()
   T *d;
 
   d    = data;
-  data = NULL;
+  data = nullptr;
 
   return d;
 }
@@ -148,7 +148,7 @@ DynArray::clear()
 {
   if (data) {
     delete[] data;
-    data = NULL;
+    data = nullptr;
   }
 
   size = 0;
diff --git a/lib/ts/EventNotify.cc b/lib/ts/EventNotify.cc
index 1ba666a041b..df034dd9567 100644
--- a/lib/ts/EventNotify.cc
+++ b/lib/ts/EventNotify.cc
@@ -56,7 +56,7 @@ EventNotify::EventNotify()
   ink_release_assert(ret != -1);
 #else
   ink_cond_init(&m_cond);
-  ink_mutex_init(&m_mutex, NULL);
+  ink_mutex_init(&m_mutex, nullptr);
 #endif
 }
 
diff --git a/lib/ts/HashMD5.cc b/lib/ts/HashMD5.cc
index f3698d9f6ef..7abba0b8561 100644
--- a/lib/ts/HashMD5.cc
+++ b/lib/ts/HashMD5.cc
@@ -25,7 +25,7 @@
 ATSHashMD5::ATSHashMD5(void) : md_len(0), finalized(false)
 {
   ctx     = EVP_MD_CTX_create();
-  int ret = EVP_DigestInit_ex(ctx, EVP_md5(), NULL);
+  int ret = EVP_DigestInit_ex(ctx, EVP_md5(), nullptr);
   ink_assert(ret == 1);
 }
 
@@ -54,7 +54,7 @@ ATSHashMD5::get(void) const
   if (finalized) {
     return (void *)md_value;
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 
@@ -69,7 +69,7 @@ ATSHashMD5::clear(void)
 {
   int ret = EVP_MD_CTX_cleanup(ctx);
   ink_assert(ret == 1);
-  ret = EVP_DigestInit_ex(ctx, EVP_md5(), NULL);
+  ret = EVP_DigestInit_ex(ctx, EVP_md5(), nullptr);
   ink_assert(ret == 1);
   md_len    = 0;
   finalized = false;
diff --git a/lib/ts/HostLookup.cc b/lib/ts/HostLookup.cc
index 0ef3a9cb973..08e6d029030 100644
--- a/lib/ts/HostLookup.cc
+++ b/lib/ts/HostLookup.cc
@@ -44,8 +44,8 @@
 bool
 domaincmp(const char *hostname, const char *domain)
 {
-  ink_assert(hostname != NULL);
-  ink_assert(domain != NULL);
+  ink_assert(hostname != nullptr);
+  ink_assert(domain != nullptr);
 
   const char *host_cur   = hostname + strlen(hostname);
   const char *domain_cur = domain + strlen(domain);
@@ -135,8 +135,8 @@ domaincmp(const char *hostname, const char *domain)
 int
 hostcmp(const char *c1, const char *c2)
 {
-  ink_assert(c1 != NULL);
-  ink_assert(c2 != NULL);
+  ink_assert(c1 != nullptr);
+  ink_assert(c2 != nullptr);
   do {
     if (tolower(*c1) < tolower(*c2)) {
       if (*c1 == '\0' && *c2 == '.' && *(c2 + 1) == '\0') {
@@ -225,7 +225,7 @@ charIndex_el::~charIndex_el()
   // Recursively delete all the lower levels of the
   //   data structure
   for (i = 0; i < numLegalChars; i++) {
-    if (next_level[i] != NULL) {
+    if (next_level[i] != nullptr) {
       delete next_level[i];
     }
   }
@@ -244,7 +244,7 @@ struct charIndexIterInternal {
 
 // Used as a default return element for DynArray in
 //   struct charIndexIterState
-static charIndexIterInternal default_iter = {NULL, -1};
+static charIndexIterInternal default_iter = {nullptr, -1};
 
 // struct charIndexIterState
 //
@@ -265,7 +265,7 @@ struct charIndexIterState {
   DynArray q;
 };
 
-charIndexIterState::charIndexIterState() : cur_level(-1), cur_index(-1), cur_el(NULL), q(&default_iter, 6)
+charIndexIterState::charIndexIterState() : cur_level(-1), cur_index(-1), cur_el(nullptr), q(&default_iter, 6)
 {
 }
 
@@ -320,7 +320,7 @@ class charIndex
   InkHashTable *illegalKey;
 };
 
-charIndex::charIndex() : illegalKey(NULL)
+charIndex::charIndex() : illegalKey(nullptr)
 {
   root = new charIndex_el;
 }
@@ -328,19 +328,19 @@ charIndex::charIndex() : illegalKey(NULL)
 charIndex::~charIndex()
 {
   InkHashTableIteratorState ht_iter;
-  InkHashTableEntry *ht_entry = NULL;
+  InkHashTableEntry *ht_entry = nullptr;
   HostBranch *tmp;
 
   delete root;
 
   // Destroy the illegalKey hashtable if there is one and free
   //   up all of its values
-  if (illegalKey != NULL) {
+  if (illegalKey != nullptr) {
     ht_entry = ink_hash_table_iterator_first(illegalKey, &ht_iter);
 
-    while (ht_entry != NULL) {
+    while (ht_entry != nullptr) {
       tmp = (HostBranch *)ink_hash_table_entry_value(illegalKey, ht_entry);
-      ink_assert(tmp != NULL);
+      ink_assert(tmp != nullptr);
       delete tmp;
       ht_entry = ink_hash_table_iterator_next(illegalKey, &ht_iter);
     }
@@ -373,7 +373,7 @@ charIndex::Insert(const char *match_data, HostBranch *toInsert)
     //  'illegal' DNS character
     if (index == 255) {
       // Insert into illgals hash table
-      if (illegalKey == NULL) {
+      if (illegalKey == nullptr) {
         illegalKey = ink_hash_table_create(InkHashTableKeyType_String);
       }
       ink_hash_table_insert(illegalKey, (char *)match_start, toInsert);
@@ -384,7 +384,7 @@ charIndex::Insert(const char *match_data, HostBranch *toInsert)
     if (*(match_data + 1) == '\0') {
       // The slot should always be emtpy, no duplicate
       //   keys are allowed
-      ink_assert(cur->branch_array[index] == NULL);
+      ink_assert(cur->branch_array[index] == nullptr);
       cur->branch_array[index] = toInsert;
       break;
     } else {
@@ -393,7 +393,7 @@ charIndex::Insert(const char *match_data, HostBranch *toInsert)
       next = cur->next_level[index];
 
       // Check to see if we need to expand the table
-      if (next == NULL) {
+      if (next == nullptr) {
         next                   = new charIndex_el;
         cur->next_level[index] = next;
       }
@@ -407,7 +407,7 @@ charIndex::Insert(const char *match_data, HostBranch *toInsert)
 //
 //  Searches the charIndex on key match_data
 //    If there is a binding for match_data, returns a pointer to it
-//    otherwise a NULL pointer is returned
+//    otherwise a nullptr pointer is returned
 //
 HostBranch *
 charIndex::Lookup(const char *match_data)
@@ -417,8 +417,8 @@ charIndex::Lookup(const char *match_data)
   void *hash_lookup;
   const char *match_start = match_data;
 
-  if (root == NULL || *match_data == '\0') {
-    return NULL;
+  if (root == nullptr || *match_data == '\0') {
+    return nullptr;
   }
 
   while (1) {
@@ -427,13 +427,13 @@ charIndex::Lookup(const char *match_data)
     // Check to see if our index into table is for an
     //  'illegal' DNS character
     if (index == 255) {
-      if (illegalKey == NULL) {
-        return NULL;
+      if (illegalKey == nullptr) {
+        return nullptr;
       } else {
         if (ink_hash_table_lookup(illegalKey, (char *)match_start, &hash_lookup)) {
           return (HostBranch *)hash_lookup;
         } else {
-          return NULL;
+          return nullptr;
         }
       }
     }
@@ -444,8 +444,8 @@ charIndex::Lookup(const char *match_data)
     } else {
       cur = cur->next_level[index];
 
-      if (cur == NULL) {
-        return NULL;
+      if (cur == nullptr) {
+        return nullptr;
       }
     }
 
@@ -457,7 +457,7 @@ charIndex::Lookup(const char *match_data)
 // HostBranch* charIndex::iter_next(charIndexIterState* s)
 //
 //    Initialize iterator state and returns the first element
-//     found in the charTable.  If none is found, NULL
+//     found in the charTable.  If none is found, nullptr
 //     is returned
 //
 HostBranch *
@@ -474,7 +474,7 @@ charIndex::iter_first(charIndexIterState *s)
 // HostBranch* charIndex::iter_next(charIndexIterState* s)
 //
 //    Finds the next element in the char index and returns
-//      a pointer to it.  If there are no more elements, NULL
+//      a pointer to it.  If there are no more elements, nullptr
 //      is returned
 //
 HostBranch *
@@ -484,7 +484,7 @@ charIndex::iter_next(charIndexIterState *s)
   charIndex_el *current_el = s->cur_el;
   intptr_t level           = s->cur_level;
   charIndexIterInternal stored_state;
-  HostBranch *r = NULL;
+  HostBranch *r = nullptr;
   bool first_element;
 
   // bool first_element is used to tell if first elemente
@@ -507,7 +507,7 @@ charIndex::iter_next(charIndexIterState *s)
       } else {
         // Go back up to a stored level
         stored_state = s->q[level - 1];
-        ink_assert(stored_state.ptr != NULL);
+        ink_assert(stored_state.ptr != nullptr);
         ink_assert(stored_state.index >= 0);
         level--;
         current_el = stored_state.ptr;
@@ -520,13 +520,13 @@ charIndex::iter_next(charIndexIterState *s)
       //    a level so that when we come back up we will
       //    be done with this index
       //
-      if (current_el->branch_array[index] != NULL && first_element == false) {
+      if (current_el->branch_array[index] != nullptr && first_element == false) {
         r            = current_el->branch_array[index];
         s->cur_level = level;
         s->cur_index = index;
         s->cur_el    = current_el;
         break;
-      } else if (current_el->next_level[index] != NULL) {
+      } else if (current_el->next_level[index] != nullptr) {
         // There is a lower level to iterate over, store our
         //   current state and descend
         stored_state.ptr   = current_el;
@@ -563,8 +563,8 @@ class hostArray
   ~hostArray();
   bool Insert(const char *match_data_in, HostBranch *toInsert);
   HostBranch *Lookup(const char *match_data_in, bool bNotProcess);
-  HostBranch *iter_first(hostArrayIterState *s, char **key = NULL);
-  HostBranch *iter_next(hostArrayIterState *s, char **key = NULL);
+  HostBranch *iter_first(hostArrayIterState *s, char **key = nullptr);
+  HostBranch *iter_next(hostArrayIterState *s, char **key = nullptr);
 
 private:
   int num_el; // number of elements currently in the array
@@ -581,8 +581,8 @@ hostArray::hostArray() : num_el(0)
 hostArray::~hostArray()
 {
   for (int i = 0; i < num_el; i++) {
-    ink_assert(branch_array[i] != NULL);
-    ink_assert(match_data[i] != NULL);
+    ink_assert(branch_array[i] != nullptr);
+    ink_assert(match_data[i] != nullptr);
     ats_free(match_data[i]);
   }
 }
@@ -610,12 +610,12 @@ hostArray::Insert(const char *match_data_in, HostBranch *toInsert)
 //
 //   Looks for key match_data_in.  If a binding is found,
 //     returns HostBranch* found to the key, otherwise
-//     NULL is returned
+//     nullptr is returned
 //
 HostBranch *
 hostArray::Lookup(const char *match_data_in, bool bNotProcess)
 {
-  HostBranch *r = NULL;
+  HostBranch *r = nullptr;
   char *pMD;
 
   for (int i = 0; i < num_el; i++) {
@@ -644,7 +644,7 @@ hostArray::Lookup(const char *match_data_in, bool bNotProcess)
 // HostBranch* hostArray::iter_first(hostArrayIterState* s) {
 //
 //   Initilizes s and returns the first element or
-//     NULL if no elements exist
+//     nullptr if no elements exist
 //
 HostBranch *
 hostArray::iter_first(hostArrayIterState *s, char **key)
@@ -656,7 +656,7 @@ hostArray::iter_first(hostArrayIterState *s, char **key)
 // HostBranch* hostArray::iter_next(hostArrayIterState* s) {
 //
 //    Returns the next element in the hostArray or
-//      NULL if none exist
+//      nullptr if none exist
 //
 HostBranch *
 hostArray::iter_next(hostArrayIterState *s, char **key)
@@ -664,12 +664,12 @@ hostArray::iter_next(hostArrayIterState *s, char **key)
   (*s)++;
 
   if (*s < num_el) {
-    if (key != NULL) {
+    if (key != nullptr) {
       *key = match_data[*s];
     }
     return branch_array[*s];
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 
@@ -678,7 +678,7 @@ const char *LeafTypeStr[] = {"Leaf Invalid", "Host (Partial)", "Host (Full)", "D
 
 static int negative_one = -1;
 
-HostBranch::HostBranch() : level(0), type(HOST_TERMINAL), next_level(NULL), leaf_indexs(&negative_one, 1)
+HostBranch::HostBranch() : level(0), type(HOST_TERMINAL), next_level(nullptr), leaf_indexs(&negative_one, 1)
 {
 }
 
@@ -691,7 +691,7 @@ HostBranch::~HostBranch()
   // Hash Iteration
   InkHashTable *ht;
   InkHashTableIteratorState ht_iter;
-  InkHashTableEntry *ht_entry = NULL;
+  InkHashTableEntry *ht_entry = nullptr;
 
   // charIndex Iteration
   charIndexIterState ci_iter;
@@ -705,14 +705,14 @@ HostBranch::~HostBranch()
 
   switch (type) {
   case HOST_TERMINAL:
-    ink_assert(next_level == NULL);
+    ink_assert(next_level == nullptr);
     break;
   case HOST_HASH:
-    ink_assert(next_level != NULL);
+    ink_assert(next_level != nullptr);
     ht       = (InkHashTable *)next_level;
     ht_entry = ink_hash_table_iterator_first(ht, &ht_iter);
 
-    while (ht_entry != NULL) {
+    while (ht_entry != nullptr) {
       lower_branch = (HostBranch *)ink_hash_table_entry_value(ht, ht_entry);
       delete lower_branch;
       ht_entry = ink_hash_table_iterator_next(ht, &ht_iter);
@@ -720,20 +720,20 @@ HostBranch::~HostBranch()
     ink_hash_table_destroy(ht);
     break;
   case HOST_INDEX:
-    ink_assert(next_level != NULL);
+    ink_assert(next_level != nullptr);
     ci           = (charIndex *)next_level;
     lower_branch = ci->iter_first(&ci_iter);
-    while (lower_branch != NULL) {
+    while (lower_branch != nullptr) {
       delete lower_branch;
       lower_branch = ci->iter_next(&ci_iter);
     }
     delete ci;
     break;
   case HOST_ARRAY:
-    ink_assert(next_level != NULL);
+    ink_assert(next_level != nullptr);
     ha           = (hostArray *)next_level;
     lower_branch = ha->iter_first(&ha_iter);
-    while (lower_branch != NULL) {
+    while (lower_branch != nullptr) {
       delete lower_branch;
       lower_branch = ha->iter_next(&ha_iter);
     }
@@ -742,17 +742,17 @@ HostBranch::~HostBranch()
   }
 }
 
-HostLookup::HostLookup(const char *name) : leaf_array(NULL), array_len(-1), num_el(-1), matcher_name(name)
+HostLookup::HostLookup(const char *name) : leaf_array(nullptr), array_len(-1), num_el(-1), matcher_name(name)
 {
   root             = new HostBranch;
   root->level      = 0;
   root->type       = HOST_TERMINAL;
-  root->next_level = NULL;
+  root->next_level = nullptr;
 }
 
 HostLookup::~HostLookup()
 {
-  if (leaf_array != NULL) {
+  if (leaf_array != nullptr) {
     // Free up the match strings
     for (int i = 0; i < num_el; i++) {
       ats_free(leaf_array[i].match);
@@ -792,7 +792,7 @@ HostLookup::PrintHostBranch(HostBranch *hb, HostLookupPrintFunc f)
   // Hash iteration
   InkHashTable *ht;
   InkHashTableIteratorState ht_iter;
-  InkHashTableEntry *ht_entry = NULL;
+  InkHashTableEntry *ht_entry = nullptr;
 
   // charIndex Iteration
   charIndexIterState ci_iter;
@@ -814,33 +814,33 @@ HostLookup::PrintHostBranch(HostBranch *hb, HostLookupPrintFunc f)
 
   switch (hb->type) {
   case HOST_TERMINAL:
-    ink_assert(hb->next_level == NULL);
+    ink_assert(hb->next_level == nullptr);
     break;
   case HOST_HASH:
-    ink_assert(hb->next_level != NULL);
+    ink_assert(hb->next_level != nullptr);
     ht       = (InkHashTable *)hb->next_level;
     ht_entry = ink_hash_table_iterator_first(ht, &ht_iter);
 
-    while (ht_entry != NULL) {
+    while (ht_entry != nullptr) {
       lower_branch = (HostBranch *)ink_hash_table_entry_value(ht, ht_entry);
       PrintHostBranch(lower_branch, f);
       ht_entry = ink_hash_table_iterator_next(ht, &ht_iter);
     }
     break;
   case HOST_INDEX:
-    ink_assert(hb->next_level != NULL);
+    ink_assert(hb->next_level != nullptr);
     ci           = (charIndex *)hb->next_level;
     lower_branch = ci->iter_first(&ci_iter);
-    while (lower_branch != NULL) {
+    while (lower_branch != nullptr) {
       PrintHostBranch(lower_branch, f);
       lower_branch = ci->iter_next(&ci_iter);
     }
     break;
   case HOST_ARRAY:
-    ink_assert(hb->next_level != NULL);
+    ink_assert(hb->next_level != nullptr);
     h_array      = (hostArray *)hb->next_level;
     lower_branch = h_array->iter_first(&ha_iter);
-    while (lower_branch != NULL) {
+    while (lower_branch != nullptr) {
       PrintHostBranch(lower_branch, f);
       lower_branch = h_array->iter_next(&ha_iter);
     }
@@ -896,13 +896,13 @@ HostLookup::InsertBranch(HostBranch *insert_in, const char *level_data)
   hostArray *ha;
   hostArrayIterState ha_iter;
   HostBranch *tmp;
-  char *key = NULL;
+  char *key = nullptr;
   InkHashTable *new_ht;
 
   HostBranch *new_branch = new HostBranch;
   new_branch->type       = HOST_TERMINAL;
   new_branch->level      = insert_in->level + 1;
-  new_branch->next_level = NULL;
+  new_branch->next_level = nullptr;
 
   switch (insert_in->type) {
   case HOST_TERMINAL:
@@ -925,9 +925,9 @@ HostLookup::InsertBranch(HostBranch *insert_in, const char *level_data)
       // Iterate through the existing elements in the array and
       //  stuff them into the hash table
       tmp = ha->iter_first(&ha_iter, &key);
-      ink_assert(tmp != NULL);
-      while (tmp != NULL) {
-        ink_assert(key != NULL);
+      ink_assert(tmp != nullptr);
+      while (tmp != nullptr) {
+        ink_assert(key != nullptr);
         ink_hash_table_insert(new_ht, key, tmp);
         tmp = ha->iter_next(&ha_iter, &key);
       }
@@ -949,12 +949,12 @@ HostLookup::InsertBranch(HostBranch *insert_in, const char *level_data)
 //   Searches in the branch for  the next level down in the search
 //     structure bound to level data
 //   If found returns a pointer to the next level HostBranch,
-//    otherwise returns NULL
+//    otherwise returns nullptr
 //
 HostBranch *
 HostLookup::FindNextLevel(HostBranch *from, const char *level_data, bool bNotProcess)
 {
-  HostBranch *r = NULL;
+  HostBranch *r = nullptr;
   InkHashTable *hash;
   charIndex *ci_table;
   hostArray *ha_table;
@@ -964,24 +964,24 @@ HostLookup::FindNextLevel(HostBranch *from, const char *level_data, bool bNotPro
   case HOST_TERMINAL:
     // Should not happen
     ink_assert(0);
-    return NULL;
+    return nullptr;
   case HOST_HASH:
     hash = (InkHashTable *)from->next_level;
-    ink_assert(hash != NULL);
+    ink_assert(hash != nullptr);
     if (ink_hash_table_lookup(hash, (char *)level_data, &lookup)) {
       r = (HostBranch *)lookup;
     } else {
-      r = NULL;
+      r = nullptr;
     }
     break;
   case HOST_INDEX:
     ci_table = (charIndex *)from->next_level;
-    ink_assert(ci_table != NULL);
+    ink_assert(ci_table != nullptr);
     r = ci_table->Lookup(level_data);
     break;
   case HOST_ARRAY:
     ha_table = (hostArray *)from->next_level;
-    ink_assert(ha_table != NULL);
+    ink_assert(ha_table != nullptr);
     r = ha_table->Lookup(level_data, bNotProcess);
     break;
   }
@@ -1018,11 +1018,11 @@ HostLookup::TableInsert(const char *match_data, int index, bool domain_record)
       break;
     }
 
-    if (cur->next_level == NULL) {
+    if (cur->next_level == nullptr) {
       cur = TableNewLevel(cur, match_tok[numTok - i - 1]);
     } else {
       next = FindNextLevel(cur, match_tok[numTok - i - 1]);
-      if (next == NULL) {
+      if (next == nullptr) {
         cur = InsertBranch(cur, match_tok[numTok - i - 1]);
       } else {
         cur = next;
@@ -1133,7 +1133,7 @@ HostLookup::MatchArray(HostLookupState *s, void **opaque_ptr, DynArray &arr
 bool
 HostLookup::MatchFirst(const char *host, HostLookupState *s, void **opaque_ptr)
 {
-  char *last_dot = NULL;
+  char *last_dot = nullptr;
 
   s->cur         = root;
   s->table_level = 0;
@@ -1151,7 +1151,7 @@ HostLookup::MatchFirst(const char *host, HostLookupState *s, void **opaque_ptr)
     s->host_copy_next++;
   }
 
-  if (last_dot == NULL) {
+  if (last_dot == nullptr) {
     // Must be an unqualified hostname, no dots
     s->host_copy_next = s->host_copy;
   } else {
@@ -1177,11 +1177,11 @@ HostLookup::MatchNext(HostLookupState *s, void **opaque_ptr)
   }
 
   while (s->table_level <= HOST_TABLE_DEPTH) {
-    if (MatchArray(s, opaque_ptr, cur->leaf_indexs, (s->host_copy_next == NULL))) {
+    if (MatchArray(s, opaque_ptr, cur->leaf_indexs, (s->host_copy_next == nullptr))) {
       return true;
     }
     // Check to see if we run out of tokens in the hostname
-    if (s->host_copy_next == NULL) {
+    if (s->host_copy_next == nullptr) {
       break;
     }
     // Check to see if there are any lower levels
@@ -1191,7 +1191,7 @@ HostLookup::MatchNext(HostLookupState *s, void **opaque_ptr)
 
     cur = FindNextLevel(cur, s->host_copy_next, true);
 
-    if (cur == NULL) {
+    if (cur == nullptr) {
       break;
     } else {
       s->cur         = cur;
@@ -1201,7 +1201,7 @@ HostLookup::MatchNext(HostLookupState *s, void **opaque_ptr)
       // Find the next part of the hostname to process
       if (s->host_copy_next <= s->host_copy) {
         // Nothing left
-        s->host_copy_next = NULL;
+        s->host_copy_next = nullptr;
       } else {
         // Back up to period ahead of us and axe it
         s->host_copy_next--;
diff --git a/lib/ts/HostLookup.h b/lib/ts/HostLookup.h
index 9cbb4ff207d..f987eb6ea73 100644
--- a/lib/ts/HostLookup.h
+++ b/lib/ts/HostLookup.h
@@ -83,7 +83,7 @@ typedef void (*HostLookupPrintFunc)(void *opaque_data);
 //
 
 struct HostLookupState {
-  HostLookupState() : cur(NULL), table_level(0), array_index(0), hostname(NULL), host_copy(NULL), host_copy_next(NULL) {}
+  HostLookupState() : cur(nullptr), table_level(0), array_index(0), hostname(NULL), host_copy(NULL), host_copy_next(NULL) {}
   ~HostLookupState() { ats_free(host_copy); }
   HostBranch *cur;
   int table_level;
diff --git a/lib/ts/IntrusiveDList.h b/lib/ts/IntrusiveDList.h
index a6eb5db46e6..98a29f81e33 100644
--- a/lib/ts/IntrusiveDList.h
+++ b/lib/ts/IntrusiveDList.h
@@ -233,7 +233,7 @@ class IntrusiveDList
     return *this;
   }
   /// Remove the first element of the list.
-  /// @return A poiner to the removed item, or @c NULL if the list was empty.
+  /// @return A poiner to the removed item, or @c nullptr if the list was empty.
   T *
   takeHead()
   {
@@ -252,7 +252,7 @@ class IntrusiveDList
     return zret;
   }
   /// Remove the last element of the list.
-  /// @return A poiner to the removed item, or @c NULL if the list was empty.
+  /// @return A poiner to the removed item, or @c nullptr if the list was empty.
   T *
   takeTail()
   {
diff --git a/lib/ts/IpMap.cc b/lib/ts/IpMap.cc
index d54b0640b1c..da2b73b56c9 100644
--- a/lib/ts/IpMap.cc
+++ b/lib/ts/IpMap.cc
@@ -138,15 +138,15 @@ namespace detail
     typedef typename N::ArgType ArgType; ///< Import type.
     typedef typename N::Metric Metric;   ///< Import type.g482
 
-    IpMapBase() : _root(0) {}
+    IpMapBase() : _root(nullptr) {}
     ~IpMapBase() { this->clear(); }
     /** Mark a range.
         All addresses in the range [ @a min , @a max ] are marked with @a data.
         @return This object.
     */
-    self &mark(ArgType min,   ///< Minimum value in range.
-               ArgType max,   ///< Maximum value in range.
-               void *data = 0 ///< Client data payload.
+    self &mark(ArgType min,         ///< Minimum value in range.
+               ArgType max,         ///< Maximum value in range.
+               void *data = nullptr ///< Client data payload.
                );
     /** Unmark addresses.
 
@@ -167,16 +167,16 @@ namespace detail
 
         @return This object.
     */
-    self &fill(ArgType min, ArgType max, void *data = 0);
+    self &fill(ArgType min, ArgType max, void *data = nullptr);
 
     /** Test for membership.
 
         @return @c true if the address is in the map, @c false if not.
-        If the address is in the map and @a ptr is not @c NULL, @c *ptr
+        If the address is in the map and @a ptr is not @c nullptr, @c *ptr
         is set to the client data for the address.
     */
-    bool contains(ArgType target, ///< Search target value.
-                  void **ptr = 0  ///< Client data return.
+    bool contains(ArgType target,      ///< Search target value.
+                  void **ptr = nullptr ///< Client data return.
                   ) const;
 
     /** Remove all addresses in the map.
@@ -189,7 +189,7 @@ namespace detail
     self &clear();
 
     /** Lower bound for @a target.  @return The node whose minimum value
-        is the largest that is not greater than @a target, or @c NULL if
+        is the largest that is not greater than @a target, or @c nullptr if
         all minimum values are larger than @a target.
     */
     N *lowerBound(ArgType target);
@@ -279,8 +279,8 @@ namespace detail
   N *
   IpMapBase::lowerBound(ArgType target)
   {
-    N *n    = _root; // current node to test.
-    N *zret = 0;     // best node so far.
+    N *n    = _root;   // current node to test.
+    N *zret = nullptr; // best node so far.
     while (n) {
       if (target < n->_min)
         n = left(n);
@@ -307,7 +307,7 @@ namespace detail
       delete x;
     }
     _list.clear();
-    _root = 0;
+    _root = nullptr;
     return *this;
   }
 
@@ -317,7 +317,7 @@ namespace detail
   {
     // Rightmost node of interest with n->_min <= min.
     N *n = this->lowerBound(rmin);
-    N *x = 0; // New node (if any).
+    N *x = nullptr; // New node (if any).
     // Need copies because we will modify these.
     Metric min = N::deref(rmin);
     Metric max = N::deref(rmax);
@@ -398,7 +398,7 @@ namespace detail
             return *this;
           } else { // n is contained in range, skip over it.
             x->setMaxMinusOne(n->_min);
-            x   = 0;
+            x   = nullptr;
             min = n->_max;
             N::inc(min); // OK because n->_max maximal => next is null.
             n = next(n);
@@ -436,8 +436,8 @@ namespace detail
   IpMapBase::mark(ArgType min, ArgType max, void *payload)
   {
     N *n = this->lowerBound(min); // current node.
-    N *x = 0;                     // New node, gets set if we re-use an existing one.
-    N *y = 0;                     // Temporary for removing and advancing.
+    N *x = nullptr;               // New node, gets set if we re-use an existing one.
+    N *y = nullptr;               // Temporary for removing and advancing.
 
     // Several places it is handy to have max+1. Must be careful
     // about wrapping.
@@ -523,7 +523,7 @@ namespace detail
         else
           this->append(x); // note that since n == 0 we'll just return.
       }
-    } else if (0 != (n = this->getHead()) &&           // at least one node in tree.
+    } else if (nullptr != (n = this->getHead()) &&     // at least one node in tree.
                n->_data == payload &&                  // payload matches
                (n->_max <= max || n->_min <= max_plus) // overlap or adj.
                ) {
@@ -1179,7 +1179,7 @@ IpMap::clear()
 IpMap::iterator
 IpMap::begin() const
 {
-  Node *x = 0;
+  Node *x = nullptr;
   if (_m4)
     x = _m4->getHead();
   if (!x && _m6)
diff --git a/lib/ts/IpMap.h b/lib/ts/IpMap.h
index eb5f8e7e219..d3500d60ee0 100644
--- a/lib/ts/IpMap.h
+++ b/lib/ts/IpMap.h
@@ -279,7 +279,7 @@ class IpMap
   /** Test for membership.
 
       @return @c true if the address is in the map, @c false if not.
-      If the address is in the map and @a ptr is not @c NULL, @c *ptr
+      If the address is in the map and @a ptr is not @c nullptr, @c *ptr
       is set to the client data for the address.
   */
   bool contains(sockaddr const *target, ///< Search target (network order).
@@ -291,7 +291,7 @@ class IpMap
       @note Covenience overload for IPv4.
 
       @return @c true if the address is in the map, @c false if not.
-      If the address is in the map and @a ptr is not @c NULL, @c *ptr
+      If the address is in the map and @a ptr is not @c nullptr, @c *ptr
       is set to the client data for the address.
   */
   bool contains(in_addr_t target, ///< Search target (network order).
@@ -303,7 +303,7 @@ class IpMap
       @note Convenience overload for @c IpEndpoint.
 
       @return @c true if the address is in the map, @c false if not.
-      If the address is in the map and @a ptr is not @c NULL, @c *ptr
+      If the address is in the map and @a ptr is not @c nullptr, @c *ptr
       is set to the client data for the address.
   */
   bool contains(IpEndpoint const *target, ///< Search target (network order).
@@ -315,7 +315,7 @@ class IpMap
       @note Convenience overload for @c IpAddr.
 
       @return @c true if the address is in the map, @c false if not.
-      If the address is in the map and @a ptr is not @c NULL, @c *ptr
+      If the address is in the map and @a ptr is not @c nullptr, @c *ptr
       is set to the client data for the address.
   */
   bool contains(IpAddr const &target, ///< Search target (network order).
diff --git a/lib/ts/IpMapConf.cc b/lib/ts/IpMapConf.cc
index e1294b58d84..09ac55eb094 100644
--- a/lib/ts/IpMapConf.cc
+++ b/lib/ts/IpMapConf.cc
@@ -75,14 +75,14 @@ read_addr(char *line, int n, int *i, sockaddr *addr, char *err)
 char *
 Load_IpMap_From_File(IpMap *map, int fd, const char *key_str)
 {
-  char *zret = 0;
+  char *zret = nullptr;
   int fd2    = dup(fd); // dup to avoid closing the original file.
-  FILE *f    = NULL;
+  FILE *f    = nullptr;
 
   if (fd2 >= 0)
     f = fdopen(fd2, "r");
 
-  if (f != NULL) {
+  if (f != nullptr) {
     zret = Load_IpMap_From_File(map, f, key_str);
     fclose(f);
   } else {
@@ -176,5 +176,5 @@ Load_IpMap_From_File(IpMap *map, FILE *f, const char *key_str)
       }
     }
   }
-  return 0;
+  return nullptr;
 }
diff --git a/lib/ts/Layout.cc b/lib/ts/Layout.cc
index 39227f4094c..483dcf10813 100644
--- a/lib/ts/Layout.cc
+++ b/lib/ts/Layout.cc
@@ -28,12 +28,12 @@
 #include "ts/ink_string.h"
 #include "ts/I_Layout.h"
 
-static Layout *layout = NULL;
+static Layout *layout = nullptr;
 
 Layout *
 Layout::get()
 {
-  if (layout == NULL) {
+  if (layout == nullptr) {
     ink_assert("need to call create_default_layout before accessing"
                "default_layout()");
   }
@@ -43,7 +43,7 @@ Layout::get()
 void
 Layout::create(const char *prefix)
 {
-  if (layout == NULL) {
+  if (layout == nullptr) {
     layout = new Layout(prefix);
   }
 }
@@ -64,7 +64,7 @@ layout_relative(const char *root, const char *file)
       // TODO: Make some pretty errors.
       ink_error("Cannot merge '%s' with '%s' error=%d\n", file, root, err);
     }
-    return NULL;
+    return nullptr;
   }
   return ats_strdup(path);
 }
diff --git a/lib/ts/List.h b/lib/ts/List.h
index b70783c4cc9..3dc3b0168de 100644
--- a/lib/ts/List.h
+++ b/lib/ts/List.h
@@ -67,7 +67,7 @@ template  class SLink
 {
 public:
   C *next;
-  SLink() : next(NULL){};
+  SLink() : next(nullptr){};
 };
 #define SLINK(_c, _f)                  \
   class Link##_##_f : public SLink<_c> \
@@ -101,7 +101,7 @@ template  class SLink
 //
 template  struct Link : public SLink {
   C *prev;
-  Link() : prev(NULL) {}
+  Link() : prev(nullptr) {}
 };
 #define LINK(_c, _f)                  \
   class Link##_##_f : public Link<_c> \
@@ -164,14 +164,14 @@ template  class SLL
   bool
   empty() const
   {
-    return head == NULL;
+    return head == nullptr;
   }
   void push(C *e);
   C *pop();
   void
   clear()
   {
-    head = NULL;
+    head = nullptr;
   }
   C *&
   next(C *e)
@@ -184,7 +184,7 @@ template  class SLL
     return L::next_link(e);
   }
 
-  SLL() : head(NULL) {}
+  SLL() : head(nullptr) {}
   SLL(C *c) : head(c) {}
 };
 #define SList(_c, _f) SLL<_c, _c::Link##_##_f>
@@ -206,7 +206,7 @@ SLL::pop()
   C *ret = head;
   if (ret) {
     head      = next(ret);
-    next(ret) = NULL;
+    next(ret) = nullptr;
   }
   return ret;
 }
@@ -219,7 +219,7 @@ template  struct DLL {
   bool
   empty() const
   {
-    return head == NULL;
+    return head == nullptr;
   }
   void push(C *e);
   C *pop();
@@ -233,7 +233,7 @@ template  struct DLL {
   void
   clear()
   {
-    head = NULL;
+    head = nullptr;
   }
   static C *&
   next(C *e)
@@ -256,7 +256,7 @@ template  struct DLL {
     return L::prev_link(e);
   }
 
-  DLL() : head(NULL) {}
+  DLL() : head(nullptr) {}
 };
 #define DList(_c, _f) DLL<_c, _c::Link##_##_f>
 #define DListM(_c, _m, _ml, _l) DLL<_c, _c::Link##_##_ml##_##_l>
@@ -283,8 +283,8 @@ DLL::remove(C *e)
     next(prev(e)) = next(e);
   if (next(e))
     prev(next(e)) = prev(e);
-  prev(e)         = NULL;
-  next(e)         = NULL;
+  prev(e)         = nullptr;
+  next(e)         = nullptr;
 }
 
 template 
@@ -295,11 +295,11 @@ DLL::pop()
   if (ret) {
     head = next(ret);
     if (head)
-      prev(head) = NULL;
-    next(ret)    = NULL;
+      prev(head) = nullptr;
+    next(ret)    = nullptr;
     return ret;
   } else
-    return NULL;
+    return nullptr;
 }
 
 template 
@@ -337,16 +337,16 @@ template  class Queue : public DLL
 #define QueM(_c, _m, _mf, _f) Queue<_c, _c::Link##_##_mf##_##_f>
@@ -366,7 +366,7 @@ Queue::pop()
 {
   C *ret = DLL::pop();
   if (!head)
-    tail = NULL;
+    tail = nullptr;
   return ret;
 }
 
@@ -483,13 +483,13 @@ template  struct SortableQueue : publi
             this->next(p) = n;
             this->prev(n) = p;
           } else
-            this->prev(n) = NULL;
+            this->prev(n) = nullptr;
           // fix follow (f)
           if (f) {
             this->prev(f) = v;
             this->next(v) = f;
           } else
-            this->next(v) = NULL;
+            this->next(v) = nullptr;
           // fix interior
           this->prev(v) = n;
           this->next(n) = v;
@@ -595,7 +595,7 @@ template  struct ConsCell {
   C car;
   ConsCell *cdr;
   ConsCell(C acar, ConsCell *acdr) : car(acar), cdr(acdr) {}
-  ConsCell(C acar) : car(acar), cdr(NULL) {}
+  ConsCell(C acar) : car(acar), cdr(nullptr) {}
   ConsCell(ConsCell *acdr) : cdr(acdr) {}
   static void *
   operator new(size_t size)
@@ -657,7 +657,7 @@ template  struct List {
   void
   clear()
   {
-    head = NULL;
+    head = nullptr;
   }
   void reverse();
   List(C acar) : head(new ConsCell(acar)) {}
diff --git a/lib/ts/MMH.cc b/lib/ts/MMH.cc
index 7ca4e88b4cf..0612fc62c52 100644
--- a/lib/ts/MMH.cc
+++ b/lib/ts/MMH.cc
@@ -421,7 +421,7 @@ main()
   ink_code_MMH((unsigned char *)sc4, strlen(sc4), h.hash);
   printf("%X %X %X %X\n", h.h[0], h.h[1], h.h[2], h.h[3]);
 
-  srand48(time(NULL));
+  srand48(time(nullptr));
   for (int xx = 0; xx < TEST_COLLISIONS; xx++) {
     char xs[256];
     xf[xx] = drand48();
diff --git a/lib/ts/Map.h b/lib/ts/Map.h
index 3140323f0fa..4147fc5e93c 100644
--- a/lib/ts/Map.h
+++ b/lib/ts/Map.h
@@ -1265,12 +1265,12 @@ class TSHashTable
     size_t m_distance; ///< How many values in the chain we've gone past to get here.
 
     /// Default constructor - empty location.
-    Location() : m_value(NULL), m_bucket(NULL), m_id(0), m_distance(0) {}
+    Location() : m_value(nullptr), m_bucket(NULL), m_id(0), m_distance(0) {}
     /// Check for location being valid (referencing a value).
     bool
     isValid() const
     {
-      return NULL != m_value;
+      return nullptr != m_value;
     }
 
     /// Automatically cast to a @c Value* for convenience.
@@ -1306,7 +1306,7 @@ class TSHashTable
 
   /** Standard iterator for walking the table.
       This iterates over all elements.
-      @internal Iterator is @a end if @a m_value is @c NULL.
+      @internal Iterator is @a end if @a m_value is @c nullptr.
    */
   struct iterator {
     Value *m_value;   ///< Current location.
@@ -1486,8 +1486,8 @@ TSHashTable::end()
 template  typename TSHashTable::iterator &TSHashTable::iterator::operator++()
 {
   if (m_value) {
-    if (NULL == (m_value = ListHead::next(m_value))) {        // end of bucket, next bucket.
-      if (NULL != (m_bucket = BucketChain::next(m_bucket))) { // found non-empty next bucket.
+    if (nullptr == (m_value = ListHead::next(m_value))) {        // end of bucket, next bucket.
+      if (nullptr != (m_bucket = BucketChain::next(m_bucket))) { // found non-empty next bucket.
         m_value = m_bucket->m_chain.head;
         ink_assert(m_value); // if bucket is in chain, must be non-empty.
       }
diff --git a/lib/ts/MatcherUtils.cc b/lib/ts/MatcherUtils.cc
index c1fb0efd64a..a064d2b96a0 100644
--- a/lib/ts/MatcherUtils.cc
+++ b/lib/ts/MatcherUtils.cc
@@ -43,7 +43,7 @@ config_parse_error::config_parse_error(const char *fmt, ...)
   int num;
 
   va_start(ap, fmt);
-  num = vsnprintf(NULL, 0, fmt, ap);
+  num = vsnprintf(nullptr, 0, fmt, ap);
   va_end(ap);
 
   this->msg = (char *)ats_malloc(num + 1);
@@ -58,7 +58,7 @@ config_parse_error::config_parse_error(const char *fmt, ...)
 //
 //  Attempts to open and read arg file_path into a buffer allocated
 //   off the heap (via malloc() )  Returns a pointer to the buffer
-//   is successful and NULL otherwise.
+//   is successful and nullptr otherwise.
 //
 //  CALLEE is responsibled for deallocating the buffer via free()
 //
@@ -70,26 +70,26 @@ readIntoBuffer(const char *file_path, const char *module_name, int *read_size_pt
   char *file_buf;
   int read_size = 0;
 
-  if (read_size_ptr != NULL) {
+  if (read_size_ptr != nullptr) {
     *read_size_ptr = 0;
   }
   // Open the file for Blocking IO.  We will be reading this
   //   at start up and infrequently afterward
   if ((fd = open(file_path, O_RDONLY)) < 0) {
     Error("%s Can not open %s file : %s", module_name, file_path, strerror(errno));
-    return NULL;
+    return nullptr;
   }
 
   if (fstat(fd, &file_info) < 0) {
     Error("%s Can not stat %s file : %s", module_name, file_path, strerror(errno));
     close(fd);
-    return NULL;
+    return nullptr;
   }
 
   if (file_info.st_size < 0) {
     Error("%s Can not get correct file size for %s file : %" PRId64 "", module_name, file_path, (int64_t)file_info.st_size);
     close(fd);
-    return NULL;
+    return nullptr;
   }
   // Allocate a buffer large enough to hold the entire file
   //   File size should be small and this makes it easy to
@@ -104,7 +104,7 @@ readIntoBuffer(const char *file_path, const char *module_name, int *read_size_pt
   if (read_size < 0) {
     Error("%s Read of %s file failed : %s", module_name, file_path, strerror(errno));
     ats_free(file_buf);
-    file_buf = NULL;
+    file_buf = nullptr;
   } else if (read_size < file_info.st_size) {
     // We don't want to signal this error on WIN32 because the sizes
     // won't match if the file contains any CR/LF sequence.
@@ -138,7 +138,7 @@ unescapifyStr(char *buffer)
     if (*read == '%' && *(read + 1) != '\0' && *(read + 2) != '\0') {
       subStr[0] = *(++read);
       subStr[1] = *(++read);
-      *write    = (char)strtol(subStr, (char **)NULL, 16);
+      *write    = (char)strtol(subStr, (char **)nullptr, 16);
       read++;
       write++;
     } else if (*read == '+') {
@@ -161,7 +161,7 @@ ExtractIpRange(char *match_str, in_addr_t *min, in_addr_t *max)
 {
   IpEndpoint ip_min, ip_max;
   const char *zret = ExtractIpRange(match_str, &ip_min.sa, &ip_max.sa);
-  if (0 == zret) { // success
+  if (nullptr == zret) { // success
     if (ats_is_ip4(&ip_min) && ats_is_ip4(&ip_max)) {
       if (min)
         *min = ntohl(ats_ip4_addr_cast(&ip_min));
@@ -183,7 +183,7 @@ ExtractIpRange(char *match_str, in_addr_t *min, in_addr_t *max)
 //
 //   If the extraction is successful, sets addr1 and addr2
 //     to the extracted values (in the case of a single
-//     address addr2 = addr1) and returns NULL
+//     address addr2 = addr1) and returns nullptr
 //
 //   If the extraction fails, returns a static string
 //     that describes the reason for the error.
@@ -192,7 +192,7 @@ const char *
 ExtractIpRange(char *match_str, sockaddr *addr1, sockaddr *addr2)
 {
   Tokenizer rangeTok("-/");
-  bool mask = strchr(match_str, '/') != NULL;
+  bool mask = strchr(match_str, '/') != nullptr;
   int mask_bits;
   int mask_val;
   int numToks;
@@ -251,7 +251,7 @@ ExtractIpRange(char *match_str, sockaddr *addr1, sockaddr *addr2)
   }
 
   ats_ip_copy(addr1, &la1);
-  return NULL;
+  return nullptr;
 }
 
 // char* tokLine(char* buf, char** last, char cont)
@@ -264,9 +264,9 @@ tokLine(char *buf, char **last, char cont)
 {
   char *start;
   char *cur;
-  char *prev = NULL;
+  char *prev = nullptr;
 
-  if (buf != NULL) {
+  if (buf != nullptr) {
     start = cur = buf;
     *last       = buf;
   } else {
@@ -275,7 +275,7 @@ tokLine(char *buf, char **last, char cont)
 
   while (*cur != '\0') {
     if (*cur == '\n') {
-      if (cont != '\0' && prev != NULL && *prev == cont) {
+      if (cont != '\0' && prev != nullptr && *prev == cont) {
         *prev = ' ';
         *cur  = ' ';
       } else {
@@ -294,7 +294,7 @@ tokLine(char *buf, char **last, char cont)
     return start;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 const char *matcher_type_str[] = {"invalid", "host", "domain", "ip", "url_regex", "url", "host_regex"};
@@ -312,7 +312,7 @@ const char *matcher_type_str[] = {"invalid", "host", "domain", "ip", "url_regex"
 //   Trailing digits without a specifier are
 //    assumed to be seconds
 //
-//   Returns NULL on success and a static
+//   Returns nullptr on success and a static
 //    error string on failure
 //
 const char *
@@ -326,7 +326,7 @@ processDurationString(char *str, int *seconds)
   int result = 0;
   int len;
 
-  if (str == NULL) {
+  if (str == nullptr) {
     return "Missing time";
   }
 
@@ -396,14 +396,14 @@ processDurationString(char *str, int *seconds)
   }
 
   *seconds = result;
-  return NULL;
+  return nullptr;
 }
 
 const matcher_tags http_dest_tags = {"dest_host", "dest_domain", "dest_ip", "url_regex", "url", "host_regex", true};
 
-const matcher_tags ip_allow_tags = {NULL, NULL, "src_ip", NULL, NULL, NULL, false};
+const matcher_tags ip_allow_tags = {nullptr, nullptr, "src_ip", nullptr, nullptr, nullptr, false};
 
-const matcher_tags socks_server_tags = {NULL, NULL, "dest_ip", NULL, NULL, NULL, false};
+const matcher_tags socks_server_tags = {nullptr, nullptr, "dest_ip", nullptr, nullptr, nullptr, false};
 
 // char* parseConfigLine(char* line, matcher_line* p_line,
 //                       const matcher_tags* tags)
@@ -411,7 +411,7 @@ const matcher_tags socks_server_tags = {NULL, NULL, "dest_ip", NULL, NULL, NULL,
 //   Parse out a config file line suitable for passing to
 //    a ControlMatcher object
 //
-//   If successful, NULL is returned.  If unsuccessful,
+//   If successful, nullptr is returned.  If unsuccessful,
 //     a static error string is returned
 //
 const char *
@@ -427,11 +427,11 @@ parseConfigLine(char *line, matcher_line *p_line, const matcher_tags *tags)
 
   pState state      = FIND_LABEL;
   bool inQuote      = false;
-  char *copyForward = NULL;
-  char *copyFrom    = NULL;
+  char *copyForward = nullptr;
+  char *copyFrom    = nullptr;
   char *s           = line;
-  char *label       = NULL;
-  char *val         = NULL;
+  char *label       = nullptr;
+  char *val         = nullptr;
   int num_el        = 0;
   matcher_type type = MATCH_NONE;
 
@@ -439,7 +439,7 @@ parseConfigLine(char *line, matcher_line *p_line, const matcher_tags *tags)
   memset(p_line, 0, sizeof(matcher_line));
 
   if (*s == '\0') {
-    return NULL;
+    return nullptr;
   }
 
   do {
@@ -460,8 +460,8 @@ parseConfigLine(char *line, matcher_line *p_line, const matcher_tags *tags)
       break;
     case START_PARSE_VAL:
       // Init state needed for parsing values
-      copyForward = NULL;
-      copyFrom    = NULL;
+      copyForward = nullptr;
+      copyFrom    = nullptr;
 
       if (*s == '"') {
         inQuote = true;
@@ -494,7 +494,7 @@ parseConfigLine(char *line, matcher_line *p_line, const matcher_tags *tags)
           //  end is right now, defer the work
           //  into the future
 
-          if (copyForward != NULL) {
+          if (copyForward != nullptr) {
             // Perform the prior copy forward
             int bytesCopy = s - copyFrom;
             memcpy(copyForward, copyFrom, s - copyFrom);
@@ -544,7 +544,7 @@ parseConfigLine(char *line, matcher_line *p_line, const matcher_tags *tags)
     if (state == CONSUME) {
       // See if there are any quote copy overs
       //   we've pushed into the future
-      if (copyForward != NULL) {
+      if (copyForward != nullptr) {
         int toCopy = (s - 1) - copyFrom;
         memcpy(copyForward, copyFrom, toCopy);
         *(copyForward + toCopy) = '\0';
@@ -606,5 +606,5 @@ parseConfigLine(char *line, matcher_line *p_line, const matcher_tags *tags)
     }
   }
 
-  return NULL;
+  return nullptr;
 }
diff --git a/lib/ts/MatcherUtils.h b/lib/ts/MatcherUtils.h
index f2f8c5d6bac..44d308b28e6 100644
--- a/lib/ts/MatcherUtils.h
+++ b/lib/ts/MatcherUtils.h
@@ -102,8 +102,8 @@ struct matcher_tags {
   bool
   empty() const
   {
-    return this->match_host == NULL && this->match_domain == NULL && this->match_ip == NULL && this->match_regex == NULL &&
-           this->match_url == NULL && this->match_host_regex == NULL;
+    return this->match_host == nullptr && this->match_domain == NULL && this->match_ip == NULL && this->match_regex == NULL &&
+           this->match_url == nullptr && this->match_host_regex == NULL;
   }
 };
 
@@ -136,7 +136,7 @@ struct config_parse_error {
     if (rhs.msg.get()) {
       this->msg = ats_strdup(rhs.msg.get());
     } else {
-      this->msg = (char *)NULL;
+      this->msg = (char *)nullptr;
     }
 
     return *this;
@@ -149,7 +149,7 @@ struct config_parse_error {
   }
 
   // A config error object evaluates to true if there is an error message.
-  operator bool() const { return msg.get() != NULL; }
+  operator bool() const { return msg.get() != nullptr; }
 private:
   config_parse_error() {}
   ats_scoped_str msg;
diff --git a/lib/ts/ParseRules.h b/lib/ts/ParseRules.h
index d9879b655b6..dfa8218f3b0 100644
--- a/lib/ts/ParseRules.h
+++ b/lib/ts/ParseRules.h
@@ -123,7 +123,7 @@ class ParseRules
   static CTypeResult is_end_of_url(char c);       // NUL,CR,SP
   static CTypeResult is_eow(char c);              // NUL,CR,LF
   static CTypeResult is_uri(char c);              // A-Z,a-z,0-9 :/?#[]@!$&'()*+,;=-._~%
-  static CTypeResult is_sep(char c);              // NULL,COMMA,':','!',wslfcr
+  static CTypeResult is_sep(char c);              // nullptr,COMMA,':','!',wslfcr
   static CTypeResult is_empty(char c);            // wslfcr,#
   static CTypeResult is_alnum(char c);            // 0-9,A-Z,a-z
   static CTypeResult is_space(char c);            // ' ' HT,VT,NP,CR,LF
diff --git a/lib/ts/RbTree.cc b/lib/ts/RbTree.cc
index c058ea487d7..28ca597fe62 100644
--- a/lib/ts/RbTree.cc
+++ b/lib/ts/RbTree.cc
@@ -45,7 +45,7 @@ namespace detail
   RBNode *
   RBNode::getChild(Direction d) const
   {
-    return d == RIGHT ? _right : d == LEFT ? _left : 0;
+    return d == RIGHT ? _right : d == LEFT ? _left : nullptr;
   }
 
   RBNode *
@@ -68,7 +68,7 @@ namespace detail
         parent->clearChild(child_dir);
         parent->setChild(child, child_dir);
       } else {
-        child->_parent = 0;
+        child->_parent = nullptr;
       }
     }
     return child;
@@ -106,18 +106,18 @@ namespace detail
     n->_color = _color;
     if (_parent) {
       Direction d = _parent->getChildDirection(this);
-      _parent->setChild(0, d);
+      _parent->setChild(nullptr, d);
       if (_parent != n)
         _parent->setChild(n, d);
     } else {
-      n->_parent = 0;
+      n->_parent = nullptr;
     }
-    n->_left = n->_right = 0;
+    n->_left = n->_right = nullptr;
     if (_left && _left != n)
       n->setChild(_left, LEFT);
     if (_right && _right != n)
       n->setChild(_right, RIGHT);
-    _left = _right = 0;
+    _left = _right = nullptr;
   }
 
   /* Rebalance the tree. This node is the unbalanced node. */
@@ -166,7 +166,7 @@ namespace detail
   RBNode *
   RBNode::remove()
   {
-    self *root = 0; // new root node, returned to caller
+    self *root = nullptr; // new root node, returned to caller
 
     /*  Handle two special cases first.
         - This is the only node in the tree, return a new root of NIL
@@ -174,11 +174,11 @@ namespace detail
     */
     if (!_parent && !(_left && _right)) {
       if (_left) {
-        _left->_parent = 0;
+        _left->_parent = nullptr;
         root           = _left;
         root->_color   = BLACK;
       } else if (_right) {
-        _right->_parent = 0;
+        _right->_parent = nullptr;
         root            = _right;
         root->_color    = BLACK;
       } // else that was the only node, so leave @a root @c NULL.
@@ -222,7 +222,7 @@ namespace detail
       splice_node = remove_node->_parent;
       // Keep @a d up to date.
       d = splice_node->getChildDirection(remove_node);
-      splice_node->setChild(0, d);
+      splice_node->setChild(nullptr, d);
     }
 
     // If the node to pull out of the tree isn't this one,
@@ -260,7 +260,7 @@ namespace detail
       // This is why we need @a parent, otherwise we could just use @a n.
       if (NONE != d) {
         parent = n;
-        n      = 0;
+        n      = nullptr;
       }
 
       while (parent) { // @a n is not the root
diff --git a/lib/ts/Regex.cc b/lib/ts/Regex.cc
index 621d0862a6c..b6f2ac4c6ae 100644
--- a/lib/ts/Regex.cc
+++ b/lib/ts/Regex.cc
@@ -39,7 +39,7 @@ get_jit_stack(void *data ATS_UNUSED)
 {
   pcre_jit_stack *jit_stack;
 
-  if ((jit_stack = (pcre_jit_stack *)ink_thread_getspecific(k.key)) == NULL) {
+  if ((jit_stack = (pcre_jit_stack *)ink_thread_getspecific(k.key)) == nullptr) {
     jit_stack = pcre_jit_stack_alloc(ats_pagesize(), 1024 * 1024); // 1 page min and 1MB max
     ink_thread_setspecific(k.key, (void *)jit_stack);
   }
@@ -67,9 +67,9 @@ Regex::compile(const char *pattern, const unsigned flags)
     options |= PCRE_ANCHORED;
   }
 
-  regex = pcre_compile(pattern, options, &error, &erroffset, NULL);
+  regex = pcre_compile(pattern, options, &error, &erroffset, nullptr);
   if (error) {
-    regex = NULL;
+    regex = nullptr;
     return false;
   }
 
@@ -81,7 +81,7 @@ Regex::compile(const char *pattern, const unsigned flags)
 
 #ifdef PCRE_CONFIG_JIT
   if (regex_extra)
-    pcre_assign_jit_stack(regex_extra, &get_jit_stack, NULL);
+    pcre_assign_jit_stack(regex_extra, &get_jit_stack, nullptr);
 #endif
 
   return true;
@@ -159,26 +159,26 @@ DFA::build(const char *pattern, unsigned flags)
   }
 
   ret     = (dfa_pattern *)ats_malloc(sizeof(dfa_pattern));
-  ret->_p = NULL;
+  ret->_p = nullptr;
 
   ret->_re = new Regex();
   rv       = ret->_re->compile(pattern, flags);
   if (rv == -1) {
     delete ret->_re;
     ats_free(ret);
-    return NULL;
+    return nullptr;
   }
 
   ret->_idx  = 0;
   ret->_p    = ats_strndup(pattern, strlen(pattern));
-  ret->_next = NULL;
+  ret->_next = nullptr;
   return ret;
 }
 
 int
 DFA::compile(const char *pattern, unsigned flags)
 {
-  ink_assert(_my_patterns == NULL);
+  ink_assert(_my_patterns == nullptr);
   _my_patterns = build(pattern, flags);
   if (_my_patterns)
     return 0;
@@ -190,8 +190,8 @@ int
 DFA::compile(const char **patterns, int npatterns, unsigned flags)
 {
   const char *pattern;
-  dfa_pattern *ret = NULL;
-  dfa_pattern *end = NULL;
+  dfa_pattern *ret = nullptr;
+  dfa_pattern *end = nullptr;
   int i;
 
   for (i = 0; i < npatterns; i++) {
@@ -203,7 +203,7 @@ DFA::compile(const char **patterns, int npatterns, unsigned flags)
 
     if (!_my_patterns) {
       _my_patterns        = ret;
-      _my_patterns->_next = NULL;
+      _my_patterns->_next = nullptr;
       _my_patterns->_idx  = i;
     } else {
       end = _my_patterns;
diff --git a/lib/ts/Regression.cc b/lib/ts/Regression.cc
index dc129909953..5ce82550aba 100644
--- a/lib/ts/Regression.cc
+++ b/lib/ts/Regression.cc
@@ -34,10 +34,10 @@
 #include "ts/ink_assert.h"
 #include "ts/ink_args.h"
 
-static RegressionTest *test           = NULL;
-static RegressionTest *exclusive_test = NULL;
+static RegressionTest *test           = nullptr;
+static RegressionTest *exclusive_test = nullptr;
 
-RegressionTest *RegressionTest::current = 0;
+RegressionTest *RegressionTest::current = nullptr;
 int RegressionTest::ran_tests           = 0;
 DFA RegressionTest::dfa;
 int RegressionTest::final_status = REGRESSION_TEST_PASSED;
@@ -59,7 +59,7 @@ regression_status_string(int status)
 }
 
 RegressionTest::RegressionTest(const char *_n, const SourceLocation &_l, TestFunction *_f, int _o)
-  : name(_n), location(_l), function(_f), next(0), status(REGRESSION_TEST_NOT_RUN), printed(false), opt(_o)
+  : name(_n), location(_l), function(_f), next(nullptr), status(REGRESSION_TEST_NOT_RUN), printed(false), opt(_o)
 {
   if (opt == REGRESSION_OPT_EXCLUSIVE) {
     if (exclusive_test)
@@ -211,9 +211,9 @@ RegressionTest::main(int /* argc */, const char **argv, int level)
   int regression_level       = level;
 
   const ArgumentDescription argument_descriptions[] = {
-    {"regression", 'R', "Regression Level (quick:1..long:3)", "I", ®ression_level, "PROXY_REGRESSION", NULL},
-    {"regression_test", 'r', "Run Specific Regression Test", "S512", regression_test, "PROXY_REGRESSION_TEST", NULL},
-    {"regression_list", 'l', "List Regression Tests", "T", ®ression_list, "PROXY_REGRESSION_LIST", NULL},
+    {"regression", 'R', "Regression Level (quick:1..long:3)", "I", ®ression_level, "PROXY_REGRESSION", nullptr},
+    {"regression_test", 'r', "Run Specific Regression Test", "S512", regression_test, "PROXY_REGRESSION_TEST", nullptr},
+    {"regression_list", 'l', "List Regression Tests", "T", ®ression_list, "PROXY_REGRESSION_LIST", nullptr},
   };
 
   AppVersionInfo version;
@@ -225,7 +225,7 @@ RegressionTest::main(int /* argc */, const char **argv, int level)
   if (regression_list) {
     RegressionTest::list();
   } else {
-    RegressionTest::run(*regression_test == '\0' ? NULL : regression_test, regression_level);
+    RegressionTest::run(*regression_test == '\0' ? nullptr : regression_test, regression_level);
   }
 
   return RegressionTest::final_status == REGRESSION_TEST_PASSED ? 0 : 1;
diff --git a/lib/ts/SourceLocation.cc b/lib/ts/SourceLocation.cc
index 7e7ee0fd36e..2bcd0dea76a 100644
--- a/lib/ts/SourceLocation.cc
+++ b/lib/ts/SourceLocation.cc
@@ -39,12 +39,12 @@ SourceLocation::str(char *buf, int buflen) const
   const char *shortname;
 
   if (!this->valid() || buflen < 1)
-    return (NULL);
+    return (nullptr);
 
   shortname = strrchr(file, '/');
   shortname = shortname ? (shortname + 1) : file;
 
-  if (func != NULL) {
+  if (func != nullptr) {
     snprintf(buf, buflen, "%s:%d (%s)", shortname, line, func);
   } else {
     snprintf(buf, buflen, "%s:%d", shortname, line);
diff --git a/lib/ts/TextBuffer.cc b/lib/ts/TextBuffer.cc
index 7943c0f04ab..f35f49bb91c 100644
--- a/lib/ts/TextBuffer.cc
+++ b/lib/ts/TextBuffer.cc
@@ -36,8 +36,8 @@
 
 textBuffer::textBuffer(int size)
 {
-  bufferStart = NULL;
-  nextAdd     = NULL;
+  bufferStart = nullptr;
+  nextAdd     = nullptr;
   currentSize = spaceLeft = 0;
   if (size > 0) {
     // Insitute a minimum size
@@ -63,7 +63,7 @@ textBuffer::release()
 {
   char *ret = bufferStart;
 
-  bufferStart = nextAdd = NULL;
+  bufferStart = nextAdd = nullptr;
   currentSize = spaceLeft = 0;
 
   return ret;
@@ -77,7 +77,7 @@ textBuffer::release()
 void
 textBuffer::reUse()
 {
-  if (bufferStart != NULL) {
+  if (bufferStart != nullptr) {
     nextAdd    = bufferStart;
     spaceLeft  = currentSize - 1;
     nextAdd[0] = '\0';
@@ -135,7 +135,7 @@ textBuffer::enlargeBuffer(unsigned N)
     addedSize = newSize - currentSize;
 
     newSpace = (char *)ats_realloc(bufferStart, newSize);
-    if (newSpace != NULL) {
+    if (newSpace != nullptr) {
       nextAdd     = newSpace + (unsigned)(nextAdd - bufferStart);
       bufferStart = newSpace;
       spaceLeft += addedSize;
diff --git a/lib/ts/Tokenizer.cc b/lib/ts/Tokenizer.cc
index 8897d824bca..46a45744857 100644
--- a/lib/ts/Tokenizer.cc
+++ b/lib/ts/Tokenizer.cc
@@ -39,8 +39,8 @@ Tokenizer::Tokenizer(const char *StrOfDelimiters)
 {
   int length;
 
-  if (StrOfDelimiters == NULL) {
-    strOfDelimit = NULL;
+  if (StrOfDelimiters == nullptr) {
+    strOfDelimit = nullptr;
   } else {
     length       = (int)(strlen(StrOfDelimiters) + 1);
     strOfDelimit = new char[length];
@@ -63,13 +63,13 @@ Tokenizer::~Tokenizer()
   bool root     = true;
   tok_node *cur = &start_node;
   ;
-  tok_node *next = NULL;
+  tok_node *next = nullptr;
 
-  if (strOfDelimit != NULL) {
+  if (strOfDelimit != nullptr) {
     delete[] strOfDelimit;
   }
 
-  while (cur != NULL) {
+  while (cur != nullptr) {
     if (options & COPY_TOKS) {
       for (int i = 0; i < TOK_NODE_ELEMENTS; i++)
         ats_free(cur->el[i]);
@@ -118,7 +118,7 @@ Tokenizer::Initialize(char *str, unsigned opt)
 {
   char *strStart;
   int priorCharWasDelimit = 1;
-  char *tokStart          = NULL;
+  char *tokStart          = nullptr;
   unsigned tok_count      = 0;
   bool max_limit_hit      = false;
 
@@ -260,7 +260,7 @@ Tokenizer::addToken(char *startAddr, int length)
   //   to point to next tok_node, creating one
   //   if there is not a next one
   if (add_index >= TOK_NODE_ELEMENTS) {
-    if (add_node->next == NULL) {
+    if (add_node->next == nullptr) {
       add_node->next = (tok_node *)ats_malloc(sizeof(tok_node));
       memset(add_node->next, 0, sizeof(tok_node));
     }
@@ -275,11 +275,11 @@ const char *Tokenizer::operator[](unsigned index) const
   unsigned cur_start       = 0;
 
   if (index >= numValidTokens) {
-    return NULL;
+    return nullptr;
   } else {
     while (cur_start + TOK_NODE_ELEMENTS <= index) {
       cur_node = cur_node->next;
-      ink_assert(cur_node != NULL);
+      ink_assert(cur_node != nullptr);
       cur_start += TOK_NODE_ELEMENTS;
     }
     return cur_node->el[index % TOK_NODE_ELEMENTS];
@@ -310,19 +310,19 @@ Tokenizer::iterNext(tok_iter_state *state)
   index++;
   if (index >= TOK_NODE_ELEMENTS) {
     node = node->next;
-    if (node == NULL) {
-      return NULL;
+    if (node == nullptr) {
+      return nullptr;
     } else {
       index = 0;
     }
   }
 
-  if (node->el[index] != NULL) {
+  if (node->el[index] != nullptr) {
     state->node  = node;
     state->index = index;
     return node->el[index];
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 
@@ -333,8 +333,8 @@ Tokenizer::Print()
   int node_index     = 0;
   int count          = 0;
 
-  while (cur_node != NULL) {
-    if (cur_node->el[node_index] != NULL) {
+  while (cur_node != nullptr) {
+    if (cur_node->el[node_index] != nullptr) {
       printf("Token %d : |%s|\n", count, cur_node->el[node_index]);
       count++;
     } else {
@@ -354,7 +354,7 @@ Tokenizer::ReUse()
 {
   tok_node *cur_node = &start_node;
 
-  while (cur_node != NULL) {
+  while (cur_node != nullptr) {
     if (options & COPY_TOKS) {
       for (int i = 0; i < TOK_NODE_ELEMENTS; i++)
         ats_free(cur_node->el[i]);
diff --git a/lib/ts/Trie.h b/lib/ts/Trie.h
index a0db666e8c7..97377568b2a 100644
--- a/lib/ts/Trie.h
+++ b/lib/ts/Trie.h
@@ -35,7 +35,7 @@ template  class Trie
 {
 public:
   Trie() { m_root.Clear(); }
-  // will return false for duplicates; key should be NULL-terminated
+  // will return false for duplicates; key should be nullptr-terminated
   // if key_len is defaulted to -1
   bool Insert(const char *key, T *value, int rank, int key_len = -1);
 
@@ -64,7 +64,7 @@ template  class Trie
     void
     Clear()
     {
-      value    = NULL;
+      value    = nullptr;
       occupied = false;
       rank     = 0;
       ink_zero(children);
@@ -80,7 +80,7 @@ template  class Trie
     AllocateChild(char index)
     {
       Node *&child = children[static_cast(index)];
-      ink_assert(child == NULL);
+      ink_assert(child == nullptr);
       child = static_cast(ats_malloc(sizeof(Node)));
       child->Clear();
       return child;
@@ -195,7 +195,7 @@ Trie::Search(const char *key, int key_len /* = -1 */) const
     return found_node->value;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 template 
@@ -218,7 +218,7 @@ void
 Trie::Clear()
 {
   T *iter;
-  while (NULL != (iter = m_value_list.pop()))
+  while (nullptr != (iter = m_value_list.pop()))
     delete iter;
 
   _Clear(&m_root);
diff --git a/lib/ts/TsBuffer.h b/lib/ts/TsBuffer.h
index 48b5127d9a0..e620c4783d5 100644
--- a/lib/ts/TsBuffer.h
+++ b/lib/ts/TsBuffer.h
@@ -224,7 +224,7 @@ struct ConstBuffer {
 
   /** Find a character.
       @return A pointer to the first occurrence of @a c in @a this
-      or @c NULL if @a c is not found.
+      or @c nullptr if @a c is not found.
   */
   char const *find(char c) const;
 
@@ -287,7 +287,7 @@ struct ConstBuffer {
 // ----------------------------------------------------------
 // Inline implementations.
 
-inline Buffer::Buffer() : _ptr(NULL), _size(0)
+inline Buffer::Buffer() : _ptr(nullptr), _size(0)
 {
 }
 inline Buffer::Buffer(char *ptr, size_t n) : _ptr(ptr), _size(n)
@@ -359,7 +359,7 @@ Buffer::size() const
   return _size;
 }
 
-inline ConstBuffer::ConstBuffer() : _ptr(NULL), _size(0)
+inline ConstBuffer::ConstBuffer() : _ptr(nullptr), _size(0)
 {
 }
 inline ConstBuffer::ConstBuffer(char const *ptr, size_t n) : _ptr(ptr), _size(n)
diff --git a/lib/ts/X509HostnameValidator.cc b/lib/ts/X509HostnameValidator.cc
index 7f797013f3b..c46bcc93042 100644
--- a/lib/ts/X509HostnameValidator.cc
+++ b/lib/ts/X509HostnameValidator.cc
@@ -48,7 +48,7 @@ find_wildcard_in_hostname(const unsigned char *p, size_t len, bool idna_subject)
   size_t i = 0;
   // Minimum wildcard length *.a.b
   if (len < 5) {
-    return NULL;
+    return nullptr;
   }
 
   int wildcard_pos = -1;
@@ -62,7 +62,7 @@ find_wildcard_in_hostname(const unsigned char *p, size_t len, bool idna_subject)
   }
   // Final dot minimal pos is a.b.xxxxxx
   if (final_dot_pos < 3)
-    return NULL;
+    return nullptr;
 
   for (i = 0; i < final_dot_pos; i++) {
     /*
@@ -93,7 +93,7 @@ find_wildcard_in_hostname(const unsigned char *p, size_t len, bool idna_subject)
       break;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 /*
@@ -165,7 +165,7 @@ wildcard_match(const unsigned char *prefix, size_t prefix_len, const unsigned ch
 static bool
 equal_wildcard(const unsigned char *pattern, size_t pattern_len, const unsigned char *subject, size_t subject_len)
 {
-  const unsigned char *wildcard = NULL;
+  const unsigned char *wildcard = nullptr;
 
   bool is_idna = (subject_len > 4 && strncasecmp((const char *)(subject), "xn--", 4) == 0);
   /*
@@ -175,7 +175,7 @@ equal_wildcard(const unsigned char *pattern, size_t pattern_len, const unsigned
   if (subject_len > 5 && subject[0] != '.')
     wildcard = find_wildcard_in_hostname(pattern, pattern_len, is_idna);
 
-  if (wildcard == NULL)
+  if (wildcard == nullptr)
     return equal_nocase(pattern, pattern_len, subject, subject_len);
   return wildcard_match(pattern, wildcard - pattern, wildcard + 1, (pattern + pattern_len) - wildcard - 1, subject, subject_len);
 }
@@ -202,8 +202,8 @@ do_check_string(ASN1_STRING *a, int cmp_type, equal_fn equal, const unsigned cha
 bool
 validate_hostname(X509 *x, const unsigned char *hostname, bool is_ip, char **peername)
 {
-  GENERAL_NAMES *gens = NULL;
-  X509_NAME *name     = NULL;
+  GENERAL_NAMES *gens = nullptr;
+  X509_NAME *name     = nullptr;
   int i;
   int alt_type;
   bool retval = false;
@@ -220,7 +220,7 @@ validate_hostname(X509 *x, const unsigned char *hostname, bool is_ip, char **pee
   }
 
   // Check SANs for a match.
-  gens = (GENERAL_NAMES *)X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL);
+  gens = (GENERAL_NAMES *)X509_get_ext_d2i(x, NID_subject_alt_name, nullptr, nullptr);
   if (gens) {
     // BoringSSL has sk_GENERAL_NAME_num() return size_t.
     for (i = 0; i < static_cast(sk_GENERAL_NAME_num(gens)); i++) {
diff --git a/lib/ts/hugepages.cc b/lib/ts/hugepages.cc
index 76f74fdbc0f..8e74bd9944e 100644
--- a/lib/ts/hugepages.cc
+++ b/lib/ts/hugepages.cc
@@ -74,7 +74,7 @@ ats_hugepage_init(int enabled)
 
   fp = fopen(MEMINFO_PATH, "r");
 
-  if (fp == NULL) {
+  if (fp == nullptr) {
     Debug(DEBUG_TAG "_init", "Cannot open file %s", MEMINFO_PATH);
     return;
   }
@@ -115,11 +115,11 @@ ats_alloc_hugepage(size_t s)
 
   size = INK_ALIGN(s, ats_hugepage_size());
 
-  mem = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0);
+  mem = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0);
 
   if (mem == MAP_FAILED) {
     Debug(DEBUG_TAG, "Could not allocate hugepages size = %zu", size);
-    return NULL;
+    return nullptr;
   }
 
   Debug(DEBUG_TAG, "Request/Allocation (%zu/%zu) {%p}", s, size, mem);
@@ -127,7 +127,7 @@ ats_alloc_hugepage(size_t s)
 #else
   (void)s;
   Debug(DEBUG_TAG, "MAP_HUGETLB not defined");
-  return NULL;
+  return nullptr;
 #endif
 }
 
diff --git a/lib/ts/ink_args.cc b/lib/ts/ink_args.cc
index 6694beb8fd7..7c5859250d3 100644
--- a/lib/ts/ink_args.cc
+++ b/lib/ts/ink_args.cc
@@ -38,7 +38,7 @@ Process arguments
 //  Global variables
 //
 
-const char *file_arguments[MAX_FILE_ARGUMENTS] = {0};
+const char *file_arguments[MAX_FILE_ARGUMENTS] = {nullptr};
 const char *program_name                       = (char *)"Traffic Server";
 unsigned n_file_arguments                      = 0;
 
@@ -74,7 +74,7 @@ static bool
 process_arg(const AppVersionInfo *appinfo, const ArgumentDescription *argument_descriptions, unsigned n_argument_descriptions,
             int i, const char ***argv)
 {
-  const char *arg = NULL;
+  const char *arg = nullptr;
 
   if (arg_is_version_flag(&argument_descriptions[i])) {
     ink_fputln(stdout, appinfo->FullVersionInfoStr);
diff --git a/lib/ts/ink_args.h b/lib/ts/ink_args.h
index 3db9642d32e..ad7ecd43d85 100644
--- a/lib/ts/ink_args.h
+++ b/lib/ts/ink_args.h
@@ -67,13 +67,13 @@ struct ArgumentDescription {
   ArgumentFunction *pfn;
 };
 
-#define VERSION_ARGUMENT_DESCRIPTION()                             \
-  {                                                                \
-    "version", 'V', "Print version string", NULL, NULL, NULL, NULL \
+#define VERSION_ARGUMENT_DESCRIPTION()                                         \
+  {                                                                            \
+    "version", 'V', "Print version string", nullptr, nullptr, nullptr, nullptr \
   }
-#define HELP_ARGUMENT_DESCRIPTION()                                 \
-  {                                                                 \
-    "help", 'h', "Print usage information", NULL, NULL, NULL, usage \
+#define HELP_ARGUMENT_DESCRIPTION()                                          \
+  {                                                                          \
+    "help", 'h', "Print usage information", nullptr, nullptr, nullptr, usage \
   }
 
 /* Global Data
diff --git a/lib/ts/ink_cap.cc b/lib/ts/ink_cap.cc
index 9f05959d8d3..6ffe4826606 100644
--- a/lib/ts/ink_cap.cc
+++ b/lib/ts/ink_cap.cc
@@ -62,7 +62,7 @@ ink_mutex ElevateAccess::lock = INK_MUTEX_INIT;
   do {                                                                                                           \
     if (is_debug_tag_set(tag)) {                                                                                 \
       cap_t caps      = cap_get_proc();                                                                          \
-      char *caps_text = cap_to_text(caps, NULL);                                                                 \
+      char *caps_text = cap_to_text(caps, nullptr);                                                              \
       Debug(tag, "caps='%s', core=%s, death signal=%d, thread=0x%llx", caps_text, is_dumpable(), death_signal(), \
             (unsigned long long)pthread_self());                                                                 \
       cap_free(caps_text);                                                                                       \
@@ -153,7 +153,7 @@ impersonate(const struct passwd *pwd, ImpersonationLevel level)
   DEBUG_CREDENTIALS("privileges");
   DEBUG_PRIVILEGES("privileges");
 
-  ink_release_assert(pwd != NULL);
+  ink_release_assert(pwd != nullptr);
 
 #if defined(PR_GET_DUMPABLE)
   dumpable = (prctl(PR_GET_DUMPABLE) == 1);
@@ -208,7 +208,7 @@ ImpersonateUserID(uid_t uid, ImpersonationLevel level)
     Fatal("missing password database entry for UID %ld: %s", (long)uid, strerror(errno));
   }
 
-  if (pwd == NULL) {
+  if (pwd == nullptr) {
     // Password entry not found ...
     Fatal("missing password database entry for UID %ld", (long)uid);
   }
@@ -235,7 +235,7 @@ ImpersonateUser(const char *user, ImpersonationLevel level)
     }
   }
 
-  if (pwd == NULL) {
+  if (pwd == nullptr) {
     // Password entry not found ...
     Fatal("missing password database entry for '%s'", user);
   }
@@ -333,7 +333,7 @@ FILE *
 elevating_fopen(const char *path, const char *mode)
 {
   FILE *f = fopen(path, mode);
-  if (NULL == f && (EPERM == errno || EACCES == errno)) {
+  if (nullptr == f && (EPERM == errno || EACCES == errno)) {
     ElevateAccess access(ElevateAccess::FILE_PRIVILEGE);
     f = fopen(path, mode);
   }
@@ -353,7 +353,7 @@ ElevateAccess::acquirePrivilege(unsigned priv_mask)
 
   Debug("privileges", "[acquirePrivilege] level= %x", level);
 
-  ink_assert(NULL == cap_state);
+  ink_assert(nullptr == cap_state);
 
   // Some privs aren't checked or used here because they are kept permanently in the
   // the capability list. See @a eff_list in @c RestrictCapabilities
@@ -396,7 +396,7 @@ ElevateAccess::releasePrivilege()
     if (cap_set_proc(static_cast(cap_state)) != 0) {
       Fatal("failed to restore privileged capabilities: %s", strerror(errno));
     }
-    cap_state = NULL;
+    cap_state = nullptr;
   }
 }
 #endif
diff --git a/lib/ts/ink_defs.cc b/lib/ts/ink_defs.cc
index 712df08eb5d..2dfa331c7c3 100644
--- a/lib/ts/ink_defs.cc
+++ b/lib/ts/ink_defs.cc
@@ -79,14 +79,14 @@ ink_sys_name_release(char *name, int namelen, char *release, int releaselen)
   mib[0]     = CTL_KERN;
   mib[1]     = KERN_OSTYPE;
 
-  if (sysctl(mib, 2, name, &len, NULL, 0) == -1)
+  if (sysctl(mib, 2, name, &len, nullptr, 0) == -1)
     return -1;
 
   len    = releaselen;
   mib[0] = CTL_KERN;
   mib[1] = KERN_OSRELEASE;
 
-  if (sysctl(mib, 2, release, &len, NULL, 0) == -1)
+  if (sysctl(mib, 2, release, &len, nullptr, 0) == -1)
     return -1;
 
   return 0;
@@ -129,7 +129,7 @@ ink_number_of_processors()
   mib[0]     = CTL_HW;
   mib[1]     = HW_NCPU;
   size_t len = sizeof(n);
-  if (sysctl(mib, 2, &n, &len, NULL, 0) == -1)
+  if (sysctl(mib, 2, &n, &len, nullptr, 0) == -1)
     return 1;
   return n;
 #else
diff --git a/lib/ts/ink_defs.h b/lib/ts/ink_defs.h
index 46cd6b5e265..0f80a81523d 100644
--- a/lib/ts/ink_defs.h
+++ b/lib/ts/ink_defs.h
@@ -69,11 +69,6 @@
 
 #define NUL '\0'
 
-// Need to use this to avoid problems when calling variadic functions
-// with many arguments. In such cases, a raw '0' or NULL can be
-// interpreted as 32 bits
-#define NULL_PTR static_cast(0)
-
 // Determine the element count for an array.
 #ifdef __cplusplus
 template 
diff --git a/lib/ts/ink_error.cc b/lib/ts/ink_error.cc
index b5dda0f23ec..7d7bf1e4d5c 100644
--- a/lib/ts/ink_error.cc
+++ b/lib/ts/ink_error.cc
@@ -115,7 +115,7 @@ ink_pwarning(const char *message_format, ...)
   va_start(ap, message_format);
   errno_string = strerror(errno);
   snprintf(extended_format, sizeof(extended_format) - 1, "WARNING: %s ", message_format, errno,
-           (errno_string == NULL ? "unknown" : errno_string));
+           (errno_string == nullptr ? "unknown" : errno_string));
   extended_format[sizeof(extended_format) - 1] = 0;
   vsnprintf(message, sizeof(message) - 1, extended_format, ap);
   message[sizeof(message) - 1] = 0;
diff --git a/lib/ts/ink_file.h b/lib/ts/ink_file.h
index 1150e75a5bc..df6d42fabca 100644
--- a/lib/ts/ink_file.h
+++ b/lib/ts/ink_file.h
@@ -85,7 +85,7 @@ int ink_file_fd_writestring(int fd, const char *buf);
 int ink_filepath_merge(char *buf, int bufsz, const char *rootpath, const char *addpath, int flags = INK_FILEPATH_TRUENAME);
 /**
  Add addpath to the rootpath prepending slash if rootpath
- is not NULL and doesn't end with the slash already and put the
+ is not nullptr and doesn't end with the slash already and put the
  result into path buffer. If the buffer is too small to hold the
  resulting string, required size is returned. On success zero is returned
  */
diff --git a/lib/ts/ink_hash_table.cc b/lib/ts/ink_hash_table.cc
index 56e5dbdcbba..03a226cd8be 100644
--- a/lib/ts/ink_hash_table.cc
+++ b/lib/ts/ink_hash_table.cc
@@ -89,7 +89,7 @@ ink_hash_table_destroy(InkHashTable *ht_ptr)
   tcl_ht_ptr = (Tcl_HashTable *)ht_ptr;
   Tcl_DeleteHashTable(tcl_ht_ptr);
   ats_free(tcl_ht_ptr);
-  return (InkHashTable *)0;
+  return (InkHashTable *)nullptr;
 } /* End ink_hash_table_destroy */
 
 /*---------------------------------------------------------------------------*
@@ -108,7 +108,7 @@ _ink_hash_table_free_entry_value(InkHashTable *ht_ptr, InkHashTableEntry *e)
   InkHashTableValue value;
 
   value = ink_hash_table_entry_value(ht_ptr, e);
-  if (value != NULL) {
+  if (value != nullptr) {
     ats_free(value);
   }
 
@@ -120,7 +120,7 @@ ink_hash_table_destroy_and_free_values(InkHashTable *ht_ptr)
 {
   ink_hash_table_map(ht_ptr, _ink_hash_table_free_entry_value);
   ink_hash_table_destroy(ht_ptr);
-  return (InkHashTable *)0;
+  return (InkHashTable *)nullptr;
 } /* End ink_hash_table_destroy_and_free_values */
 
 /*---------------------------------------------------------------------------*
@@ -138,7 +138,7 @@ ink_hash_table_isbound(InkHashTable *ht_ptr, const char *key)
   InkHashTableEntry *he_ptr;
 
   he_ptr = ink_hash_table_lookup_entry(ht_ptr, key);
-  return ((he_ptr == NULL) ? 0 : 1);
+  return ((he_ptr == nullptr) ? 0 : 1);
 } /* End ink_hash_table_isbound */
 
 /*---------------------------------------------------------------------------*
@@ -159,7 +159,7 @@ ink_hash_table_lookup(InkHashTable *ht_ptr, const char *key, InkHashTableValue *
   InkHashTableValue value;
 
   he_ptr = ink_hash_table_lookup_entry(ht_ptr, key);
-  if (he_ptr == NULL)
+  if (he_ptr == nullptr)
     return (0);
 
   value      = ink_hash_table_entry_value(ht_ptr, he_ptr);
@@ -201,7 +201,7 @@ ink_hash_table_delete(InkHashTable *ht_ptr, const char *key)
                                                  InkHashTableKey key)
 
   This routine takes a hash table  and a key , and returns the
-  entry matching the key, or NULL otherwise.
+  entry matching the key, or nullptr otherwise.
 
  *---------------------------------------------------------------------------*/
 
@@ -240,8 +240,8 @@ ink_hash_table_get_entry(InkHashTable *ht_ptr, const char *key, int *new_value)
   tcl_ht_ptr = (Tcl_HashTable *)ht_ptr;
   tcl_he_ptr = Tcl_CreateHashEntry(tcl_ht_ptr, key, new_value);
 
-  if (tcl_he_ptr == NULL) {
-    ink_fatal("%s: Tcl_CreateHashEntry returned NULL", "ink_hash_table_get_entry");
+  if (tcl_he_ptr == nullptr) {
+    ink_fatal("%s: Tcl_CreateHashEntry returned nullptr", "ink_hash_table_get_entry");
   }
 
   return ((InkHashTableEntry *)tcl_he_ptr);
@@ -308,7 +308,7 @@ ink_hash_table_map(InkHashTable *ht_ptr, InkHashTableEntryFunction map)
   InkHashTableEntry *e;
   InkHashTableIteratorState state;
 
-  for (e = ink_hash_table_iterator_first(ht_ptr, &state); e != NULL; e = ink_hash_table_iterator_next(ht_ptr, &state)) {
+  for (e = ink_hash_table_iterator_first(ht_ptr, &state); e != nullptr; e = ink_hash_table_iterator_next(ht_ptr, &state)) {
     retcode = (*map)(ht_ptr, e);
     if (retcode != 0)
       break;
diff --git a/lib/ts/ink_hash_table.h b/lib/ts/ink_hash_table.h
index 7ee263c777a..3b8f739b94b 100644
--- a/lib/ts/ink_hash_table.h
+++ b/lib/ts/ink_hash_table.h
@@ -121,7 +121,7 @@ ink_hash_table_iterator_first(InkHashTable *ht_ptr, InkHashTableIteratorState *s
 
   This routine takes a hash table  and a pointer to iterator state
   initialized by a previous call to InkHashTableIteratorFirst(), and returns
-  a pointer to the next InkHashTableEntry, or NULL if no entries remain.
+  a pointer to the next InkHashTableEntry, or nullptr if no entries remain.
 
  *---------------------------------------------------------------------------*/
 
diff --git a/lib/ts/ink_hrtime.cc b/lib/ts/ink_hrtime.cc
index b56730f193f..4c62d7694fa 100644
--- a/lib/ts/ink_hrtime.cc
+++ b/lib/ts/ink_hrtime.cc
@@ -125,8 +125,8 @@ int64_to_str(char *buf, unsigned int buf_size, int64_t val, unsigned int *total_
       memcpy(buf, out_buf, num_chars);
       out_buf = buf;
     } else {
-      // data does not fit return NULL
-      out_buf = NULL;
+      // data does not fit return nullptr
+      out_buf = nullptr;
     }
   }
 
@@ -171,7 +171,7 @@ uint32_t
 init_hrtime_TCS()
 {
   int freqlen = sizeof(hrtime_freq);
-  if (sysctlbyname("machdep.tsc_freq", &hrtime_freq, (size_t *)&freqlen, NULL, 0) < 0) {
+  if (sysctlbyname("machdep.tsc_freq", &hrtime_freq, (size_t *)&freqlen, nullptr, 0) < 0) {
     perror("sysctl: machdep.tsc_freq");
     exit(1);
   }
@@ -203,7 +203,7 @@ init_hrtime_basis()
 #else
     {
       struct timeval tnow;
-      ink_assert(!gettimeofday(&tnow, NULL));
+      ink_assert(!gettimeofday(&tnow, nullptr));
       timespec_basis.tv_sec  = tnow.tv_sec;
       timespec_basis.tv_nsec = tnow.tv_usec * 1000;
     }
diff --git a/lib/ts/ink_hrtime.h b/lib/ts/ink_hrtime.h
index 968ddbb0861..7d2ac3a3e4f 100644
--- a/lib/ts/ink_hrtime.h
+++ b/lib/ts/ink_hrtime.h
@@ -233,7 +233,7 @@ ink_get_hrtime_internal()
   return ink_hrtime_from_timespec(&ts);
 #else
   timeval tv;
-  gettimeofday(&tv, NULL);
+  gettimeofday(&tv, nullptr);
   return ink_hrtime_from_timeval(&tv);
 #endif
 }
@@ -272,7 +272,7 @@ static inline void
 ink_hrtime_sleep(ink_hrtime delay)
 {
   struct timespec ts = ink_hrtime_to_timespec(delay);
-  nanosleep(&ts, NULL);
+  nanosleep(&ts, nullptr);
 }
 
 #endif /* _ink_hrtime_h_ */
diff --git a/lib/ts/ink_inet.cc b/lib/ts/ink_inet.cc
index 5b37816dcdd..b5791b3ad64 100644
--- a/lib/ts/ink_inet.cc
+++ b/lib/ts/ink_inet.cc
@@ -52,9 +52,9 @@ ink_gethostbyname_r(char *hostname, ink_gethostbyname_r_data *data)
 #else // RENTRENT_GETHOSTBYNAME
 #if GETHOSTBYNAME_R_GLIBC2
 
-  struct hostent *addrp = NULL;
+  struct hostent *addrp = nullptr;
   int res               = gethostbyname_r(hostname, &data->ent, data->buf, INK_GETHOSTBYNAME_R_DATA_SIZE, &addrp, &data->herrno);
-  struct hostent *r     = NULL;
+  struct hostent *r     = nullptr;
   if (!res && addrp)
     r               = addrp;
 
@@ -69,8 +69,8 @@ struct hostent *
 ink_gethostbyaddr_r(char *ip, int len, int type, ink_gethostbyaddr_r_data *data)
 {
 #if GETHOSTBYNAME_R_GLIBC2
-  struct hostent *r     = NULL;
-  struct hostent *addrp = NULL;
+  struct hostent *r     = nullptr;
+  struct hostent *addrp = nullptr;
   int res = gethostbyaddr_r((char *)ip, len, type, &data->ent, data->buf, INK_GETHOSTBYNAME_R_DATA_SIZE, &addrp, &data->herrno);
   if (!res && addrp)
     r = addrp;
@@ -93,7 +93,7 @@ ink_inet_addr(const char *s)
   int n         = 0;
   uint32_t base = 10;
 
-  if (NULL == s) {
+  if (nullptr == s) {
     return htonl((uint32_t)-1);
   }
 
@@ -155,7 +155,7 @@ ink_inet_addr(const char *s)
 const char *
 ats_ip_ntop(const struct sockaddr *addr, char *dst, size_t size)
 {
-  const char *zret = 0;
+  const char *zret = nullptr;
 
   switch (addr->sa_family) {
   case AF_INET:
@@ -489,7 +489,7 @@ ats_ip_getbestaddrinfo(const char *host, IpEndpoint *ip4, IpEndpoint *ip6)
     ink_zero(ai_hints);
     ai_hints.ai_family = AF_UNSPEC;
     ai_hints.ai_flags  = AI_ADDRCONFIG;
-    zret               = getaddrinfo(addr_text.data(), 0, &ai_hints, &ai_result);
+    zret               = getaddrinfo(addr_text.data(), nullptr, &ai_hints, &ai_result);
 
     if (0 == zret) {
       // Walk the returned addresses and pick the "best".
@@ -502,8 +502,8 @@ ats_ip_getbestaddrinfo(const char *host, IpEndpoint *ip4, IpEndpoint *ip6)
         GL  // Global.
       } spot_type = NA,
         ip4_type = NA, ip6_type = NA;
-      sockaddr const *ip4_src = 0;
-      sockaddr const *ip6_src = 0;
+      sockaddr const *ip4_src = nullptr;
+      sockaddr const *ip6_src = nullptr;
 
       for (addrinfo *ai_spot = ai_result; ai_spot; ai_spot = ai_spot->ai_next) {
         sockaddr const *ai_ip = ai_spot->ai_addr;
@@ -595,18 +595,20 @@ REGRESSION_TEST(Ink_Inet)(RegressionTest *t, int /* atype */, int *pstatus)
 
   // Test ats_ip_parse() ...
   {
-    struct ip_parse_spec names[] = {{"::", "::", NULL, NULL},
-                                    {"[::1]:99", "::1", "99", NULL},
-                                    {"127.0.0.1:8080", "127.0.0.1", "8080", NULL},
-                                    {"127.0.0.1:8080-Bob", "127.0.0.1", "8080", "-Bob"},
-                                    {"127.0.0.1:", "127.0.0.1", NULL, ":"},
-                                    {"foo.example.com", "foo.example.com", NULL, NULL},
-                                    {"foo.example.com:99", "foo.example.com", "99", NULL},
-                                    {"ffee::24c3:3349:3cee:0143", "ffee::24c3:3349:3cee:0143", NULL, NULL},
-                                    {"fe80:88b5:4a:20c:29ff:feae:1c33:8080", "fe80:88b5:4a:20c:29ff:feae:1c33:8080", NULL, NULL},
-                                    {"[ffee::24c3:3349:3cee:0143]", "ffee::24c3:3349:3cee:0143", NULL, NULL},
-                                    {"[ffee::24c3:3349:3cee:0143]:80", "ffee::24c3:3349:3cee:0143", "80", NULL},
-                                    {"[ffee::24c3:3349:3cee:0143]:8080x", "ffee::24c3:3349:3cee:0143", "8080", "x"}};
+    struct ip_parse_spec names[] = {
+      {"::", "::", nullptr, nullptr},
+      {"[::1]:99", "::1", "99", nullptr},
+      {"127.0.0.1:8080", "127.0.0.1", "8080", nullptr},
+      {"127.0.0.1:8080-Bob", "127.0.0.1", "8080", "-Bob"},
+      {"127.0.0.1:", "127.0.0.1", nullptr, ":"},
+      {"foo.example.com", "foo.example.com", nullptr, nullptr},
+      {"foo.example.com:99", "foo.example.com", "99", nullptr},
+      {"ffee::24c3:3349:3cee:0143", "ffee::24c3:3349:3cee:0143", nullptr, nullptr},
+      {"fe80:88b5:4a:20c:29ff:feae:1c33:8080", "fe80:88b5:4a:20c:29ff:feae:1c33:8080", nullptr, nullptr},
+      {"[ffee::24c3:3349:3cee:0143]", "ffee::24c3:3349:3cee:0143", nullptr, nullptr},
+      {"[ffee::24c3:3349:3cee:0143]:80", "ffee::24c3:3349:3cee:0143", "80", nullptr},
+      {"[ffee::24c3:3349:3cee:0143]:8080x", "ffee::24c3:3349:3cee:0143", "8080", "x"},
+    };
 
     for (unsigned i = 0; i < countof(names); ++i) {
       ip_parse_spec const &s = names[i];
@@ -664,7 +666,7 @@ ats_tcp_somaxconn()
 
 /* Darwin version ... */
 #if HAVE_SYSCTLBYNAME
-  if (sysctlbyname("kern.ipc.somaxconn", NULL, NULL, &value, sizeof(value)) == 0) {
+  if (sysctlbyname("kern.ipc.somaxconn", nullptr, nullptr, &value, sizeof(value)) == 0) {
     return value;
   }
 #endif
@@ -674,7 +676,7 @@ ats_tcp_somaxconn()
     textBuffer text(0);
     text.slurp(fd);
     if (!text.empty()) {
-      value = strtoul(text.bufPtr(), NULL, 10);
+      value = strtoul(text.bufPtr(), nullptr, 10);
     }
     close(fd);
   }
diff --git a/lib/ts/ink_inet.h b/lib/ts/ink_inet.h
index a4b6de516ad..7264e50136f 100644
--- a/lib/ts/ink_inet.h
+++ b/lib/ts/ink_inet.h
@@ -126,7 +126,7 @@ struct ink_gethostbyaddr_r_data {
 
 /**
   Wrapper for gethostbyname_r(). If successful, returns a pointer
-  to the hostent structure. Returns NULL and sets data->herrno to
+  to the hostent structure. Returns nullptr and sets data->herrno to
   the appropriate error code on failure.
 
   @param hostname null-terminated host name string
@@ -137,7 +137,7 @@ struct hostent *ink_gethostbyname_r(char *hostname, ink_gethostbyname_r_data *da
 
 /**
   Wrapper for gethostbyaddr_r(). If successful, returns a pointer
-  to the hostent structure. Returns NULL and sets data->herrno to
+  to the hostent structure. Returns nullptr and sets data->herrno to
   the appropriate error code on failure.
 
   @param ip IP address of the host
@@ -160,7 +160,7 @@ int ats_tcp_somaxconn();
     @code
       [FE80:9312::192:168:1:1]:80
     @endcode
-    @a addr or @a port can be @c NULL in which case that value isn't returned.
+    @a addr or @a port can be @c nullptr in which case that value isn't returned.
 
     @return 0 if an address was found, non-zero otherwise.
 */
@@ -211,7 +211,7 @@ ats_ip_invalidate(IpEndpoint *ip)
 }
 
 /** Get a string name for an IP address family.
-    @return The string name (never @c NULL).
+    @return The string name (never @c nullptr).
 */
 const char *ats_ip_family_name(int family);
 
@@ -562,7 +562,7 @@ ats_ip6_addr_cast(IpEndpoint const *ip)
 /** Cast an IP address to an array of @c uint32_t.
     @note The size of the array is dependent on the address type which
     must be checked independently of this function.
-    @return A pointer to the address information in @a addr or @c NULL
+    @return A pointer to the address information in @a addr or @c nullptr
     if @a addr is not an IP address.
 */
 inline uint32_t *
@@ -588,7 +588,7 @@ ats_ip_addr32_cast(sockaddr const *addr)
 /** Cast an IP address to an array of @c uint8_t.
     @note The size of the array is dependent on the address type which
     must be checked independently of this function.
-    @return A pointer to the address information in @a addr or @c NULL
+    @return A pointer to the address information in @a addr or @c nullptr
     if @a addr is not an IP address.
     @see ats_ip_addr_size
 */
@@ -1131,8 +1131,8 @@ ats_ip_pton(const char *text, ///< [in] text.
     addresses and not just get the "best", use @c getaddrinfo
     directly.
 
-    @a ip4 or @a ip6 can be @c NULL and the result for that family is
-    discarded. It is legal for both to be @c NULL in which case this
+    @a ip4 or @a ip6 can be @c nullptr and the result for that family is
+    discarded. It is legal for both to be @c nullptr in which case this
     is just a format check.
 
     @return 0 if an address was found, non-zero otherwise.
@@ -1197,7 +1197,7 @@ struct IpAddr {
   /// Construct from @c IpEndpoint.
   explicit IpAddr(IpEndpoint const *addr) { this->assign(&addr->sa); }
   /// Assign sockaddr storage.
-  self &assign(sockaddr const *addr ///< May be @c NULL
+  self &assign(sockaddr const *addr ///< May be @c nullptr
                );
 
   /// Assign from end point.
diff --git a/lib/ts/ink_lockfile.h b/lib/ts/ink_lockfile.h
index 5f5e74fca10..14687bc6284 100644
--- a/lib/ts/ink_lockfile.h
+++ b/lib/ts/ink_lockfile.h
@@ -82,8 +82,8 @@ class Lockfile
   //
   // The intial signal can be used to generate a core from the process while
   // still ensuring it dies.
-  void Kill(int sig, int initial_sig = 0, const char *pname = NULL);
-  void KillGroup(int sig, int initial_sig = 0, const char *pname = NULL);
+  void Kill(int sig, int initial_sig = 0, const char *pname = nullptr);
+  void KillGroup(int sig, int initial_sig = 0, const char *pname = nullptr);
 
 private:
   char fname[PATH_NAME_MAX];
diff --git a/lib/ts/ink_memory.cc b/lib/ts/ink_memory.cc
index 47fdd188077..e17819e368c 100644
--- a/lib/ts/ink_memory.cc
+++ b/lib/ts/ink_memory.cc
@@ -44,19 +44,19 @@
 void *
 ats_malloc(size_t size)
 {
-  void *ptr = NULL;
+  void *ptr = nullptr;
 
   /*
    * There's some nasty code in libts that expects
    * a MALLOC of a zero-sized item to work properly. Rather
-   * than allocate any space, we simply return a NULL to make
+   * than allocate any space, we simply return a nullptr to make
    * certain they die quickly & don't trash things.
    */
 
   // Useful for tracing bad mallocs
   // ink_stack_trace_dump();
   if (likely(size > 0)) {
-    if (unlikely((ptr = malloc(size)) == NULL)) {
+    if (unlikely((ptr = malloc(size)) == nullptr)) {
       ink_abort("couldn't allocate %zu bytes", size);
     }
   }
@@ -67,7 +67,7 @@ void *
 ats_calloc(size_t nelem, size_t elsize)
 {
   void *ptr = calloc(nelem, elsize);
-  if (unlikely(ptr == NULL)) {
+  if (unlikely(ptr == nullptr)) {
     ink_abort("couldn't allocate %zu %zu byte elements", nelem, elsize);
   }
   return ptr;
@@ -77,7 +77,7 @@ void *
 ats_realloc(void *ptr, size_t size)
 {
   void *newptr = realloc(ptr, size);
-  if (unlikely(newptr == NULL)) {
+  if (unlikely(newptr == nullptr)) {
     ink_abort("couldn't reallocate %zu bytes", size);
   }
   return newptr;
@@ -112,7 +112,7 @@ ats_memalign(size_t alignment, size_t size)
   }
 #else
   ptr = memalign(alignment, size);
-  if (unlikely(ptr == NULL)) {
+  if (unlikely(ptr == nullptr)) {
     ink_abort("couldn't allocate %zu bytes at alignment %zu", size, alignment);
   }
 #endif
@@ -122,16 +122,16 @@ ats_memalign(size_t alignment, size_t size)
 void
 ats_free(void *ptr)
 {
-  if (likely(ptr != NULL))
+  if (likely(ptr != nullptr))
     free(ptr);
 } /* End ats_free */
 
 void *
 ats_free_null(void *ptr)
 {
-  if (likely(ptr != NULL))
+  if (likely(ptr != nullptr))
     free(ptr);
-  return NULL;
+  return nullptr;
 } /* End ats_free_null */
 
 void
@@ -243,7 +243,7 @@ ats_track_realloc(void *ptr, size_t size, uint64_t *alloc_stat, uint64_t *free_s
 void
 ats_track_free(void *ptr, uint64_t *stat)
 {
-  if (ptr == NULL) {
+  if (ptr == nullptr) {
     return;
   }
 
@@ -275,5 +275,5 @@ _xstrdup(const char *str, int length, const char * /* path ATS_UNUSED */)
     }
     return newstr;
   }
-  return NULL;
+  return nullptr;
 }
diff --git a/lib/ts/ink_memory.h b/lib/ts/ink_memory.h
index 5a53bbfb787..2eb08d89de4 100644
--- a/lib/ts/ink_memory.h
+++ b/lib/ts/ink_memory.h
@@ -119,8 +119,8 @@ static inline size_t __attribute__((const)) ats_pagesize(void)
 /* Some convenience wrappers around strdup() functionality */
 char *_xstrdup(const char *str, int length, const char *path);
 
-#define ats_strdup(p) _xstrdup((p), -1, NULL)
-#define ats_strndup(p, n) _xstrdup((p), n, NULL)
+#define ats_strdup(p) _xstrdup((p), -1, nullptr)
+#define ats_strndup(p, n) _xstrdup((p), n, nullptr)
 
 #ifdef __cplusplus
 }
@@ -390,7 +390,7 @@ struct SCOPED_MALLOC_TRAITS {
   static T *
   initValue()
   {
-    return NULL;
+    return nullptr;
   }
   static bool
   isValid(T *t)
@@ -412,7 +412,7 @@ struct SCOPED_OBJECT_TRAITS {
   static T *
   initValue()
   {
-    return NULL;
+    return nullptr;
   }
   static bool
   isValid(T *t)
diff --git a/lib/ts/ink_mutex.h b/lib/ts/ink_mutex.h
index a01e94344b8..9d6f78ad7ab 100644
--- a/lib/ts/ink_mutex.h
+++ b/lib/ts/ink_mutex.h
@@ -67,7 +67,7 @@ ink_mutex_init(ink_mutex *m, const char *name)
   (void)name;
 
 #if defined(solaris)
-  if (pthread_mutex_init(m, NULL) != 0) {
+  if (pthread_mutex_init(m, nullptr) != 0) {
     abort();
   }
 #else
diff --git a/lib/ts/ink_queue.cc b/lib/ts/ink_queue.cc
index 68575d8a533..2d2dde83d79 100644
--- a/lib/ts/ink_queue.cc
+++ b/lib/ts/ink_queue.cc
@@ -88,7 +88,7 @@ static const ink_freelist_ops malloc_ops   = {malloc_new, malloc_free, malloc_bu
 static const ink_freelist_ops freelist_ops = {freelist_new, freelist_free, freelist_bulkfree};
 static const ink_freelist_ops *default_ops = &freelist_ops;
 
-static ink_freelist_list *freelists                  = NULL;
+static ink_freelist_list *freelists                  = nullptr;
 static const ink_freelist_ops *freelist_freelist_ops = default_ops;
 
 const InkFreeListOps *
@@ -196,9 +196,9 @@ freelist_new(InkFreeList *f)
 
   do {
     INK_QUEUE_LD(item, f->head);
-    if (TO_PTR(FREELIST_POINTER(item)) == NULL) {
+    if (TO_PTR(FREELIST_POINTER(item)) == nullptr) {
       uint32_t i;
-      void *newp        = NULL;
+      void *newp        = nullptr;
       size_t alloc_size = f->chunk_size * f->type_size;
       size_t alignment  = 0;
 
@@ -207,7 +207,7 @@ freelist_new(InkFreeList *f)
         newp      = ats_alloc_hugepage(alloc_size);
       }
 
-      if (newp == NULL) {
+      if (newp == nullptr) {
         alignment = ats_pagesize();
         newp      = ats_memalign(alignment, INK_ALIGN(alloc_size, alignment));
       }
@@ -252,7 +252,7 @@ freelist_new(InkFreeList *f)
 static void *
 malloc_new(InkFreeList *f)
 {
-  void *newp = NULL;
+  void *newp = nullptr;
 
   if (f->alignment)
     newp = ats_memalign(f->alignment, f->type_size);
@@ -265,7 +265,7 @@ malloc_new(InkFreeList *f)
 void
 ink_freelist_free(InkFreeList *f, void *item)
 {
-  if (likely(item != NULL)) {
+  if (likely(item != nullptr)) {
     ink_assert(f->used != 0);
     freelist_freelist_ops->fl_free(f, item);
     ink_atomic_decrement((int *)&f->used, 1);
@@ -407,7 +407,7 @@ void
 ink_freelists_dump_baselinerel(FILE *f)
 {
   ink_freelist_list *fll;
-  if (f == NULL)
+  if (f == nullptr)
     f = stderr;
 
   fprintf(f, "     allocated      |       in-use       |  count  | type size  |   free list name\n");
@@ -432,7 +432,7 @@ void
 ink_freelists_dump(FILE *f)
 {
   ink_freelist_list *fll;
-  if (f == NULL)
+  if (f == nullptr)
     f = stderr;
 
   fprintf(f, "     Allocated      |        In-Use      | Type Size  |   Free List Name\n");
@@ -469,14 +469,14 @@ ink_atomiclist_pop(InkAtomicList *l)
   int result = 0;
   do {
     INK_QUEUE_LD(item, l->head);
-    if (TO_PTR(FREELIST_POINTER(item)) == NULL)
-      return NULL;
+    if (TO_PTR(FREELIST_POINTER(item)) == nullptr)
+      return nullptr;
     SET_FREELIST_POINTER_VERSION(next, *ADDRESS_OF_NEXT(TO_PTR(FREELIST_POINTER(item)), l->offset), FREELIST_VERSION(item) + 1);
     result = ink_atomic_cas(&l->head.data, item.data, next.data);
   } while (result == 0);
   {
     void *ret = TO_PTR(FREELIST_POINTER(item));
-    *ADDRESS_OF_NEXT(ret, l->offset) = NULL;
+    *ADDRESS_OF_NEXT(ret, l->offset) = nullptr;
     return ret;
   }
 }
@@ -489,9 +489,9 @@ ink_atomiclist_popall(InkAtomicList *l)
   int result = 0;
   do {
     INK_QUEUE_LD(item, l->head);
-    if (TO_PTR(FREELIST_POINTER(item)) == NULL)
-      return NULL;
-    SET_FREELIST_POINTER_VERSION(next, FROM_PTR(NULL), FREELIST_VERSION(item) + 1);
+    if (TO_PTR(FREELIST_POINTER(item)) == nullptr)
+      return nullptr;
+    SET_FREELIST_POINTER_VERSION(next, FROM_PTR(nullptr), FREELIST_VERSION(item) + 1);
     result = ink_atomic_cas(&l->head.data, item.data, next.data);
   } while (result == 0);
   {
@@ -514,7 +514,7 @@ ink_atomiclist_push(InkAtomicList *l, void *item)
   head_p head;
   head_p item_pair;
   int result       = 0;
-  volatile void *h = NULL;
+  volatile void *h = nullptr;
   do {
     INK_QUEUE_LD(head, l->head);
     h            = FREELIST_POINTER(head);
@@ -532,7 +532,7 @@ void *
 ink_atomiclist_remove(InkAtomicList *l, void *item)
 {
   head_p head;
-  void *prev       = NULL;
+  void *prev       = nullptr;
   void **addr_next = ADDRESS_OF_NEXT(item, l->offset);
   void *item_next  = *addr_next;
   int result       = 0;
@@ -547,7 +547,7 @@ ink_atomiclist_remove(InkAtomicList *l, void *item)
     result = ink_atomic_cas(&l->head.data, head.data, next.data);
 
     if (result) {
-      *addr_next = NULL;
+      *addr_next = nullptr;
       return item;
     }
     INK_QUEUE_LD(head, l->head);
@@ -564,9 +564,9 @@ ink_atomiclist_remove(InkAtomicList *l, void *item)
     if (prev == item) {
       ink_assert(prev_prev != item_next);
       *prev_adr_of_next = item_next;
-      *addr_next        = NULL;
+      *addr_next        = nullptr;
       return item;
     }
   }
-  return NULL;
+  return nullptr;
 }
diff --git a/lib/ts/ink_res_init.cc b/lib/ts/ink_res_init.cc
index b1861bb1f22..71f1597be26 100644
--- a/lib/ts/ink_res_init.cc
+++ b/lib/ts/ink_res_init.cc
@@ -260,7 +260,7 @@ ink_res_randomid(void)
 {
   struct timeval now;
 
-  gettimeofday(&now, NULL);
+  gettimeofday(&now, nullptr);
   return (0xffff & (now.tv_sec ^ now.tv_usec ^ getpid()));
 }
 
@@ -292,7 +292,7 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
              IpEndpoint const *pHostList, ///< Additional servers.
              size_t pHostListSize,        ///< # of entries in @a pHostList.
              int dnsSearch,               /// Option of search_default_domains.
-             const char *pDefDomain,      ///< Default domain (may be NULL).
+             const char *pDefDomain,      ///< Default domain (may be nullptr).
              const char *pSearchList,     ///< Unknown
              const char *pResolvConf      ///< Path to configuration file.
              )
@@ -320,8 +320,8 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
   statp->pfcode  = 0;
   statp->_vcsock = -1;
   statp->_flags  = 0;
-  statp->qhook   = NULL;
-  statp->rhook   = NULL;
+  statp->qhook   = nullptr;
+  statp->rhook   = nullptr;
 
 #ifdef SOLARIS2
   /*
@@ -336,14 +336,14 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
       if (buf[0] == '+')
         buf[0] = '.';
       cp       = strchr(buf, '.');
-      cp       = (cp == NULL) ? buf : (cp + 1);
+      cp       = (cp == nullptr) ? buf : (cp + 1);
       ink_strlcpy(statp->defdname, cp, sizeof(statp->defdname));
     }
   }
 #endif /* SOLARIS2 */
 
   /* Allow user to override the local domain definition */
-  if ((cp = getenv("LOCALDOMAIN")) != NULL) {
+  if ((cp = getenv("LOCALDOMAIN")) != nullptr) {
     (void)ink_strlcpy(statp->defdname, cp, sizeof(statp->defdname));
     haveenv++;
 
@@ -373,7 +373,7 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
     while (*cp != '\0' && *cp != ' ' && *cp != '\t' && *cp != '\n')
       cp++;
     *cp   = '\0';
-    *pp++ = 0;
+    *pp++ = nullptr;
   }
 
   /* ---------------------------------------------
@@ -387,12 +387,12 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
 
   if (pDefDomain && '\0' != *pDefDomain && '\n' != *pDefDomain) {
     ink_strlcpy(statp->defdname, pDefDomain, sizeof(statp->defdname));
-    if ((cp = strpbrk(statp->defdname, " \t\n")) != NULL)
+    if ((cp = strpbrk(statp->defdname, " \t\n")) != nullptr)
       *cp = '\0';
   }
   if (pSearchList && '\0' != *pSearchList && '\n' != *pSearchList) {
     ink_strlcpy(statp->defdname, pSearchList, sizeof(statp->defdname));
-    if ((cp = strchr(statp->defdname, '\n')) != NULL)
+    if ((cp = strchr(statp->defdname, '\n')) != nullptr)
       *cp = '\0';
     /*
      * Set search list to be blank-separated strings
@@ -414,7 +414,7 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
     while (*cp != '\0' && *cp != ' ' && *cp != '\t')
       cp++;
     *cp        = '\0';
-    *pp++      = 0;
+    *pp++      = nullptr;
     havesearch = 1;
   }
 
@@ -432,9 +432,9 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
 #define MATCH(line, name) \
   (!strncmp(line, name, sizeof(name) - 1) && (line[sizeof(name) - 1] == ' ' || line[sizeof(name) - 1] == '\t'))
 
-  if ((fp = fopen(pResolvConf, "r")) != NULL) {
+  if ((fp = fopen(pResolvConf, "r")) != nullptr) {
     /* read the config file */
-    while (fgets(buf, sizeof(buf), fp) != NULL) {
+    while (fgets(buf, sizeof(buf), fp) != nullptr) {
       /* skip comments */
       if (*buf == ';' || *buf == '#')
         continue;
@@ -448,7 +448,7 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
         if ((*cp == '\0') || (*cp == '\n'))
           continue;
         ink_strlcpy(statp->defdname, cp, sizeof(statp->defdname));
-        if ((cp = strpbrk(statp->defdname, " \t\n")) != NULL)
+        if ((cp = strpbrk(statp->defdname, " \t\n")) != nullptr)
           *cp      = '\0';
         havesearch = 0;
         continue;
@@ -463,7 +463,7 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
         if ((*cp == '\0') || (*cp == '\n'))
           continue;
         ink_strlcpy(statp->defdname, cp, sizeof(statp->defdname));
-        if ((cp = strchr(statp->defdname, '\n')) != NULL)
+        if ((cp = strchr(statp->defdname, '\n')) != nullptr)
           *cp = '\0';
         /*
          * Set search list to be blank-separated strings
@@ -485,7 +485,7 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
         while (*cp != '\0' && *cp != ' ' && *cp != '\t')
           cp++;
         *cp        = '\0';
-        *pp++      = 0;
+        *pp++      = nullptr;
         havesearch = 1;
         continue;
       }
@@ -517,14 +517,14 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
   if (nserv > 0)
     statp->nscount = nserv;
 
-  if (statp->defdname[0] == 0 && gethostname(buf, sizeof(statp->defdname) - 1) == 0 && (cp = strchr(buf, '.')) != NULL)
+  if (statp->defdname[0] == 0 && gethostname(buf, sizeof(statp->defdname) - 1) == 0 && (cp = strchr(buf, '.')) != nullptr)
     ink_strlcpy(statp->defdname, cp + 1, sizeof(statp->defdname));
 
   /* find components of local domain that might be searched */
   if (havesearch == 0) {
     pp    = statp->dnsrch;
     *pp++ = statp->defdname;
-    *pp   = NULL;
+    *pp   = nullptr;
 
     if (dnsSearch == 1) {
       dots = 0;
@@ -539,7 +539,7 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
         *pp++ = cp;
         dots--;
       }
-      *pp = NULL;
+      *pp = nullptr;
     }
 #ifdef DEBUG
     if (statp->options & INK_RES_DEBUG) {
@@ -554,7 +554,7 @@ ink_res_init(ink_res_state statp,         ///< State object to update.
   /* export all ns servers to DNSprocessor. */
   ink_res_setservers(statp, &statp->nsaddr_list[0], statp->nscount);
 
-  if ((cp = getenv("RES_OPTIONS")) != NULL)
+  if ((cp = getenv("RES_OPTIONS")) != nullptr)
     ink_res_setoptions(statp, cp, "env");
   statp->options |= INK_RES_INIT;
   return (statp->res_h_errno);
diff --git a/lib/ts/ink_res_mkquery.cc b/lib/ts/ink_res_mkquery.cc
index c4892cf946a..f1e6f2cd713 100644
--- a/lib/ts/ink_res_mkquery.cc
+++ b/lib/ts/ink_res_mkquery.cc
@@ -105,7 +105,7 @@ int ink_res_mkquery(ink_res_state statp, int op,               /*!< opcode of qu
   /*
    * Initialize header fields.
    */
-  if ((buf == NULL) || (buflen < HFIXEDSZ))
+  if ((buf == nullptr) || (buflen < HFIXEDSZ))
     return (-1);
   memset(buf, 0, HFIXEDSZ);
   hp         = (HEADER *)buf;
@@ -117,7 +117,7 @@ int ink_res_mkquery(ink_res_state statp, int op,               /*!< opcode of qu
   ep         = buf + buflen;
   dpp        = dnptrs;
   *dpp++     = buf;
-  *dpp++     = NULL;
+  *dpp++     = nullptr;
   lastdnptr  = dnptrs + sizeof dnptrs / sizeof dnptrs[0];
   /*
    * perform opcode specific processing
@@ -133,7 +133,7 @@ int ink_res_mkquery(ink_res_state statp, int op,               /*!< opcode of qu
     NS_PUT16(type, cp);
     NS_PUT16(_class, cp);
     hp->qdcount = htons(1);
-    if (op == QUERY || data == NULL)
+    if (op == QUERY || data == nullptr)
       break;
     /*
      * Make an additional record for completion domain.
@@ -346,7 +346,7 @@ ink_ns_name_ntop(const u_char *src, char *dst, size_t dstsiz)
       dn += m;
       continue;
     }
-    for ((void)NULL; l > 0; l--) {
+    for ((void)nullptr; l > 0; l--) {
       c = *cp++;
       if (special(c)) {
         if (dn + 1 >= eom) {
@@ -452,7 +452,7 @@ ns_name_ntop(const u_char *src, char *dst, size_t dstsiz)
       dn += m;
       continue;
     }
-    for ((void)NULL; l > 0; l--) {
+    for ((void)nullptr; l > 0; l--) {
       c = *cp++;
       if (special(c)) {
         if (dn + 1 >= eom) {
diff --git a/lib/ts/ink_resolver.h b/lib/ts/ink_resolver.h
index eeff079dbd4..f9a7c400520 100644
--- a/lib/ts/ink_resolver.h
+++ b/lib/ts/ink_resolver.h
@@ -266,8 +266,8 @@ struct ts_imp_res_state {
 };
 typedef ts_imp_res_state *ink_res_state;
 
-int ink_res_init(ink_res_state, IpEndpoint const *pHostList, size_t pHostListSize, int dnsSearch, const char *pDefDomain = NULL,
-                 const char *pSearchList = NULL, const char *pResolvConf = NULL);
+int ink_res_init(ink_res_state, IpEndpoint const *pHostList, size_t pHostListSize, int dnsSearch, const char *pDefDomain = nullptr,
+                 const char *pSearchList = nullptr, const char *pResolvConf = NULL);
 
 int ink_res_mkquery(ink_res_state, int, const char *, int, int, const unsigned char *, int, const unsigned char *, unsigned char *,
                     int);
diff --git a/lib/ts/ink_resource.cc b/lib/ts/ink_resource.cc
index f13df8bce27..5baf79f6754 100644
--- a/lib/ts/ink_resource.cc
+++ b/lib/ts/ink_resource.cc
@@ -39,7 +39,7 @@ ink_mutex ResourceTracker::resourceLock = PTHREAD_MUTEX_INITIALIZER;
 class Resource
 {
 public:
-  Resource() : _incrementCount(0), _decrementCount(0), _value(0), _symbol(NULL) { _name[0] = '\0'; }
+  Resource() : _incrementCount(0), _decrementCount(0), _value(0), _symbol(nullptr) { _name[0] = '\0'; }
   void increment(const int64_t size);
   int64_t
   getValue() const
@@ -119,7 +119,7 @@ void
 ResourceTracker::increment(const void *symbol, const int64_t size, const char *name)
 {
   Resource &resource = lookup((const char *)symbol);
-  if (resource.getSymbol() == NULL && name != NULL) {
+  if (resource.getSymbol() == nullptr && name != nullptr) {
     resource.setName(symbol, name);
     resource.setSymbol(symbol);
   }
@@ -129,7 +129,7 @@ ResourceTracker::increment(const void *symbol, const int64_t size, const char *n
 Resource &
 ResourceTracker::lookup(const char *name)
 {
-  Resource *resource = NULL;
+  Resource *resource = nullptr;
   ink_mutex_acquire(&resourceLock);
   std::map::iterator it = _resourceMap.find(name);
   if (it != _resourceMap.end()) {
@@ -140,7 +140,7 @@ ResourceTracker::lookup(const char *name)
     _resourceMap[name] = resource;
   }
   ink_mutex_release(&resourceLock);
-  ink_release_assert(resource != NULL);
+  ink_release_assert(resource != nullptr);
   return *resource;
 }
 
diff --git a/lib/ts/ink_rwlock.cc b/lib/ts/ink_rwlock.cc
index c92abee4c85..f5943aca6b0 100644
--- a/lib/ts/ink_rwlock.cc
+++ b/lib/ts/ink_rwlock.cc
@@ -34,7 +34,7 @@ ink_rwlock_init(ink_rwlock *rw)
 {
   int result;
 
-  if ((result = ink_mutex_init(&rw->rw_mutex, NULL)) != 0)
+  if ((result = ink_mutex_init(&rw->rw_mutex, nullptr)) != 0)
     goto Lerror;
 
   ink_cond_init(&rw->rw_condreaders);
diff --git a/lib/ts/ink_sprintf.cc b/lib/ts/ink_sprintf.cc
index 016c43824c8..b6ced6e3470 100644
--- a/lib/ts/ink_sprintf.cc
+++ b/lib/ts/ink_sprintf.cc
@@ -44,7 +44,7 @@
 //      behavior:
 //
 //      (1) the length in output characters is returned, including final NUL
-//      (2) buffer can be NULL, for just counting the output chars
+//      (2) buffer can be nullptr, for just counting the output chars
 //      (3) only %s and %d are supported, with no field modifiers
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/lib/ts/ink_string++.cc b/lib/ts/ink_string++.cc
index b599120951b..7e3509fc622 100644
--- a/lib/ts/ink_string++.cc
+++ b/lib/ts/ink_string++.cc
@@ -50,7 +50,7 @@ StrList::dump(FILE *fp)
 {
   Str *str;
 
-  for (str = head; str != NULL; str = str->next)
+  for (str = head; str != nullptr; str = str->next)
     str->dump(fp);
 }
 
@@ -69,8 +69,8 @@ StrList::_new_cell(const char *s, int len_not_counting_nul)
     cell = &(base_cells[cells_allocated]);
   } else {
     p = (char *)alloc(sizeof(Str) + 7);
-    if (p == NULL)
-      return (NULL);                            // FIX: scale heap
+    if (p == nullptr)
+      return (nullptr);                         // FIX: scale heap
     p    = (char *)((((uintptr_t)p) + 7) & ~7); // round up to multiple of 8
     cell = (Str *)p;
   }
@@ -79,8 +79,8 @@ StrList::_new_cell(const char *s, int len_not_counting_nul)
   // are we supposed to copy the string?
   if (copy_when_adding_string) {
     char *buf = (char *)alloc(l + 1);
-    if (buf == NULL)
-      return (NULL); // FIX: need to grow heap!
+    if (buf == nullptr)
+      return (nullptr); // FIX: need to grow heap!
     memcpy(buf, s, l);
     buf[l] = '\0';
 
@@ -124,7 +124,7 @@ const int overflow_head_hdr_size = INK_ALIGN(sizeof(StrListOverflow), INIT_OVERF
 void
 StrListOverflow::init()
 {
-  next      = NULL;
+  next      = nullptr;
   heap_size = 0;
   heap_used = 0;
 }
@@ -153,7 +153,7 @@ StrListOverflow::alloc(int size, StrListOverflow **new_heap_ptr)
       ink_release_assert(new_heap_size >= size);
     }
 
-    ink_assert(next == NULL);
+    ink_assert(next == nullptr);
     *new_heap_ptr = next = create_heap(new_heap_size);
     return next->alloc(size, new_heap_ptr);
   }
diff --git a/lib/ts/ink_string++.h b/lib/ts/ink_string++.h
index 1db17d075d9..f0ff41aa64c 100644
--- a/lib/ts/ink_string++.h
+++ b/lib/ts/ink_string++.h
@@ -47,29 +47,29 @@ struct Str {
   struct Str *next; // next in list
   struct Str *prev; // prev in list
 
-  Str() : str(NULL), len(0), next(NULL), prev(NULL) {}
+  Str() : str(nullptr), len(0), next(NULL), prev(NULL) {}
   Str(char *s)
   {
     str  = s;
     len  = strlen(s);
-    next = NULL;
-    prev = NULL;
+    next = nullptr;
+    prev = nullptr;
   }
   Str(char *s, int l)
   {
     str  = s;
     len  = l;
-    next = NULL;
-    prev = NULL;
+    next = nullptr;
+    prev = nullptr;
   }
 
   void
   clean()
   {
-    str  = NULL;
+    str  = nullptr;
     len  = 0;
-    next = NULL;
-    prev = NULL;
+    next = nullptr;
+    prev = nullptr;
   }
 
   void
@@ -148,11 +148,11 @@ StrList::init()
 {
   count           = 0;
   cells_allocated = 0;
-  head = tail      = NULL;
+  head = tail      = nullptr;
   base_heap_size   = STRLIST_BASE_HEAP_SIZE;
   base_heap_used   = 0;
-  overflow_first   = NULL;
-  overflow_current = NULL;
+  overflow_first   = nullptr;
+  overflow_current = nullptr;
 }
 
 inline void
@@ -185,14 +185,14 @@ StrList::base_heap_alloc(int size)
     base_heap_used += size;
     return ((void *)p);
   } else
-    return (NULL);
+    return (nullptr);
 }
 
 inline void *
 StrList::alloc(int size)
 {
   void *p = base_heap_alloc(size);
-  if (p == NULL)
+  if (p == nullptr)
     p = overflow_heap_alloc(size);
   return (p);
 }
@@ -219,22 +219,22 @@ StrList::get_idx(int i)
 {
   Str *s;
 
-  for (s = head; ((s != NULL) && i); s = s->next, i--)
+  for (s = head; ((s != nullptr) && i); s = s->next, i--)
     ;
-  return ((i == 0) ? s : NULL);
+  return ((i == 0) ? s : nullptr);
 }
 
 inline void
 StrList::append(Str *str)
 {
-  // do nothing if str is NULL to avoid pointer chasing below
-  if (str == NULL)
+  // do nothing if str is nullptr to avoid pointer chasing below
+  if (str == nullptr)
     return;
   ++count;
-  str->next = NULL;
+  str->next = nullptr;
   str->prev = tail;
 
-  if (tail == NULL) {
+  if (tail == nullptr) {
     head = tail = str;
   } else {
     tail->next = str;
@@ -245,13 +245,13 @@ StrList::append(Str *str)
 inline void
 StrList::prepend(Str *str)
 {
-  if (str == NULL)
+  if (str == nullptr)
     return;
   ++count;
   str->next = head;
-  str->prev = NULL;
+  str->prev = nullptr;
 
-  if (tail == NULL) {
+  if (tail == nullptr) {
     head = tail = str;
   } else {
     head->prev = str;
@@ -262,7 +262,7 @@ StrList::prepend(Str *str)
 inline void
 StrList::add_after(Str *prev, Str *str)
 {
-  if (str == NULL || prev == NULL)
+  if (str == nullptr || prev == NULL)
     return;
   ++count;
   str->next  = prev->next;
@@ -275,7 +275,7 @@ StrList::add_after(Str *prev, Str *str)
 inline void
 StrList::detach(Str *str)
 {
-  if (str == NULL)
+  if (str == nullptr)
     return;
   --count;
 
diff --git a/lib/ts/ink_string.cc b/lib/ts/ink_string.cc
index 3ff577db24d..a386c16dcaa 100644
--- a/lib/ts/ink_string.cc
+++ b/lib/ts/ink_string.cc
@@ -48,7 +48,7 @@ ink_memcpy_until_char(char *dst, char *src, unsigned int n, unsigned char c)
 
   This routine concatenates a variable number of strings into the buffer
   , returning the pointer to .  The sequence of strings must end
-  with NULL.
+  with nullptr.
 
  *---------------------------------------------------------------------------*/
 
@@ -64,7 +64,7 @@ ink_string_concatenate_strings(char *dest, ...)
 
   while (1) {
     s = va_arg(ap, char *);
-    if (s == NULL)
+    if (s == nullptr)
       break;
 
     while (*s)
@@ -81,7 +81,7 @@ ink_string_concatenate_strings(char *dest, ...)
 
   This routine concatenates a variable number of strings into the buffer
   , returning the pointer to .  The sequence of strings must end
-  with NULL.  A NUL will always be placed after , and no more than
+  with nullptr.  A NUL will always be placed after , and no more than
    - 1 characters will ever be written to .
 
  *---------------------------------------------------------------------------*/
@@ -98,7 +98,7 @@ ink_string_concatenate_strings_n(char *dest, int n, ...)
 
   while (n > 1) {
     s = va_arg(ap, char *);
-    if (s == NULL)
+    if (s == nullptr)
       break;
     while (*s && (n > 1)) {
       *d++ = *s++;
@@ -126,8 +126,8 @@ ink_string_append(char *dest, char *src, int n)
 {
   char *d, *s, *last_valid_char;
 
-  ink_assert(src != NULL);
-  ink_assert(dest != NULL);
+  ink_assert(src != nullptr);
+  ink_assert(dest != nullptr);
   ink_assert(n >= 0);
 
   if (n == 0)
diff --git a/lib/ts/ink_string.h b/lib/ts/ink_string.h
index d84cd643b7c..8885ebceac1 100644
--- a/lib/ts/ink_string.h
+++ b/lib/ts/ink_string.h
@@ -130,7 +130,7 @@ ptr_len_str(const char *p1, int l1, const char *str)
 {
   if (str && str[0]) {
     int str_index           = 0;
-    const char *match_start = NULL;
+    const char *match_start = nullptr;
 
     while (l1 > 0) {
       if (*p1 == str[str_index]) {
@@ -154,7 +154,7 @@ ptr_len_str(const char *p1, int l1, const char *str)
       l1--;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 // int ptr_len_ncmp(const char* p1, int l1, const char* str, int n) {
@@ -299,7 +299,7 @@ ptr_len_pbrk(const char *p1, int l1, const char *str)
     l1--;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 // Specialized "itoa", that is optimized for small integers, and use snprintf() otherwise.
diff --git a/lib/ts/ink_syslog.cc b/lib/ts/ink_syslog.cc
index 6edd75d3ae5..ce6891a4705 100644
--- a/lib/ts/ink_syslog.cc
+++ b/lib/ts/ink_syslog.cc
@@ -58,7 +58,7 @@ static const int convert_table_size = sizeof(convert_table) / sizeof(syslog_fac)
 int
 facility_string_to_int(const char *str)
 {
-  if (str == NULL) {
+  if (str == nullptr) {
     return -1;
   }
   // Loop Through to see if the string has a valid conversion
diff --git a/lib/ts/ink_thread.h b/lib/ts/ink_thread.h
index 1fbc4e2ec86..3e2519df9fb 100644
--- a/lib/ts/ink_thread.h
+++ b/lib/ts/ink_thread.h
@@ -184,6 +184,12 @@ ink_thread_self()
   return (pthread_self());
 }
 
+static inline ink_thread
+ink_thread_null()
+{
+  return (ink_thread)0;
+}
+
 static inline int
 ink_thread_get_priority(ink_thread t, int *priority)
 {
@@ -224,7 +230,7 @@ void ink_sem_post(ink_semaphore *sp);
 static inline void
 ink_cond_init(ink_cond *cp)
 {
-  ink_assert(pthread_cond_init(cp, NULL) == 0);
+  ink_assert(pthread_cond_init(cp, nullptr) == 0);
 }
 
 static inline void
diff --git a/lib/ts/ink_time.cc b/lib/ts/ink_time.cc
index e9596931f55..97da41987f2 100644
--- a/lib/ts/ink_time.cc
+++ b/lib/ts/ink_time.cc
@@ -57,7 +57,7 @@ ink_microseconds(int which)
 
   switch (which) {
   case MICRO_REAL:
-    gettimeofday(&tp, NULL);
+    gettimeofday(&tp, nullptr);
     break;
   case MICRO_USER:
     getrusage(RUSAGE_SELF, &ru);
@@ -87,7 +87,7 @@ ink_time_wall_seconds()
 {
   struct timeval s_val;
 
-  gettimeofday(&s_val, 0);
+  gettimeofday(&s_val, nullptr);
   return ((double)s_val.tv_sec + 0.000001 * s_val.tv_usec);
 } /* End ink_time_wall_seconds */
 
@@ -114,7 +114,7 @@ cftime_replacement(char *s, int maxsize, const char *format, const time_t *clock
 {
   struct tm tm;
 
-  ink_assert(ink_localtime_r(clock, &tm) != NULL);
+  ink_assert(ink_localtime_r(clock, &tm) != nullptr);
 
   return strftime(s, maxsize, format, &tm);
 }
diff --git a/lib/ts/llqueue.cc b/lib/ts/llqueue.cc
index 9d20325c1cc..7eda019c9c8 100644
--- a/lib/ts/llqueue.cc
+++ b/lib/ts/llqueue.cc
@@ -43,7 +43,7 @@ newrec(LLQ *Q)
   LLQrec *new_val;
   int i;
 
-  if (Q->free != NULL) {
+  if (Q->free != nullptr) {
     new_val = Q->free;
     Q->free = Q->free->next;
     return new_val;
@@ -53,7 +53,7 @@ newrec(LLQ *Q)
   for (i            = 0; i < RECORD_CHUNK; i++)
     Q->free[i].next = &Q->free[i + 1];
 
-  Q->free[RECORD_CHUNK - 1].next = NULL;
+  Q->free[RECORD_CHUNK - 1].next = nullptr;
 
   new_val = Q->free;
   Q->free = Q->free->next;
@@ -78,7 +78,7 @@ create_queue()
   ink_sem_init(&(new_val->sema), 0);
   ink_mutex_init(&(new_val->mux), "LLQ::create_queue");
 
-  new_val->head = new_val->tail = new_val->free = NULL;
+  new_val->head = new_val->tail = new_val->free = nullptr;
   new_val->len = new_val->highwater = 0;
 
   return new_val;
@@ -106,13 +106,13 @@ enqueue(LLQ *Q, void *data)
   ink_mutex_acquire(&(Q->mux));
   new_val       = (LLQrec *)ats_malloc(sizeof(LLQrec));
   new_val->data = data;
-  new_val->next = NULL;
+  new_val->next = nullptr;
 
   if (Q->tail)
     Q->tail->next = new_val;
   Q->tail         = new_val;
 
-  if (Q->head == NULL)
+  if (Q->head == nullptr)
     Q->head = Q->tail;
 
   Q->len++;
@@ -184,17 +184,17 @@ dequeue(LLQ *Q)
   ink_sem_wait(&(Q->sema));
   ink_mutex_acquire(&(Q->mux));
 
-  if (Q->head == NULL) {
+  if (Q->head == nullptr) {
     ink_mutex_release(&(Q->mux));
 
-    return NULL;
+    return nullptr;
   }
 
   rec = Q->head;
 
   Q->head = Q->head->next;
-  if (Q->head == NULL)
-    Q->tail = NULL;
+  if (Q->head == nullptr)
+    Q->tail = nullptr;
 
   d = rec->data;
   // freerec(Q, rec);
@@ -229,7 +229,7 @@ testfun(void *unused)
     }
   } while (num >= -1);
 
-  return NULL;
+  return nullptr;
 }
 
 /*
@@ -238,7 +238,7 @@ testfun(void *unused)
 void
 main()
 {
-  assert(thr_create(NULL, 0, testfun, (void *)NULL, THR_NEW_LWP, NULL) == 0);
+  assert(thr_create(nullptr, 0, testfun, (void *)NULL, THR_NEW_LWP, NULL) == 0);
   while (1) {
     ;
   }
diff --git a/lib/ts/signals.cc b/lib/ts/signals.cc
index d9fc10bd68e..1c196186a3a 100644
--- a/lib/ts/signals.cc
+++ b/lib/ts/signals.cc
@@ -39,7 +39,7 @@ signal_check_handler(int signal, signal_handler_t handler)
   struct sigaction oact;
   void *sigact;
 
-  ink_release_assert(sigaction(signal, NULL, &oact) == 0);
+  ink_release_assert(sigaction(signal, nullptr, &oact) == 0);
   if (handler == (signal_handler_t)SIG_DFL || handler == (signal_handler_t)SIG_IGN) {
     sigact = (void *)oact.sa_handler;
   } else {
@@ -77,12 +77,12 @@ set_signal(int signo, signal_handler_t handler)
 {
   struct sigaction act;
 
-  act.sa_handler   = NULL;
+  act.sa_handler   = nullptr;
   act.sa_sigaction = handler;
   act.sa_flags     = SA_SIGINFO;
   sigemptyset(&(act.sa_mask));
 
-  ink_release_assert(sigaction(signo, &act, NULL) == 0);
+  ink_release_assert(sigaction(signo, &act, nullptr) == 0);
 }
 
 // Reset a signal handler to the default handler.
@@ -95,7 +95,7 @@ signal_reset_default(int signo)
   act.sa_flags   = SA_NODEFER | SA_ONSTACK | SA_RESETHAND;
   sigemptyset(&(act.sa_mask));
 
-  ink_release_assert(sigaction(signo, &act, NULL) == 0);
+  ink_release_assert(sigaction(signo, &act, nullptr) == 0);
 }
 
 //
@@ -110,13 +110,13 @@ check_signal_thread(void *ptr)
     check_signals(handler);
     sleep(2);
   }
-  return NULL;
+  return nullptr;
 }
 
 void
 signal_start_check_thread(signal_handler_t handler)
 {
-  ink_thread_create(check_signal_thread, (void *)handler, 0, 0, NULL);
+  ink_thread_create(check_signal_thread, (void *)handler, 0, 0, nullptr);
 }
 
 bool
@@ -125,7 +125,7 @@ signal_is_masked(int signo)
   sigset_t current;
 
   sigemptyset(¤t);
-  if (ink_thread_sigsetmask(SIG_SETMASK, NULL /* oldset */, ¤t) == 0) {
+  if (ink_thread_sigsetmask(SIG_SETMASK, nullptr /* oldset */, ¤t) == 0) {
     return sigismember(¤t, signo) == 1;
   }
 
@@ -206,7 +206,7 @@ signal_register_default_handler(signal_handler_t handler)
   sigset_t sigsToBlock;
 
   sigemptyset(&sigsToBlock);
-  ink_thread_sigsetmask(SIG_SETMASK, &sigsToBlock, NULL);
+  ink_thread_sigsetmask(SIG_SETMASK, &sigsToBlock, nullptr);
 
   // SIGPIPE is just annoying to handle,we never care about it
   signal(SIGPIPE, SIG_IGN);
diff --git a/lib/ts/test_Map.cc b/lib/ts/test_Map.cc
index d95990c0296..4ec0713ae48 100644
--- a/lib/ts/test_Map.cc
+++ b/lib/ts/test_Map.cc
@@ -153,20 +153,20 @@ main(int /* argc ATS_UNUSED */, char ** /*argv ATS_UNUSED */)
   ink_assert(h.put(hum) == hum);
   ink_assert(h.put(hhi) == hi);
   ink_assert(h.get(hhi) == hi && h.get(hi) == hi && h.get(ho) == ho);
-  ink_assert(h.get("he") == 0 && h.get("hee") == 0);
+  ink_assert(h.get("he") == nullptr && h.get("hee") == nullptr);
   h.del(ho);
-  ink_assert(h.get(ho) == 0);
+  ink_assert(h.get(ho) == nullptr);
 
   StringBlockHash hh;
   hh.put(hi);
   hh.put(ho);
-  ink_assert(hh.put(hum) == 0);
+  ink_assert(hh.put(hum) == nullptr);
   ink_assert(hh.put(hhi) == hi);
   ink_assert(hh.get(hhi) == hi && hh.get(hi) == hi && hh.get(ho) == ho);
-  ink_assert(hh.get("he") == 0 && hh.get("hee") == 0);
+  ink_assert(hh.get("he") == nullptr && hh.get("hee") == nullptr);
   hh.del(hi);
-  ink_assert(hh.get(hhi) == 0);
-  ink_assert(hh.get(hi) == 0);
+  ink_assert(hh.get(hhi) == nullptr);
+  ink_assert(hh.get(hi) == nullptr);
 
   HashMap sh;
   sh.put(hi, 1);
diff --git a/lib/ts/test_PriorityQueue.cc b/lib/ts/test_PriorityQueue.cc
index 27a3258b80a..21f1b21fc27 100644
--- a/lib/ts/test_PriorityQueue.cc
+++ b/lib/ts/test_PriorityQueue.cc
@@ -73,7 +73,7 @@ REGRESSION_TEST(PriorityQueue_1)(RegressionTest *t, int /* atype ATS_UNUSED */,
   box.check(pq->top() == entry_a, "top should be entry_a");
 
   pq->pop();
-  box.check(pq->top() == NULL, "top should be NULL");
+  box.check(pq->top() == nullptr, "top should be NULL");
 
   delete pq;
   delete a;
@@ -223,7 +223,7 @@ REGRESSION_TEST(PriorityQueue_4)(RegressionTest *t, int /* atype ATS_UNUSED */,
   box.check(pq->top() == entry_c, "top should be entry_c"); // 9
   pq->pop();
 
-  box.check(pq->top() == NULL, "top should be NULL");
+  box.check(pq->top() == nullptr, "top should be NULL");
 
   delete pq;
 
@@ -321,7 +321,7 @@ REGRESSION_TEST(PriorityQueue_5)(RegressionTest *t, int /* atype ATS_UNUSED */,
   box.check(pq->top() == entry_c, "top should be entry_c"); // 109
   pq->pop();
 
-  box.check(pq->top() == NULL, "top should be NULL");
+  box.check(pq->top() == nullptr, "top should be NULL");
 
   delete pq;
 
@@ -372,7 +372,7 @@ REGRESSION_TEST(PriorityQueue_6)(RegressionTest *t, int /* atype ATS_UNUSED */,
   pq->erase(entry_c);
   box.check(pq->top() == entry_b, "top should be entry_b");
   pq->erase(entry_b);
-  box.check(pq->top() == NULL, "top should be NULL");
+  box.check(pq->top() == nullptr, "top should be NULL");
   box.check(pq->empty(), "should be empty");
 
   delete pq;
diff --git a/lib/ts/test_Ptr.cc b/lib/ts/test_Ptr.cc
index 7eb9f3e9361..eb79036fd77 100644
--- a/lib/ts/test_Ptr.cc
+++ b/lib/ts/test_Ptr.cc
@@ -37,7 +37,7 @@ REGRESSION_TEST(Ptr_detach)(RegressionTest *t, int /* atype ATS_UNUSED */, int *
   Ptr p1 = make_ptr(new PtrObject(&alive));
   PtrObject *p2     = p1.detach();
 
-  box.check(p1.get() == NULL, "Ptr::detach NULLs the stored pointer");
+  box.check(p1.get() == nullptr, "Ptr::detach NULLs the stored pointer");
   box.check(p2->refcount() == 1, "Ptr::detach preserves the refcount");
 
   // Note that there's no symmetric reattach.
@@ -55,12 +55,12 @@ REGRESSION_TEST(Ptr_clear)(RegressionTest *t, int /* atype ATS_UNUSED */, int *p
   Ptr p1 = make_ptr(new PtrObject(&alive));
   box.check(alive == 1, "we have a live object");
   p1.clear();
-  box.check(p1.get() == NULL, "Ptr::clear NULLs the pointer");
+  box.check(p1.get() == nullptr, "Ptr::clear NULLs the pointer");
   box.check(alive == 0, "Ptr::clear drops the refcount");
 
   p1 = make_ptr(new PtrObject(&alive));
   box.check(alive == 1, "we have a live object");
-  p1 = 0;
+  p1 = nullptr;
   box.check(alive == 0, "assigning NULL drops the refcount");
 }
 
diff --git a/lib/ts/test_X509HostnameValidator.cc b/lib/ts/test_X509HostnameValidator.cc
index b732c632e94..674b30e359a 100644
--- a/lib/ts/test_X509HostnameValidator.cc
+++ b/lib/ts/test_X509HostnameValidator.cc
@@ -96,7 +96,7 @@ static X509 *
 load_cert_from_string(const char *cert_string)
 {
   BIO *bio = BIO_new_mem_buf((void *)cert_string, -1);
-  return PEM_read_bio_X509(bio, NULL, 0, NULL);
+  return PEM_read_bio_X509(bio, nullptr, nullptr, nullptr);
 }
 
 REGRESSION_TEST(CN_match)(RegressionTest *t, int /* atype ATS_UNUSED */, int *pstatus)
@@ -106,10 +106,11 @@ REGRESSION_TEST(CN_match)(RegressionTest *t, int /* atype ATS_UNUSED */, int *ps
 
   box     = REGRESSION_TEST_PASSED;
   X509 *x = load_cert_from_string(test_certificate_cn);
-  box.check(x != NULL, "failed to load the test certificate");
+  box.check(x != nullptr, "failed to load the test certificate");
   box.check(validate_hostname(x, (unsigned char *)test_certificate_cn_name, false, &matching) == true, "Hostname should match");
   box.check(strcmp(test_certificate_cn_name, matching) == 0, "Return hostname doesn't match lookup");
-  box.check(validate_hostname(x, (unsigned char *)test_certificate_cn_name + 1, false, NULL) == false, "Hostname shouldn't match");
+  box.check(validate_hostname(x, (unsigned char *)test_certificate_cn_name + 1, false, nullptr) == false,
+            "Hostname shouldn't match");
   ats_free(matching);
 }
 
@@ -119,12 +120,12 @@ REGRESSION_TEST(bad_wildcard_SANs)(RegressionTest *t, int /* atype ATS_UNUSED */
 
   box     = REGRESSION_TEST_PASSED;
   X509 *x = load_cert_from_string(test_certificate_bad_sans);
-  box.check(x != NULL, "failed to load the test certificate");
-  box.check(validate_hostname(x, (unsigned char *)"something.or.other", false, NULL) == false, "Hostname shouldn't match");
-  box.check(validate_hostname(x, (unsigned char *)"a.b.c", false, NULL) == false, "Hostname shouldn't match");
-  box.check(validate_hostname(x, (unsigned char *)"0.0.0.0", true, NULL) == false, "Hostname shouldn't match");
-  box.check(validate_hostname(x, (unsigned char *)"......", true, NULL) == false, "Hostname shouldn't match");
-  box.check(validate_hostname(x, (unsigned char *)"a.b", true, NULL) == false, "Hostname shouldn't match");
+  box.check(x != nullptr, "failed to load the test certificate");
+  box.check(validate_hostname(x, (unsigned char *)"something.or.other", false, nullptr) == false, "Hostname shouldn't match");
+  box.check(validate_hostname(x, (unsigned char *)"a.b.c", false, nullptr) == false, "Hostname shouldn't match");
+  box.check(validate_hostname(x, (unsigned char *)"0.0.0.0", true, nullptr) == false, "Hostname shouldn't match");
+  box.check(validate_hostname(x, (unsigned char *)"......", true, nullptr) == false, "Hostname shouldn't match");
+  box.check(validate_hostname(x, (unsigned char *)"a.b", true, nullptr) == false, "Hostname shouldn't match");
 }
 
 REGRESSION_TEST(wildcard_SAN_and_CN)(RegressionTest *t, int /* atype ATS_UNUSED */, int *pstatus)
@@ -134,7 +135,7 @@ REGRESSION_TEST(wildcard_SAN_and_CN)(RegressionTest *t, int /* atype ATS_UNUSED
 
   box     = REGRESSION_TEST_PASSED;
   X509 *x = load_cert_from_string(test_certificate_cn_and_SANs);
-  box.check(x != NULL, "failed to load the test certificate");
+  box.check(x != nullptr, "failed to load the test certificate");
   box.check(validate_hostname(x, (unsigned char *)test_certificate_cn_name, false, &matching) == true, "Hostname should match");
   box.check(strcmp(test_certificate_cn_name, matching) == 0, "Return hostname doesn't match lookup");
   ats_free(matching);
@@ -142,7 +143,7 @@ REGRESSION_TEST(wildcard_SAN_and_CN)(RegressionTest *t, int /* atype ATS_UNUSED
   box.check(validate_hostname(x, (unsigned char *)"a.trafficserver.org", false, &matching) == true, "Hostname should match");
   box.check(strcmp("*.trafficserver.org", matching) == 0, "Return hostname doesn't match lookup");
 
-  box.check(validate_hostname(x, (unsigned char *)"a.*.trafficserver.org", false, NULL) == false, "Hostname shouldn't match");
+  box.check(validate_hostname(x, (unsigned char *)"a.*.trafficserver.org", false, nullptr) == false, "Hostname shouldn't match");
   ats_free(matching);
 }
 
@@ -152,7 +153,7 @@ REGRESSION_TEST(IDNA_hostnames)(RegressionTest *t, int /* atype ATS_UNUSED */, i
   char *matching;
   box     = REGRESSION_TEST_PASSED;
   X509 *x = load_cert_from_string(test_certificate_cn_and_SANs);
-  box.check(x != NULL, "failed to load the test certificate");
+  box.check(x != nullptr, "failed to load the test certificate");
   box.check(validate_hostname(x, (unsigned char *)"xn--foobar.trafficserver.org", false, &matching) == true,
             "Hostname should match");
   box.check(strcmp("*.trafficserver.org", matching) == 0, "Return hostname doesn't match lookup");
@@ -169,7 +170,7 @@ REGRESSION_TEST(middle_label_match)(RegressionTest *t, int /* atype ATS_UNUSED *
   char *matching;
   box     = REGRESSION_TEST_PASSED;
   X509 *x = load_cert_from_string(test_certificate_cn_and_SANs);
-  box.check(x != NULL, "failed to load the test certificate");
+  box.check(x != nullptr, "failed to load the test certificate");
   box.check(validate_hostname(x, (unsigned char *)"foosomething.trafficserver.com", false, &matching) == true,
             "Hostname should match");
   box.check(strcmp("foo*.trafficserver.com", matching) == 0, "Return hostname doesn't match lookup");
@@ -179,15 +180,16 @@ REGRESSION_TEST(middle_label_match)(RegressionTest *t, int /* atype ATS_UNUSED *
   box.check(strcmp("*bar.trafficserver.net", matching) == 0, "Return hostname doesn't match lookup");
   ats_free(matching);
 
-  box.check(validate_hostname(x, (unsigned char *)"a.bar.trafficserver.net", false, NULL) == false, "Hostname shouldn't match");
-  box.check(validate_hostname(x, (unsigned char *)"foo.bar.trafficserver.net", false, NULL) == false, "Hostname shouldn't match");
+  box.check(validate_hostname(x, (unsigned char *)"a.bar.trafficserver.net", false, nullptr) == false, "Hostname shouldn't match");
+  box.check(validate_hostname(x, (unsigned char *)"foo.bar.trafficserver.net", false, nullptr) == false,
+            "Hostname shouldn't match");
 }
 
 int
 main(int argc, const char **argv)
 {
   BaseLogFile *blf = new BaseLogFile("stdout");
-  diags            = new Diags("test_x509", NULL, NULL, blf);
+  diags            = new Diags("test_x509", nullptr, nullptr, blf);
   res_track_memory = 1;
 
   SSL_library_init();
diff --git a/lib/ts/test_arena.cc b/lib/ts/test_arena.cc
index 4fd51aa6194..89abb2cb30c 100644
--- a/lib/ts/test_arena.cc
+++ b/lib/ts/test_arena.cc
@@ -78,7 +78,7 @@ test_block_boundries()
     // Clear out the regions array
     int j = 0;
     for (j = 0; j < regions_to_test; j++) {
-      test_regions[j] = NULL;
+      test_regions[j] = nullptr;
     }
 
     // Allocate and fill the array
diff --git a/lib/ts/test_atomic.cc b/lib/ts/test_atomic.cc
index 4459a97dab6..a02a91aaa82 100644
--- a/lib/ts/test_atomic.cc
+++ b/lib/ts/test_atomic.cc
@@ -51,7 +51,7 @@ testalist(void *ame)
     if ((x = ink_atomiclist_pop(&al[me])))
       ink_atomiclist_push(&al[rand() % MAX_ALIST_TEST], x);
   ink_atomic_increment((int *)&al_done, 1);
-  return NULL;
+  return nullptr;
 }
 #endif // !LONG_ATOMICLIST_TEST
 
@@ -174,7 +174,7 @@ main(int /* argc ATS_UNUSED */, const char * /* argv ATS_UNUSED */ [])
   printf("Testing atomic lists\n");
   {
     int ali;
-    srand(time(NULL));
+    srand(time(nullptr));
     printf("sizeof(al_test) = %d\n", (int)sizeof(al_test));
     memset(&al_test[0][0], 0, sizeof(al_test));
     for (ali = 0; ali < MAX_ALIST_TEST; ali++)
diff --git a/lib/ts/test_freelist.cc b/lib/ts/test_freelist.cc
index c3a326cafb5..33d8de058d0 100644
--- a/lib/ts/test_freelist.cc
+++ b/lib/ts/test_freelist.cc
@@ -27,7 +27,7 @@
 #include "ts/ink_queue.h"
 
 #define NTHREADS 64
-InkFreeList *flist = NULL;
+InkFreeList *flist = nullptr;
 
 void *
 test(void *d)
@@ -37,7 +37,7 @@ test(void *d)
 
   id = (intptr_t)d;
 
-  time_t start = time(NULL);
+  time_t start = time(nullptr);
   int count    = 0;
   for (;;) {
     m1 = ink_freelist_new(flist);
@@ -59,8 +59,8 @@ test(void *d)
     ink_freelist_free(flist, m3);
 
     // break out of the test if we have run more then 60 seconds
-    if (++count % 1000 == 0 && (start + 60) < time(NULL)) {
-      return NULL;
+    if (++count % 1000 == 0 && (start + 60) < time(nullptr)) {
+      return nullptr;
     }
   }
 }
@@ -74,7 +74,7 @@ main(int /* argc ATS_UNUSED */, char * /*argv ATS_UNUSED */ [])
 
   for (i = 0; i < NTHREADS; i++) {
     fprintf(stderr, "Create thread %d\n", i);
-    ink_thread_create(test, (void *)((intptr_t)i), 0, 0, NULL);
+    ink_thread_create(test, (void *)((intptr_t)i), 0, 0, nullptr);
   }
 
   test((void *)NTHREADS);
diff --git a/lib/tsconfig/Errata.cc b/lib/tsconfig/Errata.cc
index a0259a17961..6352219d95e 100644
--- a/lib/tsconfig/Errata.cc
+++ b/lib/tsconfig/Errata.cc
@@ -166,7 +166,7 @@ Errata::pop() {
 
 void
 Errata::clear() {
-  m_data.reset(0);
+  m_data.reset(nullptr);
 }
 
 /*  We want to allow iteration on empty / nil containers because that's very
diff --git a/lib/tsconfig/TsBuilder.cc b/lib/tsconfig/TsBuilder.cc
index 59e2b921475..f9af31947f2 100644
--- a/lib/tsconfig/TsBuilder.cc
+++ b/lib/tsconfig/TsBuilder.cc
@@ -166,7 +166,7 @@ void Builder::pathIndex(Token const& token){
     // We take advantage of the lexer - token will always be a valid
     // digit string that is followed by a non-digit or the FLEX
     // required double null at the end of the input buffer.
-    _path.append(Buffer(0, static_cast(atol(token._s))));
+    _path.append(Buffer(nullptr, static_cast(atol(token._s))));
     if (_extent._ptr) _extent._size = token._s - _extent._ptr + token._n;
     else _extent.set(token._s, token._n);
 }
@@ -208,7 +208,7 @@ void Builder::literalValue(Token const& token) {
     }
     if (!cv.isOK()) _errata.pull(cv.errata());
     if (cv.result()) cv.result().setSource(token._loc._line, token._loc._col);
-    _name.set(0,0); // used, so clear it.
+    _name.set(nullptr,0); // used, so clear it.
 }
 void Builder::invalidToken(Token const&) { }
 
diff --git a/lib/tsconfig/TsValue.cc b/lib/tsconfig/TsValue.cc
index 959db9ee149..b9d9b7c83d2 100644
--- a/lib/tsconfig/TsValue.cc
+++ b/lib/tsconfig/TsValue.cc
@@ -40,7 +40,7 @@ namespace ts { namespace config {
 Buffer const detail::NULL_BUFFER;
 ConstBuffer const detail::NULL_CONST_BUFFER;
 detail::ValueItem detail::ValueTableImpl::NULL_ITEM(VoidValue);
-detail::PseudoBool::Type const detail::PseudoBool::FALSE = 0;
+detail::PseudoBool::Type const detail::PseudoBool::FALSE = nullptr;
 detail::PseudoBool::Type const detail::PseudoBool::TRUE = &detail::PseudoBool::operator !;
 // This should not be called, it is used only as a pointer value.
 bool detail::PseudoBool::operator ! () const { return false; }
@@ -300,7 +300,7 @@ Path::Parser::parse(ConstBuffer *cbuff) {
   if (!zret.isOK()) {
     zret = ERROR;
     if (cbuff) cbuff->set(_c - 1, 1);
-    _c = 0;
+    _c = nullptr;
     _input.reset();
   } else if (S_INIT == state) {
     zret = EOP;
diff --git a/mgmt/Alarms.cc b/mgmt/Alarms.cc
index aaf21e48ffa..bf549c04406 100644
--- a/mgmt/Alarms.cc
+++ b/mgmt/Alarms.cc
@@ -68,7 +68,7 @@ alarm_script_dir()
 {
   char *path;
 
-  path = REC_readString("proxy.config.alarm.abs_path", NULL);
+  path = REC_readString("proxy.config.alarm.abs_path", nullptr);
   if (path && *path) {
     return path;
   }
@@ -211,16 +211,16 @@ Alarms::signalAlarm(alarm_t a, const char *desc, const char *ip)
   /* Quick hack to buffer repeat alarms and only send every 15 min */
   if (desc && (priority == 1 || priority == 2) && !ip) {
     if (strcmp(prev_alarm_text, desc) == 0) { /* a repeated alarm */
-      time_t time_delta = time(0) - last_sent;
+      time_t time_delta = time(nullptr) - last_sent;
       if (time_delta < 900) {
         mgmt_log("[Alarms::signalAlarm] Skipping Alarm: '%s'\n", desc);
         return;
       } else {
-        last_sent = time(0);
+        last_sent = time(nullptr);
       }
     } else {
       ink_strlcpy(prev_alarm_text, desc, sizeof(prev_alarm_text));
-      last_sent = time(0);
+      last_sent = time(nullptr);
     }
   }
 
@@ -269,7 +269,7 @@ Alarms::signalAlarm(alarm_t a, const char *desc, const char *ip)
   atmp->linger      = true;
   atmp->seen        = true;
   atmp->priority    = priority;
-  atmp->description = NULL;
+  atmp->description = nullptr;
 
   if (!ip) {
     atmp->local        = true;
@@ -302,7 +302,7 @@ Alarms::signalAlarm(alarm_t a, const char *desc, const char *ip)
 
   ink_mutex_release(&mutex);
 
-  for (entry = ink_hash_table_iterator_first(cblist, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(cblist, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(cblist, &iterator_state)) {
     AlarmCallbackFunc func = (AlarmCallbackFunc)ink_hash_table_entry_value(remote_alarms, entry);
     Debug("alarm", "[Alarms::signalAlarm] invoke callback for %d", a);
@@ -328,7 +328,7 @@ Alarms::resetSeenFlag(char *ip)
   InkHashTableIteratorState iterator_state;
 
   ink_mutex_acquire(&mutex);
-  for (entry = ink_hash_table_iterator_first(remote_alarms, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(remote_alarms, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(remote_alarms, &iterator_state)) {
     char *key  = (char *)ink_hash_table_entry_key(remote_alarms, entry);
     Alarm *tmp = (Alarm *)ink_hash_table_entry_value(remote_alarms, entry);
@@ -353,7 +353,7 @@ Alarms::clearUnSeen(char *ip)
   InkHashTableIteratorState iterator_state;
 
   ink_mutex_acquire(&mutex);
-  for (entry = ink_hash_table_iterator_first(remote_alarms, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(remote_alarms, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(remote_alarms, &iterator_state)) {
     char *key  = (char *)ink_hash_table_entry_key(remote_alarms, entry);
     Alarm *tmp = (Alarm *)ink_hash_table_entry_value(remote_alarms, entry);
@@ -401,7 +401,7 @@ Alarms::constructAlarmMessage(const AppVersionInfo &version, char *ip, char *mes
   ink_strlcpy(&message[n], "type: alarm\n", max - n);
   n += strlen("type: alarm\n");
   bsum = n;
-  for (entry = ink_hash_table_iterator_first(local_alarms, &iterator_state); (entry != NULL && n < max);
+  for (entry = ink_hash_table_iterator_first(local_alarms, &iterator_state); (entry != nullptr && n < max);
        entry = ink_hash_table_iterator_next(local_alarms, &iterator_state)) {
     Alarm *tmp = (Alarm *)ink_hash_table_entry_value(remote_alarms, entry);
 
@@ -449,7 +449,7 @@ Alarms::execAlarmBin(const char *desc)
   ats_scoped_str bindir(alarm_script_dir());
   char cmd_line[MAXPATHLEN];
 
-  ats_scoped_str alarm_bin(REC_readString("proxy.config.alarm.bin", NULL));
+  ats_scoped_str alarm_bin(REC_readString("proxy.config.alarm.bin", nullptr));
   ats_scoped_str alarm_email_from_name;
   ats_scoped_str alarm_email_from_addr;
   ats_scoped_str alarm_email_to_addr;
@@ -462,9 +462,9 @@ Alarms::execAlarmBin(const char *desc)
   }
 
   // get email info
-  alarm_email_from_name = REC_readString("proxy.config.product_name", NULL);
-  alarm_email_from_addr = REC_readString("proxy.config.admin.admin_user", NULL);
-  alarm_email_to_addr   = REC_readString("proxy.config.alarm_email", NULL);
+  alarm_email_from_name = REC_readString("proxy.config.product_name", nullptr);
+  alarm_email_from_addr = REC_readString("proxy.config.admin.admin_user", nullptr);
+  alarm_email_to_addr   = REC_readString("proxy.config.alarm_email", nullptr);
 
   ink_filepath_make(cmd_line, sizeof(cmd_line), bindir, alarm_bin);
 
@@ -478,12 +478,12 @@ Alarms::execAlarmBin(const char *desc)
   } else if (pid > 0) { /* Parent */
     int status;
     bool script_done = false;
-    time_t timeout   = (time_t)REC_readInteger("proxy.config.alarm.script_runtime", NULL);
+    time_t timeout   = (time_t)REC_readInteger("proxy.config.alarm.script_runtime", nullptr);
     if (!timeout) {
       timeout = 5; // default time = 5 secs
     }
     time_t time_delta = 0;
-    time_t first_time = time(0);
+    time_t first_time = time(nullptr);
     while (time_delta <= timeout) {
       // waitpid will return child's pid if status is available
       // or -1 if there is some problem; returns 0 if child status
@@ -493,7 +493,7 @@ Alarms::execAlarmBin(const char *desc)
         script_done = true;
         break;
       }
-      time_delta = time(0) - first_time;
+      time_delta = time(nullptr) - first_time;
     }
     // need to kill the child script process if it's not complete
     if (!script_done) {
@@ -505,9 +505,9 @@ Alarms::execAlarmBin(const char *desc)
     int res;
     if (alarm_email_from_name && alarm_email_from_addr && alarm_email_to_addr) {
       res = execl(cmd_line, (const char *)alarm_bin, desc, (const char *)alarm_email_from_name, (const char *)alarm_email_from_addr,
-                  (const char *)alarm_email_to_addr, (char *)NULL);
+                  (const char *)alarm_email_to_addr, (char *)nullptr);
     } else {
-      res = execl(cmd_line, (const char *)alarm_bin, desc, (char *)NULL);
+      res = execl(cmd_line, (const char *)alarm_bin, desc, (char *)nullptr);
     }
     _exit(res);
   }
diff --git a/mgmt/BaseManager.cc b/mgmt/BaseManager.cc
index ac69bb8dc6a..25eede84e6c 100644
--- a/mgmt/BaseManager.cc
+++ b/mgmt/BaseManager.cc
@@ -55,7 +55,7 @@ BaseManager::~BaseManager()
   }
   ats_free(mgmt_event_queue);
 
-  for (entry = ink_hash_table_iterator_first(mgmt_callback_table, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(mgmt_callback_table, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(mgmt_callback_table, &iterator_state)) {
     MgmtCallbackList *tmp, *cb_list = (MgmtCallbackList *)entry;
 
@@ -90,7 +90,7 @@ BaseManager::registerMgmtCallback(int msg_id, MgmtCallback cb, void *opaque_cb_d
   if (ink_hash_table_lookup(mgmt_callback_table, (InkHashTableKey)(intptr_t)msg_id, &hash_value) != 0) {
     cb_list = (MgmtCallbackList *)hash_value;
   } else {
-    cb_list = NULL;
+    cb_list = nullptr;
   }
 
   if (cb_list) {
@@ -102,12 +102,12 @@ BaseManager::registerMgmtCallback(int msg_id, MgmtCallback cb, void *opaque_cb_d
     tmp->next              = (MgmtCallbackList *)ats_malloc(sizeof(MgmtCallbackList));
     tmp->next->func        = cb;
     tmp->next->opaque_data = opaque_cb_data;
-    tmp->next->next        = NULL;
+    tmp->next->next        = nullptr;
   } else {
     cb_list              = (MgmtCallbackList *)ats_malloc(sizeof(MgmtCallbackList));
     cb_list->func        = cb;
     cb_list->opaque_data = opaque_cb_data;
-    cb_list->next        = NULL;
+    cb_list->next        = nullptr;
     ink_hash_table_insert(mgmt_callback_table, (InkHashTableKey)(intptr_t)msg_id, cb_list);
   }
   return msg_id;
@@ -122,7 +122,7 @@ BaseManager::signalMgmtEntity(int msg_id, char *data_str)
   if (data_str) {
     return signalMgmtEntity(msg_id, data_str, strlen(data_str) + 1);
   } else {
-    return signalMgmtEntity(msg_id, NULL, 0);
+    return signalMgmtEntity(msg_id, nullptr, 0);
   }
 
 } /* End BaseManager::signalMgmtEntity */
diff --git a/mgmt/FileManager.cc b/mgmt/FileManager.cc
index 6c959b18203..36c08a6ed98 100644
--- a/mgmt/FileManager.cc
+++ b/mgmt/FileManager.cc
@@ -41,7 +41,7 @@ typedef fileEntry snapshot;
 FileManager::FileManager()
 {
   bindings = ink_hash_table_create(InkHashTableKeyType_String);
-  ink_assert(bindings != NULL);
+  ink_assert(bindings != nullptr);
 
   ink_mutex_init(&accessLock, "File Manager Mutex");
   ink_mutex_init(&cbListLock, "File Changed Callback Mutex");
@@ -78,14 +78,14 @@ FileManager::~FileManager()
   // Let other operations finish and do not start any new ones
   ink_mutex_acquire(&accessLock);
 
-  this->managedDir  = NULL;
-  this->dirDescript = NULL;
+  this->managedDir  = nullptr;
+  this->dirDescript = nullptr;
 
-  for (cb = cblist.pop(); cb != NULL; cb = cblist.pop()) {
+  for (cb = cblist.pop(); cb != nullptr; cb = cblist.pop()) {
     delete cb;
   }
 
-  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(bindings, &iterator_state)) {
     rb = (Rollback *)ink_hash_table_entry_value(bindings, entry);
 
@@ -111,7 +111,7 @@ void
 FileManager::registerCallback(FileCallbackFunc func)
 {
   callbackListable *newcb = new callbackListable();
-  ink_assert(newcb != NULL);
+  ink_assert(newcb != nullptr);
   newcb->func = func;
   ink_mutex_acquire(&cbListLock);
   cblist.push(newcb);
@@ -140,7 +140,7 @@ FileManager::addFile(const char *fileName, bool root_access_needed, Rollback *pa
 void
 FileManager::addFileHelper(const char *fileName, bool root_access_needed, Rollback *parentRollback, unsigned flags)
 {
-  ink_assert(fileName != NULL);
+  ink_assert(fileName != nullptr);
 
   Rollback *rb    = new Rollback(fileName, root_access_needed, parentRollback, flags);
   rb->configFiles = this;
@@ -158,7 +158,7 @@ FileManager::addFileHelper(const char *fileName, bool root_access_needed, Rollba
 bool
 FileManager::getRollbackObj(const char *fileName, Rollback **rbPtr)
 {
-  InkHashTableValue lookup = NULL;
+  InkHashTableValue lookup = nullptr;
   int found;
 
   ink_mutex_acquire(&accessLock);
@@ -183,7 +183,7 @@ FileManager::fileChanged(const char *fileName, bool incVersion)
 
   ink_mutex_acquire(&cbListLock);
 
-  for (cb = cblist.head; cb != NULL; cb = cb->link.next) {
+  for (cb = cblist.head; cb != nullptr; cb = cb->link.next) {
     // Dup the string for each callback to be
     //  defensive incase it modified when it is not supposed to be
     filenameCopy = ats_strdup(fileName);
@@ -213,7 +213,7 @@ FileManager::filesManaged()
   // To get a stable snap shot, we need to get the rollback
   //   locks on all configuration files so the files
   //   do not change from under us
-  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(bindings, &iterator_state)) {
     rb          = (Rollback *)ink_hash_table_entry_value(bindings, entry);
     currentName = rb->getBaseName();
@@ -241,7 +241,7 @@ FileManager::doRollbackLocks(lockAction_t action)
   InkHashTableEntry *entry;
   InkHashTableIteratorState iterator_state;
 
-  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(bindings, &iterator_state)) {
     rb = (Rollback *)ink_hash_table_entry_value(bindings, entry);
 
@@ -280,9 +280,9 @@ FileManager::abortRestore(const char *abortTo)
   InkHashTableIteratorState iterator_state;
   version_t currentVersion;
 
-  ink_assert(abortTo != NULL);
+  ink_assert(abortTo != nullptr);
 
-  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(bindings, &iterator_state)) {
     rb = (Rollback *)ink_hash_table_entry_value(bindings, entry);
 
@@ -314,7 +314,7 @@ FileManager::restoreSnap(const char *snapName, const char *snapDir)
   InkHashTableIteratorState iterator_state;
   SnapResult result = SNAP_OK;
   char *snapPath;
-  char *filePath = NULL;
+  char *filePath = nullptr;
   textBuffer storage(2048);
 
   snapPath = newPathString(snapDir, snapName);
@@ -335,7 +335,7 @@ FileManager::restoreSnap(const char *snapName, const char *snapDir)
   // For each file, load the snap shot file and Roll a new version
   //    of the active file
   //
-  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(bindings, &iterator_state)) {
     rb       = (Rollback *)ink_hash_table_entry_value(bindings, entry);
     filePath = newPathString(snapPath, rb->getBaseName());
@@ -351,14 +351,14 @@ FileManager::restoreSnap(const char *snapName, const char *snapDir)
       break;
     }
     delete[] filePath;
-    filePath = NULL;
+    filePath = nullptr;
     storage.reUse();
   }
 
   doRollbackLocks(RELEASE_LOCK);
   ink_mutex_release(&accessLock);
 
-  if (filePath != NULL) {
+  if (filePath != nullptr) {
     delete[] filePath;
   }
 
@@ -383,7 +383,7 @@ FileManager::removeSnap(const char *snapName, const char *snapDir)
 
   dir = opendir(snapPath);
 
-  if (dir == NULL) {
+  if (dir == nullptr) {
     mgmt_log("[FileManager::removeSnap] Unable to open snapshot %s: %s\n", snapName, strerror(errno));
     delete[] snapPath;
     return SNAP_NOT_FOUND;
@@ -445,11 +445,11 @@ FileManager::takeSnap(const char *snapName, const char *snapDir)
   SnapResult callResult = SNAP_OK;
 
   // Make sure the user sent us a name
-  if (snapName == NULL || *snapName == '\0') {
+  if (snapName == nullptr || *snapName == '\0') {
     return SNAP_NO_NAME_GIVEN;
   }
 
-  if (strchr(snapName, '/') != NULL) {
+  if (strchr(snapName, '/') != nullptr) {
     return SNAP_ILLEGAL_NAME;
   }
   // make sure the name is legal and cleaned up
@@ -479,7 +479,7 @@ FileManager::takeSnap(const char *snapName, const char *snapDir)
   doRollbackLocks(ACQUIRE_LOCK);
 
   // For each file, make a copy in the snap shot directory
-  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(bindings, &iterator_state)) {
     rb         = (Rollback *)ink_hash_table_entry_value(bindings, entry);
     callResult = this->copyFile(rb, snapPath);
@@ -515,7 +515,7 @@ FileManager::readFile(const char *filePath, textBuffer *contents)
   int diskFD;
   int readResult;
 
-  ink_assert(contents != NULL);
+  ink_assert(contents != nullptr);
   diskFD = mgmt_open(filePath, O_RDONLY);
 
   if (diskFD < 0) {
@@ -610,7 +610,7 @@ FileManager::WalkSnaps(ExpandingArray *snapList)
 
   ink_mutex_release(&accessLock);
   ats_free(this->managedDir);
-  this->managedDir = NULL;
+  this->managedDir = nullptr;
   return (SnapResult)r;
 }
 
@@ -632,7 +632,7 @@ FileManager::rereadConfig()
   Vec changedFiles;
   Vec parentFileNeedChange;
   ink_mutex_acquire(&accessLock);
-  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(bindings, &iterator_state)) {
     rb = (Rollback *)ink_hash_table_entry_value(bindings, entry);
     if (rb->checkForUserUpdate(rb->isVersioned() ? ROLLBACK_CHECK_AND_UPDATE : ROLLBACK_CHECK_ONLY)) {
@@ -649,7 +649,7 @@ FileManager::rereadConfig()
       continue;
     }
     // for each parent file, if it is changed, then delete all its children
-    for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != NULL;
+    for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != nullptr;
          entry = ink_hash_table_iterator_next(bindings, &iterator_state)) {
       rb = (Rollback *)ink_hash_table_entry_value(bindings, entry);
       if (rb->getParentRollback() == changedFiles[i]) {
@@ -686,7 +686,7 @@ FileManager::isConfigStale()
   bool stale = false;
 
   ink_mutex_acquire(&accessLock);
-  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(bindings, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(bindings, &iterator_state)) {
     rb = (Rollback *)ink_hash_table_entry_value(bindings, entry);
     if (rb->checkForUserUpdate(ROLLBACK_CHECK_ONLY)) {
@@ -758,7 +758,7 @@ void
 FileManager::configFileChild(const char *parent, const char *child, unsigned flags)
 {
   InkHashTableValue lookup;
-  Rollback *parentRollback = NULL;
+  Rollback *parentRollback = nullptr;
   ink_mutex_acquire(&accessLock);
   int htfound = ink_hash_table_lookup(bindings, parent, &lookup);
   if (htfound) {
diff --git a/mgmt/LocalManager.cc b/mgmt/LocalManager.cc
index 8e910716e6a..e28abc233a9 100644
--- a/mgmt/LocalManager.cc
+++ b/mgmt/LocalManager.cc
@@ -63,7 +63,7 @@ LocalManager::mgmtShutdown()
   // WCCP TBD: Send a shutdown message to routers.
 
   if (processRunning()) {
-    waitpid(watched_process_pid, NULL, 0);
+    waitpid(watched_process_pid, nullptr, 0);
 #if defined(linux)
     /* Avert race condition, wait for the thread to complete,
        before getting one more restart process */
@@ -156,7 +156,7 @@ LocalManager::clusterOk()
   bool found  = true;
   bool result = true;
 
-  if (processRunning() == true && time(NULL) > (this->proxy_started_at + 30) &&
+  if (processRunning() == true && time(nullptr) > (this->proxy_started_at + 30) &&
       this->ccom->alive_peers_count + 1 != REC_readInteger("proxy.process.cluster.nodes", &found)) {
     result = false;
   }
@@ -175,7 +175,7 @@ LocalManager::processRunning()
   }
 }
 
-LocalManager::LocalManager(bool proxy_on) : BaseManager(), run_proxy(proxy_on), configFiles(NULL)
+LocalManager::LocalManager(bool proxy_on) : BaseManager(), run_proxy(proxy_on), configFiles(nullptr)
 {
   bool found;
   ats_scoped_str rundir(RecConfigReadRuntimeDir());
@@ -184,17 +184,17 @@ LocalManager::LocalManager(bool proxy_on) : BaseManager(), run_proxy(proxy_on),
 
   syslog_facility = 0;
 
-  ccom                      = NULL;
+  ccom                      = nullptr;
   proxy_started_at          = -1;
   proxy_launch_count        = 0;
-  manager_started_at        = time(NULL);
+  manager_started_at        = time(nullptr);
   proxy_launch_outstanding  = false;
   mgmt_shutdown_outstanding = MGMT_PENDING_NONE;
   proxy_running             = 0;
 
   RecRegisterStatInt(RECT_NODE, "proxy.node.proxy_running", 0, RECP_NON_PERSISTENT);
 
-  virt_map = NULL;
+  virt_map = nullptr;
 
   RecInt http_enabled = REC_readInteger("proxy.config.http.enabled", &found);
   ink_assert(found);
@@ -301,7 +301,7 @@ LocalManager::initCCom(const AppVersionInfo &version, FileManager *configFiles,
   }
   // Fetch which interface we are using for clustering
   intrName = REC_readString("proxy.config.cluster.ethernet_interface", &found);
-  ink_assert(intrName != NULL);
+  ink_assert(intrName != nullptr);
 
   found = mgmt_getAddrForIntr(intrName, &cluster_ip.sa);
   if (found == false) {
@@ -420,7 +420,7 @@ LocalManager::pollMgmtProcessServer()
     }
 #endif
 
-    num = mgmt_select(FD_SETSIZE, &fdlist, NULL, NULL, &timeout);
+    num = mgmt_select(FD_SETSIZE, &fdlist, nullptr, nullptr, &timeout);
 
     switch (num) {
     case 0:
@@ -497,7 +497,7 @@ LocalManager::pollMgmtProcessServer()
 
           if (lmgmt->run_proxy) {
             mgmt_log("[Alarms::signalAlarm] Server Process was reset\n");
-            lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_PROXY_PROCESS_DIED, NULL);
+            lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_PROXY_PROCESS_DIED, nullptr);
           } else {
             mgmt_log("[TrafficManager] Server process shutdown\n");
           }
@@ -525,7 +525,7 @@ LocalManager::handleMgmtMsgFromProcesses(MgmtMessageHdr *mh)
   switch (mh->msg_id) {
   case MGMT_SIGNAL_PID:
     watched_process_pid = *((pid_t *)data_raw);
-    lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_PROXY_PROCESS_BORN, NULL);
+    lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_PROXY_PROCESS_BORN, nullptr);
     proxy_running++;
     proxy_launch_pid         = -1;
     proxy_launch_outstanding = false;
@@ -609,7 +609,7 @@ LocalManager::handleMgmtMsgFromProcesses(MgmtMessageHdr *mh)
     if (mh->data_len > 0) {
       executeMgmtCallback(MGMT_SIGNAL_LIBRECORDS, data_raw, mh->data_len);
     } else {
-      executeMgmtCallback(MGMT_SIGNAL_LIBRECORDS, NULL, 0);
+      executeMgmtCallback(MGMT_SIGNAL_LIBRECORDS, nullptr, 0);
     }
     break;
   // Congestion Control - begin
@@ -622,8 +622,8 @@ LocalManager::handleMgmtMsgFromProcesses(MgmtMessageHdr *mh)
   // Congestion Control - end
   case MGMT_SIGNAL_CONFIG_FILE_CHILD: {
     static const MgmtMarshallType fields[] = {MGMT_MARSHALL_STRING, MGMT_MARSHALL_STRING, MGMT_MARSHALL_INT};
-    char *parent                           = NULL;
-    char *child                            = NULL;
+    char *parent                           = nullptr;
+    char *child                            = nullptr;
     MgmtMarshallInt options                = 0;
     if (mgmt_message_parse(data_raw, mh->data_len, fields, countof(fields), &parent, &child, &options) != -1) {
       configFiles->configFileChild(parent, child, (unsigned int)options);
@@ -742,7 +742,7 @@ LocalManager::sendMgmtMsgToProcesses(MgmtMessageHdr *mh)
                      "Server Process has been terminated\n");
             if (lmgmt->run_proxy) {
               mgmt_log("[Alarms::signalAlarm] Server Process was reset\n");
-              lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_PROXY_PROCESS_DIED, NULL);
+              lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_PROXY_PROCESS_DIED, nullptr);
             } else {
               mgmt_log("[TrafficManager] Server process shutdown\n");
             }
@@ -897,7 +897,7 @@ LocalManager::startProxy()
       ats_scoped_str bindir(RecConfigReadBinDir());
 
       ink_filepath_make(env_prep_bin, sizeof(env_prep_bin), bindir, env_prep);
-      res = execl(env_prep_bin, env_prep_bin, (char *)NULL);
+      res = execl(env_prep_bin, env_prep_bin, (char *)nullptr);
       _exit(res);
     }
   }
@@ -912,7 +912,7 @@ LocalManager::startProxy()
   } else if (pid > 0) { /* Parent */
     proxy_launch_pid         = pid;
     proxy_launch_outstanding = true;
-    proxy_started_at         = time(NULL);
+    proxy_started_at         = time(nullptr);
     ++proxy_launch_count;
     RecSetRecordInt("proxy.node.restarts.proxy.start_time", proxy_started_at, REC_SOURCE_DEFAULT);
     RecSetRecordInt("proxy.node.restarts.proxy.restart_count", proxy_launch_count, REC_SOURCE_DEFAULT);
@@ -965,7 +965,7 @@ LocalManager::startProxy()
     i            = 1;
     tok          = strtok_r(&real_proxy_options[0], " ", &last);
     options[i++] = tok;
-    while (i < 32 && (tok = strtok_r(NULL, " ", &last))) {
+    while (i < 32 && (tok = strtok_r(nullptr, " ", &last))) {
       Debug("lm", "opt %d = '%s'", i, tok);
       options[i++] = tok;
     }
diff --git a/mgmt/MultiFile.cc b/mgmt/MultiFile.cc
index daeb335b0db..9aca1bb14dc 100644
--- a/mgmt/MultiFile.cc
+++ b/mgmt/MultiFile.cc
@@ -46,8 +46,8 @@
 
 MultiFile::MultiFile()
 {
-  managedDir  = NULL;
-  dirDescript = NULL;
+  managedDir  = nullptr;
+  dirDescript = nullptr;
 }
 
 // void MultiFile::addTableEntries(ExpandingArray* fileList, textBuffer* output)
@@ -77,7 +77,7 @@ MultiFile::addTableEntries(ExpandingArray *fileList, textBuffer *output)
     output->copyFrom(dataClose, dataCloseLen);
     output->copyFrom(dataOpen, dataOpenLen);
 
-    if (ink_ctime_r(¤t->c_time, dateBuf) == NULL) {
+    if (ink_ctime_r(¤t->c_time, dateBuf) == nullptr) {
       ink_strlcpy(dateBuf, "No time-stamp", sizeof(dateBuf));
     }
     output->copyFrom(dateBuf, strlen(dateBuf));
@@ -104,7 +104,7 @@ MultiFile::WalkFiles(ExpandingArray *fileList)
   struct stat records_config_fileInfo;
   fileEntry *fileListEntry;
 
-  if ((dir = opendir(managedDir)) == NULL) {
+  if ((dir = opendir(managedDir)) == nullptr) {
     mgmt_log("[MultiFile::WalkFiles] Unable to open %s directory: %s: %s\n", dirDescript, managedDir, strerror(errno));
     return MF_NO_DIR;
   }
@@ -151,7 +151,7 @@ MultiFile::WalkFiles(ExpandingArray *fileList)
 bool
 MultiFile::isManaged(const char *fileName)
 {
-  if (fileName == NULL) {
+  if (fileName == nullptr) {
     return false;
   } else {
     return true;
@@ -236,7 +236,7 @@ MultiFile::newPathString(const char *s1, const char *s2)
   }
   srcLen = strlen(s1);
   newStr = new char[srcLen + addLen + 1];
-  ink_assert(newStr != NULL);
+  ink_assert(newStr != nullptr);
 
   ink_strlcpy(newStr, s1, addLen);
   if (newStr[srcLen - 1] != '/') {
diff --git a/mgmt/ProcessManager.cc b/mgmt/ProcessManager.cc
index face2a91bf4..78870a1740d 100644
--- a/mgmt/ProcessManager.cc
+++ b/mgmt/ProcessManager.cc
@@ -35,7 +35,7 @@
 /*
  * Global ProcessManager
  */
-inkcoreapi ProcessManager *pmgmt = NULL;
+inkcoreapi ProcessManager *pmgmt = nullptr;
 
 /*
  * startProcessManager(...)
@@ -59,7 +59,7 @@ startProcessManager(void *arg)
 
   for (;;) {
     if (unlikely(shutdown_event_system == true)) {
-      return NULL;
+      return nullptr;
     }
     if (pmgmt->require_lm) {
       pmgmt->pollLMConnection();
@@ -72,7 +72,7 @@ startProcessManager(void *arg)
 } /* End startProcessManager */
 
 ProcessManager::ProcessManager(bool rlm)
-  : BaseManager(), require_lm(rlm), local_manager_sockfd(0), cbtable(NULL), max_msgs_in_a_row(1)
+  : BaseManager(), require_lm(rlm), local_manager_sockfd(0), cbtable(nullptr), max_msgs_in_a_row(1)
 {
   mgmt_signal_queue = create_queue();
 
@@ -142,7 +142,7 @@ ProcessManager::processEventQueue()
     if (mh->data_len > 0) {
       executeMgmtCallback(mh->msg_id, (char *)mh + sizeof(MgmtMessageHdr), mh->data_len);
     } else {
-      executeMgmtCallback(mh->msg_id, NULL, 0);
+      executeMgmtCallback(mh->msg_id, nullptr, 0);
     }
     if (mh->msg_id == MGMT_EVENT_SHUTDOWN) {
       mgmt_fatal(0, "[ProcessManager::processEventQueue] Shutdown msg received, exiting\n");
@@ -289,7 +289,7 @@ ProcessManager::handleMgmtMsgFromLM(MgmtMessageHdr *mh)
     signalMgmtEntity(MGMT_EVENT_ROLL_LOG_FILES);
     break;
   case MGMT_EVENT_PLUGIN_CONFIG_UPDATE:
-    if (data_raw != NULL && data_raw[0] != '\0' && this->cbtable) {
+    if (data_raw != nullptr && data_raw[0] != '\0' && this->cbtable) {
       this->cbtable->invoke(data_raw);
     }
     break;
diff --git a/mgmt/ProxyConfig.cc b/mgmt/ProxyConfig.cc
index b59b445c294..23cf750ae51 100644
--- a/mgmt/ProxyConfig.cc
+++ b/mgmt/ProxyConfig.cc
@@ -32,21 +32,21 @@ void *
 config_int_cb(void *data, void *value)
 {
   *(int *)data = *(int64_t *)value;
-  return NULL;
+  return nullptr;
 }
 
 void *
 config_float_cb(void *data, void *value)
 {
   *(float *)data = *(float *)value;
-  return NULL;
+  return nullptr;
 }
 
 void *
 config_long_long_cb(void *data, void *value)
 {
   *(int64_t *)data = *(int64_t *)value;
-  return NULL;
+  return nullptr;
 }
 
 /////////////////////////////////////////////////////////////
@@ -66,7 +66,7 @@ void *
 config_string_alloc_cb(void *data, void *value)
 {
   char *_ss        = (char *)value;
-  char *_new_value = 0;
+  char *_new_value = nullptr;
 
 //#define DEBUG_CONFIG_STRING_UPDATE
 #if defined(DEBUG_CONFIG_STRING_UPDATE)
@@ -83,11 +83,11 @@ config_string_alloc_cb(void *data, void *value)
   *(char **)data = _new_value;
 
   // free old data
-  if (_temp2 != 0) {
+  if (_temp2 != nullptr) {
     new_Freer(_temp2, HRTIME_DAY);
   }
 
-  return NULL;
+  return nullptr;
 }
 
 class ConfigInfoReleaser : public Continuation
@@ -116,7 +116,7 @@ ConfigProcessor::ConfigProcessor() : ninfos(0)
   int i;
 
   for (i = 0; i < MAX_CONFIGS; i++) {
-    infos[i] = NULL;
+    infos[i] = nullptr;
   }
 }
 
@@ -173,7 +173,7 @@ ConfigProcessor::get(unsigned int id)
 
   if (id == 0 || id > MAX_CONFIGS) {
     // return NULL, because we of an invalid index
-    return NULL;
+    return nullptr;
   }
 
   idx  = id - 1;
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 4f8d4bc593b..7962d368723 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -42,60 +42,60 @@ static const RecordElement RecordsConfig[] =
   //# records.config items
   //#
   //##############################################################################
-  {RECT_CONFIG, "proxy.config.product_company", RECD_STRING, "Apache Software Foundation", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.product_company", RECD_STRING, "Apache Software Foundation", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.product_vendor", RECD_STRING, "Apache", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.product_vendor", RECD_STRING, "Apache", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.product_name", RECD_STRING, "Traffic Server", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.product_name", RECD_STRING, "Traffic Server", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.proxy_name", RECD_STRING, BUILD_MACHINE, RECU_DYNAMIC, RR_REQUIRED, RECC_STR, ".+", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.bin_path", RECD_STRING, TS_BUILD_BINDIR, RECU_NULL, RR_REQUIRED, RECC_NULL, NULL, RECA_READ_ONLY}
+  {RECT_CONFIG, "proxy.config.bin_path", RECD_STRING, TS_BUILD_BINDIR, RECU_NULL, RR_REQUIRED, RECC_NULL, nullptr, RECA_READ_ONLY}
   ,
-  {RECT_CONFIG, "proxy.config.proxy_binary", RECD_STRING, "traffic_server", RECU_NULL, RR_REQUIRED, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.proxy_binary", RECD_STRING, "traffic_server", RECU_NULL, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.manager_binary", RECD_STRING, "traffic_manager", RECU_NULL, RR_REQUIRED, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.manager_binary", RECD_STRING, "traffic_manager", RECU_NULL, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.proxy_binary_opts", RECD_STRING, "-M", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.proxy_binary_opts", RECD_STRING, "-M", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.env_prep", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.env_prep", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.config_dir", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TC, RR_NULL, RECC_NULL, NULL, RECA_READ_ONLY}
+  {RECT_CONFIG, "proxy.config.config_dir", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TC, RR_NULL, RECC_NULL, nullptr, RECA_READ_ONLY}
   ,
   // Jira TS-21
-  {RECT_CONFIG, "proxy.config.local_state_dir", RECD_STRING, TS_BUILD_RUNTIMEDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_READ_ONLY}
+  {RECT_CONFIG, "proxy.config.local_state_dir", RECD_STRING, TS_BUILD_RUNTIMEDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_READ_ONLY}
   ,
   {RECT_CONFIG, "proxy.config.alarm_email", RECD_STRING, TS_PKGSYSUSER, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.syslog_facility", RECD_STRING, "LOG_DAEMON", RECU_RESTART_TC, RR_NULL, RECC_STR, ".*", RECA_NULL}
   ,
   //# Negative core limit means max out limit
-  {RECT_CONFIG, "proxy.config.core_limit", RECD_INT, "-1", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.core_limit", RECD_INT, "-1", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.crash_log_helper", RECD_STRING, MGMT_CRASHLOG_HELPER, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.crash_log_helper", RECD_STRING, MGMT_CRASHLOG_HELPER, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   // 0 - Disabled, 1 - enabled for important pages (e.g. cache directory), 2 - enabled for all pages
   {RECT_CONFIG, "proxy.config.mlock_enabled", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-2]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cop.core_signal", RECD_INT, "0", RECU_DYNAMIC, RR_REQUIRED, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cop.core_signal", RECD_INT, "0", RECU_DYNAMIC, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
   ,                             // needed by traffic_cop
-  {RECT_CONFIG, "proxy.config.cop.linux_min_swapfree_kb", RECD_INT, "0", RECU_DYNAMIC, RR_REQUIRED, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cop.linux_min_swapfree_kb", RECD_INT, "0", RECU_DYNAMIC, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
   ,                             // needed by traffic_cop
-  {RECT_CONFIG, "proxy.config.cop.linux_min_memfree_kb", RECD_INT, "0", RECU_DYNAMIC, RR_REQUIRED, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cop.linux_min_memfree_kb", RECD_INT, "0", RECU_DYNAMIC, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
   ,                             // needed by traffic_cop
   {RECT_CONFIG, "proxy.config.cop.init_sleep_time", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-900]", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.cop.active_health_checks", RECD_INT, "3", RECU_NULL, RR_NULL, RECC_NULL, "[0-3]", RECA_NULL}
   ,
   //# 0 = disable (seconds)
-  {RECT_CONFIG, "proxy.config.dump_mem_info_frequency", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.dump_mem_info_frequency", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //# 0 = disable
   {RECT_CONFIG, "proxy.config.http_ui_enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, "[0-3]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.max_disk_errors", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.max_disk_errors", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.output.logfile", RECD_STRING, "traffic.out", RECU_RESTART_TC, RR_REQUIRED, RECC_NULL, NULL,
+  {RECT_CONFIG, "proxy.config.output.logfile", RECD_STRING, "traffic.out", RECU_RESTART_TC, RR_REQUIRED, RECC_NULL, nullptr,
    RECA_NULL}
   ,
   // traffic.out rotation, default is 0 (aka rolling turned off) to preserve compatibility
@@ -105,7 +105,7 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.output.logfile.rolling_size_mb", RECD_INT, "100", RECU_DYNAMIC, RR_NULL, RECC_STR, "^0*[1-9][0-9]*$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.snapshot_dir", RECD_STRING, "snapshots", RECU_DYNAMIC, RR_REQUIRED, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.snapshot_dir", RECD_STRING, "snapshots", RECU_DYNAMIC, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
   ,
   //# 0 = disable
   {RECT_CONFIG, "proxy.config.res_track_memory", RECD_INT, "0", RECU_RESTART_TS, RR_REQUIRED, RECC_INT,  "[0-2]", RECA_NULL}
@@ -116,13 +116,13 @@ static const RecordElement RecordsConfig[] =
   //# Traffic Server system settings
   //##############################################################################
   // The percent of the /proc/sys/fs/file-max value to set the RLIMIT_NOFILE cur/max to
-  {RECT_CONFIG, "proxy.config.system.file_max_pct", RECD_FLOAT, "0.9", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_READ_ONLY}
+  {RECT_CONFIG, "proxy.config.system.file_max_pct", RECD_FLOAT, "0.9", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_READ_ONLY}
   ,
   // Traffic Server Execution threads configuration
   // By default Traffic Server set number of execution threads equal to total CPUs
   {RECT_CONFIG, "proxy.config.exec_thread.autoconfig", RECD_INT, "1", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_READ_ONLY}
   ,
-  {RECT_CONFIG, "proxy.config.exec_thread.autoconfig.scale", RECD_FLOAT, "1.5", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_READ_ONLY}
+  {RECT_CONFIG, "proxy.config.exec_thread.autoconfig.scale", RECD_FLOAT, "1.5", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_READ_ONLY}
   ,
   {RECT_CONFIG, "proxy.config.exec_thread.limit", RECD_INT, "2", RECU_RESTART_TS, RR_NULL, RECC_INT, "[1-" TS_STR(TS_MAX_NUMBER_EVENT_THREADS) "]", RECA_READ_ONLY}
   ,
@@ -134,7 +134,7 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.thread.default.stacksize", RECD_INT, "1048576", RECU_RESTART_TS, RR_NULL, RECC_INT, "[131072-104857600]", RECA_READ_ONLY}
   ,
-  {RECT_CONFIG, "proxy.config.restart.active_client_threshold", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.restart.active_client_threshold", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //##############################################################################
@@ -161,7 +161,7 @@ static const RecordElement RecordsConfig[] =
   //
   // Websocket configs
   //
-  {RECT_CONFIG, "proxy.config.http.websocket.max_number_of_connections", RECD_INT, "-1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.websocket.max_number_of_connections", RECD_INT, "-1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //##############################################################################
   //#
@@ -175,13 +175,13 @@ static const RecordElement RecordsConfig[] =
   //##############################################################################
   {RECT_CONFIG, "proxy.config.http.redirection_enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.number_of_redirections", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.number_of_redirections", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.redirect_use_orig_cache_key", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.redirect_use_orig_cache_key", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.redirect_host_no_port", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.redirect_host_no_port", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.post_copy_size", RECD_INT, "2048", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.post_copy_size", RECD_INT, "2048", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //##############################################################################
@@ -198,31 +198,31 @@ static const RecordElement RecordsConfig[] =
   //##############################################################################
   {RECT_CONFIG, "proxy.config.diags.debug.enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.diags.debug.tags", RECD_STRING, "http.*|dns.*", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.diags.debug.tags", RECD_STRING, "http.*|dns.*", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.diags.action.enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.diags.action.enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.diags.action.tags", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.diags.action.tags", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.diags.show_location", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, "[0-2]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.diags.output.diag", RECD_STRING, "E", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.diags.output.diag", RECD_STRING, "E", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.diags.output.debug", RECD_STRING, "E", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.diags.output.debug", RECD_STRING, "E", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.diags.output.status", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.diags.output.status", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.diags.output.note", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.diags.output.note", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.diags.output.warning", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.diags.output.warning", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.diags.output.error", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.diags.output.error", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.diags.output.fatal", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.diags.output.fatal", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.diags.output.alert", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.diags.output.alert", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.diags.output.emergency", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.diags.output.emergency", RECD_STRING, "L", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   // diags.log rotation, default is 0 (aka rolling turned off) to preserve compatibility
   {RECT_CONFIG, "proxy.config.diags.logfile.rolling_enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-2]", RECA_NULL}
@@ -237,33 +237,33 @@ static const RecordElement RecordsConfig[] =
   //# Local Manager
   //#
   //##############################################################################
-  {RECT_CONFIG, "proxy.config.lm.pserver_timeout_secs", RECD_INT, "1", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.lm.pserver_timeout_secs", RECD_INT, "1", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.lm.pserver_timeout_msecs", RECD_INT, "0", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.lm.pserver_timeout_msecs", RECD_INT, "0", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.delta_thresh", RECD_INT, "30", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.delta_thresh", RECD_INT, "30", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.peer_timeout", RECD_INT, "30", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.peer_timeout", RECD_INT, "30", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.mc_send_interval", RECD_INT, "2", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.mc_send_interval", RECD_INT, "2", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.mc_poll_timeout", RECD_INT, "5", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.mc_poll_timeout", RECD_INT, "5", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.startup_timeout", RECD_INT, "10", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.startup_timeout", RECD_INT, "10", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //# cluster type requires restart to change
   //# 1 is full clustering, 2 is mgmt only, 3 is no clustering
-  {RECT_LOCAL, "proxy.local.cluster.type", RECD_INT, "3", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_LOCAL, "proxy.local.cluster.type", RECD_INT, "3", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.rsport", RECD_INT, "8088", RECU_NULL, RR_REQUIRED, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.rsport", RECD_INT, "8088", RECU_NULL, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.mcport", RECD_INT, "8089", RECU_DYNAMIC, RR_REQUIRED, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.mcport", RECD_INT, "8089", RECU_DYNAMIC, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.cluster.mc_group_addr", RECD_STRING, "224.0.1.37", RECU_DYNAMIC, RR_REQUIRED, RECC_IP, "[0-255]\\.[0-255]\\.[0-255]\\.[0-255]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.mc_ttl", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.mc_ttl", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.log_bogus_mc_msgs", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.log_bogus_mc_msgs", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.admin.synthetic_port", RECD_INT, "8083", RECU_RESTART_TM, RR_REQUIRED, RECC_INT, "[0-65535]", RECA_NULL}
   ,
@@ -271,11 +271,11 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.admin.admin_user", RECD_STRING, "admin", RECU_DYNAMIC, RR_REQUIRED, RECC_STR, ".+", RECA_NO_ACCESS}
   ,
-  {RECT_CONFIG, "proxy.config.admin.number_config_bak", RECD_INT, "3", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.admin.number_config_bak", RECD_INT, "3", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.admin.user_id", RECD_STRING, TS_PKGSYSUSER, RECU_NULL, RR_REQUIRED, RECC_NULL, NULL, RECA_READ_ONLY}
+  {RECT_CONFIG, "proxy.config.admin.user_id", RECD_STRING, TS_PKGSYSUSER, RECU_NULL, RR_REQUIRED, RECC_NULL, nullptr, RECA_READ_ONLY}
   ,
-  {RECT_CONFIG, "proxy.config.admin.cli_path", RECD_STRING, "cli", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.admin.cli_path", RECD_STRING, "cli", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.admin.api.restricted", RECD_INT, "0", RECU_RESTART_TM, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
@@ -285,13 +285,13 @@ static const RecordElement RecordsConfig[] =
   //# UDP configuration stuff: hidden variables
   //#
   //##############################################################################
-  {RECT_CONFIG, "proxy.config.udp.free_cancelled_pkts_sec", RECD_INT, "10", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.udp.free_cancelled_pkts_sec", RECD_INT, "10", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.udp.periodic_cleanup", RECD_INT, "10", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.udp.periodic_cleanup", RECD_INT, "10", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.udp.send_retries", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.udp.send_retries", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.udp.threads", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.udp.threads", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //##############################################################################
@@ -299,11 +299,11 @@ static const RecordElement RecordsConfig[] =
   //# Process Manager
   //#
   //##############################################################################
-  {RECT_CONFIG, "proxy.config.process_manager.timeout", RECD_INT, "5", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.process_manager.timeout", RECD_INT, "5", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.process_manager.enable_mgmt_port", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.process_manager.enable_mgmt_port", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.process_manager.mgmt_port", RECD_INT, "8084", RECU_NULL, RR_REQUIRED, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.process_manager.mgmt_port", RECD_INT, "8084", RECU_NULL, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //##############################################################################
@@ -313,9 +313,9 @@ static const RecordElement RecordsConfig[] =
   //##############################################################################
   {RECT_CONFIG, "proxy.config.vmap.enabled", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.vmap.addr_file", RECD_STRING, "vaddrs.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.vmap.addr_file", RECD_STRING, "vaddrs.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.vmap.down_up_timeout", RECD_INT, "10", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.vmap.down_up_timeout", RECD_INT, "10", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //##############################################################################
@@ -326,9 +326,9 @@ static const RecordElement RecordsConfig[] =
   //        #################################################################
   //        # execute alarm as "/ """ #
   //        #################################################################
-  {RECT_CONFIG, "proxy.config.alarm.bin", RECD_STRING, "example_alarm_bin.sh", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.alarm.bin", RECD_STRING, "example_alarm_bin.sh", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.alarm.abs_path", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.alarm.abs_path", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.alarm.script_runtime", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-300]", RECA_NULL}
   ,
@@ -336,43 +336,43 @@ static const RecordElement RecordsConfig[] =
   //####################################################################
   //# congestion control
   //####################################################################
-  {RECT_CONFIG, "proxy.config.http.congestion_control.enabled", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.enabled", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.localtime", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.localtime", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.filename", RECD_STRING, "congestion.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.filename", RECD_STRING, "congestion.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.default.max_connection_failures", RECD_INT, "5", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.default.max_connection_failures", RECD_INT, "5", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.default.fail_window", RECD_INT, "120", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.default.fail_window", RECD_INT, "120", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.default.proxy_retry_interval", RECD_INT, "10", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.default.proxy_retry_interval", RECD_INT, "10", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.default.client_wait_interval", RECD_INT, "300", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.default.client_wait_interval", RECD_INT, "300", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.default.wait_interval_alpha", RECD_INT, "30", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.default.wait_interval_alpha", RECD_INT, "30", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.default.live_os_conn_timeout", RECD_INT, "60", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.default.live_os_conn_timeout", RECD_INT, "60", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.default.live_os_conn_retries", RECD_INT, "2", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.default.live_os_conn_retries", RECD_INT, "2", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.default.dead_os_conn_timeout", RECD_INT, "15", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.default.dead_os_conn_timeout", RECD_INT, "15", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.default.dead_os_conn_retries", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.default.dead_os_conn_retries", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.default.max_connection", RECD_INT, "-1", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.default.max_connection", RECD_INT, "-1", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.default.error_page", RECD_STRING, "congestion#retryAfter", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.default.error_page", RECD_STRING, "congestion#retryAfter", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.congestion_control.default.congestion_scheme", RECD_STRING, "per_ip", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.congestion_control.default.congestion_scheme", RECD_STRING, "per_ip", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //        ###########
   //        # Parsing #
   //        ###########
-  {RECT_CONFIG, "proxy.config.header.parse.no_host_url_redirect", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.header.parse.no_host_url_redirect", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.parse.allow_non_http", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.parse.allow_non_http", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //##############################################################################
@@ -386,22 +386,22 @@ static const RecordElement RecordsConfig[] =
   //       #
   {RECT_CONFIG, "proxy.config.http.enabled", RECD_INT, "1", RECU_RESTART_TM, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.server_ports", RECD_STRING, "8080 8080:ipv6", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.server_ports", RECD_STRING, "8080 8080:ipv6", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.wait_for_cache", RECD_INT, "0", RECU_RESTART_TM, RR_NULL, RECC_INT, "[0-3]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.insert_request_via_str", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.insert_request_via_str", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.insert_response_via_str", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.insert_response_via_str", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //        # verbose via string
   //        #
   //        # 0 - no extra info added to string
   //        # 1 - all extra information added
   //        # 2 - some extra info added
-  {RECT_CONFIG, "proxy.config.http.request_via_str", RECD_STRING, "ApacheTrafficServer/" PACKAGE_VERSION, RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.request_via_str", RECD_STRING, "ApacheTrafficServer/" PACKAGE_VERSION, RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.response_via_str", RECD_STRING, "ApacheTrafficServer/" PACKAGE_VERSION, RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.response_via_str", RECD_STRING, "ApacheTrafficServer/" PACKAGE_VERSION, RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.response_server_enabled", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, "[0-2]", RECA_NULL}
   ,
@@ -417,21 +417,21 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.http.use_client_source_port", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.keep_alive_enabled_in", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.keep_alive_enabled_in", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.keep_alive_enabled_out", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.keep_alive_enabled_out", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.keep_alive_post_out", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.keep_alive_post_out", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.chunking_enabled", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.chunking_enabled", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.chunking.size", RECD_INT, "4096", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.chunking.size", RECD_INT, "4096", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.flow_control.enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.flow_control.enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.flow_control.high_water", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.flow_control.high_water", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.flow_control.low_water", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.flow_control.low_water", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.post.check.content_length.enabled", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
@@ -445,23 +445,23 @@ static const RecordElement RecordsConfig[] =
   //       #   3 - if the client request is 1.1 & the server
   //       #         has returned 1.1 before
   //       #
-  {RECT_CONFIG, "proxy.config.http.send_http11_requests", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.send_http11_requests", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.send_100_continue_response", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.send_100_continue_response", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.disallow_post_100_continue", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.disallow_post_100_continue", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.server_session_sharing.match", RECD_STRING, "both", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.server_session_sharing.match", RECD_STRING, "both", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.server_session_sharing.pool", RECD_STRING, "thread", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.server_session_sharing.pool", RECD_STRING, "thread", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.record_heartbeat", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.record_heartbeat", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.default_buffer_size", RECD_INT, "8", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.default_buffer_size", RECD_INT, "8", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.default_buffer_water_mark", RECD_INT, "32768", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.default_buffer_water_mark", RECD_INT, "32768", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.enable_http_info", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.enable_http_info", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.server_max_connections", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
@@ -483,11 +483,11 @@ static const RecordElement RecordsConfig[] =
   //       ###########################
   //       # HTTP referrer filtering #
   //       ###########################
-  {RECT_CONFIG, "proxy.config.http.referer_filter", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.referer_filter", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.referer_format_redirect", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.referer_format_redirect", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.referer_default_redirect", RECD_STRING, "http://www.example.com/", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.referer_default_redirect", RECD_STRING, "http://www.example.com/", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.auth_server_session_private", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
@@ -498,23 +498,23 @@ static const RecordElement RecordsConfig[] =
   //        ##############################
   {RECT_CONFIG, "proxy.config.http.parent_proxy_routing_enable", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.parent_proxies", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.parent_proxies", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.parent_proxy.file", RECD_STRING, "parent.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.parent_proxy.file", RECD_STRING, "parent.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.parent_proxy.retry_time", RECD_INT, "300", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.parent_proxy.retry_time", RECD_INT, "300", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //# Parent fail threshold is the number of request that must fail within
   //#  the retry window for the parent to be marked down
-  {RECT_CONFIG, "proxy.config.http.parent_proxy.fail_threshold", RECD_INT, "10", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.parent_proxy.fail_threshold", RECD_INT, "10", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.parent_proxy.total_connect_attempts", RECD_INT, "4", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.parent_proxy.total_connect_attempts", RECD_INT, "4", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.parent_proxy.per_parent_connect_attempts", RECD_INT, "2", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.parent_proxy.per_parent_connect_attempts", RECD_INT, "2", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.parent_proxy.connect_attempts_timeout", RECD_INT, "30", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.parent_proxy.connect_attempts_timeout", RECD_INT, "30", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.forward.proxy_auth_to_parent", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.forward.proxy_auth_to_parent", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //        ###################################
@@ -546,37 +546,37 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.http.transaction_active_timeout_out", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.accept_no_activity_timeout", RECD_INT, "120", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.accept_no_activity_timeout", RECD_INT, "120", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.background_fill_active_timeout", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.background_fill_active_timeout", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.background_fill_completed_threshold", RECD_FLOAT, "0.0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.background_fill_completed_threshold", RECD_FLOAT, "0.0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //        ##################################
   //        # origin server connect attempts #
   //        ##################################
-  {RECT_CONFIG, "proxy.config.http.connect_attempts_max_retries", RECD_INT, "3", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.connect_attempts_max_retries", RECD_INT, "3", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.connect_attempts_max_retries_dead_server", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.connect_attempts_max_retries_dead_server", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.connect_attempts_rr_retries", RECD_INT, "3", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.connect_attempts_rr_retries", RECD_INT, "3", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.connect_attempts_timeout", RECD_INT, "30", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.connect_attempts_timeout", RECD_INT, "30", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.post_connect_attempts_timeout", RECD_INT, "1800", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.post_connect_attempts_timeout", RECD_INT, "1800", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.down_server.cache_time", RECD_INT, "60", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.down_server.cache_time", RECD_INT, "60", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.down_server.abort_threshold", RECD_INT, "10", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.down_server.abort_threshold", RECD_INT, "10", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.negative_revalidating_enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.negative_revalidating_enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.negative_revalidating_lifetime", RECD_INT, "1800", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.negative_revalidating_lifetime", RECD_INT, "1800", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.negative_caching_enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.negative_caching_enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.negative_caching_lifetime", RECD_INT, "1800", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.negative_caching_lifetime", RECD_INT, "1800", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //        #########################
@@ -594,9 +594,9 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.http.insert_client_ip", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.anonymize_other_header_list", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.anonymize_other_header_list", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.insert_squid_x_forwarded_for", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.insert_squid_x_forwarded_for", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.insert_age_in_response", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
@@ -608,15 +608,15 @@ static const RecordElement RecordsConfig[] =
   //        ####################################################
   //        # Global User-Agent header                         #
   //        ####################################################
-  {RECT_CONFIG, "proxy.config.http.global_user_agent_header", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.global_user_agent_header", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
   ,
 
   //        ############
   //        # security #
   //        ############
-  {RECT_CONFIG, "proxy.config.http.request_header_max_size", RECD_INT, "131072", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.request_header_max_size", RECD_INT, "131072", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.response_header_max_size", RECD_INT, "131072", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.response_header_max_size", RECD_INT, "131072", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.push_method_enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
@@ -626,7 +626,7 @@ static const RecordElement RecordsConfig[] =
   //        #################
   {RECT_CONFIG, "proxy.config.http.cache.http", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.generation", RECD_INT, "-1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.generation", RECD_INT, "-1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   // Enabling this setting allows the proxy to cache empty documents. This currently requires
   // that the response has a Content-Length: header, with a value of "0".
@@ -638,9 +638,9 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.http.cache.ignore_client_cc_max_age", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.ims_on_client_no_cache", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.ims_on_client_no_cache", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.ignore_server_no_cache", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.ignore_server_no_cache", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //       # cache responses to cookies has 4 options
   //       #
@@ -651,7 +651,7 @@ static const RecordElement RecordsConfig[] =
   //       #  4 - cache for all but text content-types except OS response without "Set-Cookie" or with "Cache-Control: public"
   {RECT_CONFIG, "proxy.config.http.cache.cache_responses_to_cookies", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-4]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.ignore_authentication", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.ignore_authentication", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.cache.cache_urls_that_look_dynamic", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
@@ -659,11 +659,11 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.http.cache.post_method", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.max_open_read_retries", RECD_INT, "-1", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.max_open_read_retries", RECD_INT, "-1", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.open_read_retry_time", RECD_INT, "10", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.open_read_retry_time", RECD_INT, "10", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.max_open_write_retries", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.max_open_write_retries", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //       #  open_write_fail_action has 3 options:
   //       #
@@ -672,7 +672,7 @@ static const RecordElement RecordsConfig[] =
   //       #  2 - serve stale until proxy.config.http.cache.max_stale_age, then goto origin, if revalidate
   //       #  3 - return error if cache miss or serve stale until proxy.config.http.cache.max_stale_age, then goto origin, if revalidate
   //       #  4 - return error if cache miss or if revalidate
-  {RECT_CONFIG, "proxy.config.http.cache.open_write_fail_action", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.open_write_fail_action", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //       #  when_to_revalidate has 4 options:
   //       #
@@ -681,7 +681,7 @@ static const RecordElement RecordsConfig[] =
   //       #  2 - always stale (always revalidate)
   //       #  3 - never stale
   //       #
-  {RECT_CONFIG, "proxy.config.http.cache.when_to_revalidate", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.when_to_revalidate", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //
   //       #  required headers: three options
@@ -690,13 +690,13 @@ static const RecordElement RecordsConfig[] =
   //       #  1 - at least, "Last-Modified:" header required
   //       #  2 - explicit lifetime required, "Expires:" or "Cache-Control:"
   //       #
-  {RECT_CONFIG, "proxy.config.http.cache.required_headers", RECD_INT, "2", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.required_headers", RECD_INT, "2", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.max_stale_age", RECD_INT, "604800", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.max_stale_age", RECD_INT, "604800", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.range.lookup", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.range.lookup", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.range.write", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.range.write", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //        ########################
@@ -706,33 +706,33 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.http.cache.heuristic_max_lifetime", RECD_INT, "86400", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.heuristic_lm_factor", RECD_FLOAT, "0.10", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.heuristic_lm_factor", RECD_FLOAT, "0.10", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.guaranteed_min_lifetime", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.guaranteed_min_lifetime", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.guaranteed_max_lifetime", RECD_INT, "31536000", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.guaranteed_max_lifetime", RECD_INT, "31536000", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.fuzz.time", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.fuzz.time", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.fuzz.min_time", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.fuzz.min_time", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.fuzz.probability", RECD_FLOAT, "0.0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.fuzz.probability", RECD_FLOAT, "0.0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //        #########################################
   //        # dynamic content & content negotiation #
   //        #########################################
-  {RECT_CONFIG, "proxy.config.http.cache.vary_default_text", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.vary_default_text", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.vary_default_images", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.vary_default_images", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.cache.vary_default_other", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.cache.vary_default_other", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
   ,
 
   //        ###################
   //        # Error Reporting #
   //        ###################
-  {RECT_CONFIG, "proxy.config.http.errors.log_error_pages", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.http.errors.log_error_pages", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.slow.log.threshold", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
@@ -767,29 +767,29 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.socks.socks_version", RECD_INT, "4", RECU_RESTART_TS, RR_NULL, RECC_INT, "[4-5]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.socks.socks_config_file", RECD_STRING, "socks.config", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.socks.socks_config_file", RECD_STRING, "socks.config", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.socks.socks_timeout", RECD_INT, "100", RECU_RESTART_TS, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.socks.server_connect_timeout", RECD_INT, "10", RECU_RESTART_TS, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.socks.per_server_connection_attempts", RECD_INT, "1", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.socks.per_server_connection_attempts", RECD_INT, "1", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.socks.connection_attempts", RECD_INT, "4", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.socks.connection_attempts", RECD_INT, "4", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.socks.server_retry_timeout", RECD_INT, "300", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.socks.server_retry_timeout", RECD_INT, "300", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.socks.default_servers", RECD_STRING, "", RECU_RESTART_TS, RR_NULL, RECC_STR, "^([^[:space:]]+:[0-9]+;?)*$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.socks.server_retry_time", RECD_INT, "300", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.socks.server_retry_time", RECD_INT, "300", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.socks.server_fail_threshold", RECD_INT, "2", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.socks.server_fail_threshold", RECD_INT, "2", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.socks.accept_enabled", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.socks.accept_enabled", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.socks.accept_port", RECD_INT, "1080", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-65535]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.socks.http_port", RECD_INT, "80", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.socks.http_port", RECD_INT, "80", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //##############################################################################
@@ -797,7 +797,7 @@ static const RecordElement RecordsConfig[] =
   //# I/O Subsystem
   //#
   //##############################################################################
-  {RECT_CONFIG, "proxy.config.io.max_buffer_size", RECD_INT, "32768", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.io.max_buffer_size", RECD_INT, "32768", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //##############################################################################
@@ -807,7 +807,7 @@ static const RecordElement RecordsConfig[] =
   //##############################################################################
   {RECT_CONFIG, "proxy.config.net.connections_throttle", RECD_INT, "30000", RECU_RESTART_TS, RR_REQUIRED, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.listen_backlog", RECD_INT, "-1", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.listen_backlog", RECD_INT, "-1", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   // This option takes different defaults depending on features / platform. TODO: This should use the
   // autoconf stuff probably ?
@@ -823,43 +823,43 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.net.sock_send_buffer_size_in", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.sock_option_flag_in", RECD_INT, "0x5", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.sock_option_flag_in", RECD_INT, "0x5", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.sock_packet_mark_in", RECD_INT, "0x0", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.sock_packet_mark_in", RECD_INT, "0x0", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.sock_packet_tos_in", RECD_INT, "0x0", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.sock_packet_tos_in", RECD_INT, "0x0", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.net.sock_recv_buffer_size_out", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.net.sock_send_buffer_size_out", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.sock_option_flag_out", RECD_INT, "0x1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.sock_option_flag_out", RECD_INT, "0x1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.sock_packet_mark_out", RECD_INT, "0x0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.sock_packet_mark_out", RECD_INT, "0x0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.sock_packet_tos_out", RECD_INT, "0x0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.sock_packet_tos_out", RECD_INT, "0x0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.sock_mss_in", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.sock_mss_in", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.poll_timeout", RECD_INT, "10", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.poll_timeout", RECD_INT, "10", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.default_inactivity_timeout", RECD_INT, "86400", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.default_inactivity_timeout", RECD_INT, "86400", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.inactivity_check_frequency", RECD_INT, "1", RECU_RESTART_TC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.inactivity_check_frequency", RECD_INT, "1", RECU_RESTART_TC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.event_period", RECD_INT, "10", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.event_period", RECD_INT, "10", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.accept_period", RECD_INT, "10", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.accept_period", RECD_INT, "10", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.retry_delay", RECD_INT, "10", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.retry_delay", RECD_INT, "10", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.throttle_delay", RECD_INT, "50", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.throttle_delay", RECD_INT, "50", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.sock_option_tfo_queue_size_in", RECD_INT, "10000", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.sock_option_tfo_queue_size_in", RECD_INT, "10000", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.tcp_congestion_control_in", RECD_STRING, "", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.tcp_congestion_control_in", RECD_STRING, "", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.net.tcp_congestion_control_out", RECD_STRING, "", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.net.tcp_congestion_control_out", RECD_STRING, "", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //##############################################################################
@@ -869,27 +869,27 @@ static const RecordElement RecordsConfig[] =
   //##############################################################################
   {RECT_CONFIG, "proxy.config.cluster.threads", RECD_INT, "1", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-512]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.cluster_port", RECD_INT, "8086", RECU_RESTART_TS, RR_REQUIRED, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.cluster_port", RECD_INT, "8086", RECU_RESTART_TS, RR_REQUIRED, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.cluster_configuration", RECD_STRING, "cluster.config", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.cluster_configuration", RECD_STRING, "cluster.config", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.cluster.ethernet_interface", RECD_STRING, TS_BUILD_DEFAULT_LOOPBACK_IFACE, RECU_RESTART_TS, RR_REQUIRED, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.enable_monitor", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.enable_monitor", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.monitor_interval_secs", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.monitor_interval_secs", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.send_buffer_size", RECD_INT, "10485760", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.send_buffer_size", RECD_INT, "10485760", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.receive_buffer_size", RECD_INT, "10485760", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.receive_buffer_size", RECD_INT, "10485760", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.sock_option_flag", RECD_INT, "0x0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.sock_option_flag", RECD_INT, "0x0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.sock_packet_mark", RECD_INT, "0x0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.sock_packet_mark", RECD_INT, "0x0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.sock_packet_tos", RECD_INT, "0x0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.sock_packet_tos", RECD_INT, "0x0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.rpc_cache_cluster", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.rpc_cache_cluster", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //##################################################################
@@ -897,49 +897,49 @@ static const RecordElement RecordsConfig[] =
   //# Internal use only
   //##################################################################
   //# load monitor_enabled: -1 = compute only, 0 = disable, 1 = compute and act
-  {RECT_CONFIG, "proxy.config.cluster.load_monitor_enabled", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.load_monitor_enabled", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.ping_send_interval_msecs", RECD_INT, "100", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.ping_send_interval_msecs", RECD_INT, "100", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.ping_response_buckets", RECD_INT, "100", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.ping_response_buckets", RECD_INT, "100", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.msecs_per_ping_response_bucket", RECD_INT, "50", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.msecs_per_ping_response_bucket", RECD_INT, "50", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.ping_latency_threshold_msecs", RECD_INT, "500", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.ping_latency_threshold_msecs", RECD_INT, "500", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.load_compute_interval_msecs", RECD_INT, "5000", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.load_compute_interval_msecs", RECD_INT, "5000", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.periodic_timer_interval_msecs", RECD_INT, "100", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.periodic_timer_interval_msecs", RECD_INT, "100", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.ping_history_buf_length", RECD_INT, "120", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.ping_history_buf_length", RECD_INT, "120", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.cluster_load_clear_duration", RECD_INT, "24", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.cluster_load_clear_duration", RECD_INT, "24", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cluster.cluster_load_exceed_duration", RECD_INT, "4", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cluster.cluster_load_exceed_duration", RECD_INT, "4", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //##############################################################################
   //#
   //# Hit Evacuation
   //#
   //##############################################################################
-  {RECT_CONFIG, "proxy.config.cache.hit_evacuate_percent", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.hit_evacuate_percent", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.hit_evacuate_size_limit", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.hit_evacuate_size_limit", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //##############################################################################
   //#
   //# Cache
   //#
   //##############################################################################
-  {RECT_CONFIG, "proxy.config.cache.storage_filename", RECD_STRING, "storage.config", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.storage_filename", RECD_STRING, "storage.config", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.control.filename", RECD_STRING, "cache.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.control.filename", RECD_STRING, "cache.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.ip_allow.filename", RECD_STRING, "ip_allow.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.ip_allow.filename", RECD_STRING, "ip_allow.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.hosting_filename", RECD_STRING, "hosting.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.hosting_filename", RECD_STRING, "hosting.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.volume_filename", RECD_STRING, "volume.config", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.volume_filename", RECD_STRING, "volume.config", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.cache.permit.pinning", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
@@ -953,46 +953,46 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.cache.ram_cache.compress", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-3]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.ram_cache.compress_percent", RECD_INT, "90", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.ram_cache.compress_percent", RECD_INT, "90", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //  # how often should the directory be synced (seconds)
-  {RECT_CONFIG, "proxy.config.cache.dir.sync_frequency", RECD_INT, "60", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.dir.sync_frequency", RECD_INT, "60", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.hostdb.disable_reverse_lookup", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.hostdb.disable_reverse_lookup", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.select_alternate", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.select_alternate", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.ram_cache_cutoff", RECD_INT, "4194304", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.ram_cache_cutoff", RECD_INT, "4194304", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //  # The maximum number of alternates that are allowed for any given URL.
   //  # (0 disables the maximum number of alts check)
   {RECT_CONFIG, "proxy.config.cache.limits.http.max_alts", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.force_sector_size", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.force_sector_size", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.target_fragment_size", RECD_INT, "1048576", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.target_fragment_size", RECD_INT, "1048576", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //  # The maximum size of a document that will be stored in the cache.
   //  # (0 disables the maximum document size check)
   {RECT_CONFIG, "proxy.config.cache.max_doc_size", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.min_average_object_size", RECD_INT, "8000", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.min_average_object_size", RECD_INT, "8000", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.threads_per_disk", RECD_INT, "8", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.threads_per_disk", RECD_INT, "8", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.agg_write_backlog", RECD_INT, "5242880", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.agg_write_backlog", RECD_INT, "5242880", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.enable_checksum", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.enable_checksum", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.alt_rewrite_max_size", RECD_INT, "4096", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.alt_rewrite_max_size", RECD_INT, "4096", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.enable_read_while_writer", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.enable_read_while_writer", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.mutex_retry_delay", RECD_INT, "2", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.mutex_retry_delay", RECD_INT, "2", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.read_while_writer.max_retries", RECD_INT, "10", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.read_while_writer.max_retries", RECD_INT, "10", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.cache.read_while_writer_retry.delay", RECD_INT, "50", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.read_while_writer_retry.delay", RECD_INT, "50", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //##############################################################################
@@ -1000,37 +1000,37 @@ static const RecordElement RecordsConfig[] =
   //# DNS
   //#
   //##############################################################################
-  {RECT_CONFIG, "proxy.config.dns.lookup_timeout", RECD_INT, "20", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.dns.lookup_timeout", RECD_INT, "20", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.dns.retries", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_NULL, "[0-9]", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.dns.search_default_domains", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.dns.failover_number", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.dns.failover_number", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.dns.failover_period", RECD_INT, "60", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.dns.failover_period", RECD_INT, "60", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.dns.max_dns_in_flight", RECD_INT, "2048", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.dns.max_dns_in_flight", RECD_INT, "2048", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.dns.validate_query_name", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.dns.splitDNS.enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.dns.splitdns.filename", RECD_STRING, "splitdns.config", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.dns.splitdns.filename", RECD_STRING, "splitdns.config", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.dns.nameservers", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.dns.nameservers", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.dns.local_ipv6", RECD_STRING, NULL, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.dns.local_ipv6", RECD_STRING, nullptr, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.dns.local_ipv4", RECD_STRING, NULL, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.dns.local_ipv4", RECD_STRING, nullptr, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.dns.resolv_conf", RECD_STRING, "/etc/resolv.conf", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.dns.resolv_conf", RECD_STRING, "/etc/resolv.conf", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.dns.round_robin_nameservers", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.dns.round_robin_nameservers", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.dns.dedicated_thread", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.hostdb.ip_resolve", RECD_STRING, NULL, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.ip_resolve", RECD_STRING, nullptr, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //##############################################################################
@@ -1041,16 +1041,16 @@ static const RecordElement RecordsConfig[] =
   {RECT_CONFIG, "proxy.config.hostdb", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
   ,
   //       # up to 511 characters, may not be changed while running
-  {RECT_CONFIG, "proxy.config.hostdb.filename", RECD_STRING, "host.db", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.filename", RECD_STRING, "host.db", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //       # in entries, may not be changed while running
-  {RECT_CONFIG, "proxy.config.hostdb.max_count", RECD_INT, "-1", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.max_count", RECD_INT, "-1", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.hostdb.storage_path", RECD_STRING, TS_BUILD_CACHEDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.storage_path", RECD_STRING, TS_BUILD_CACHEDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.hostdb.max_size", RECD_INT, "10M", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.max_size", RECD_INT, "10M", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.hostdb.partitions", RECD_INT, "64", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.partitions", RECD_INT, "64", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //       # in minutes (all three)
   //       #  0 = obey, 1 = ignore, 2 = min(X,ttl), 3 = max(X,ttl)
@@ -1060,35 +1060,35 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.hostdb.timeout", RECD_INT, "86400", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.hostdb.verify_after", RECD_INT, "720", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.verify_after", RECD_INT, "720", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.hostdb.fail.timeout", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.fail.timeout", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.hostdb.re_dns_on_reload", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.re_dns_on_reload", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.hostdb.serve_stale_for", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.serve_stale_for", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //       # move entries to the owner on a lookup?
-  {RECT_CONFIG, "proxy.config.hostdb.migrate_on_demand", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.migrate_on_demand", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //       # find DNS results on another node in the cluster?
-  {RECT_CONFIG, "proxy.config.hostdb.cluster", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.cluster", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //       # find DNS results for round-robin hosts on another node in the cluster?
-  {RECT_CONFIG, "proxy.config.hostdb.cluster.round_robin", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.cluster.round_robin", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //       # round-robin addresses for single clients
   //       # (can cause authentication problems)
-  {RECT_CONFIG, "proxy.config.hostdb.strict_round_robin", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.strict_round_robin", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.hostdb.timed_round_robin", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.timed_round_robin", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //       # how often should the hostdb be synced (seconds)
-  {RECT_CONFIG, "proxy.config.cache.hostdb.sync_frequency", RECD_INT, "120", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.cache.hostdb.sync_frequency", RECD_INT, "120", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.hostdb.host_file.path", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.host_file.path", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.hostdb.host_file.interval", RECD_INT, "86400", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.hostdb.host_file.interval", RECD_INT, "86400", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.disable_configuration_modification", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
   ,
@@ -1107,11 +1107,11 @@ static const RecordElement RecordsConfig[] =
   //        # Various update periods #
   //        ##########################
   // Periods of update threads
-  {RECT_CONFIG, "proxy.config.config_update_interval_ms", RECD_INT, "3000", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.config_update_interval_ms", RECD_INT, "3000", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.raw_stat_sync_interval_ms", RECD_INT, "5000", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.raw_stat_sync_interval_ms", RECD_INT, "5000", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.remote_sync_interval_ms", RECD_INT, "5000", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.remote_sync_interval_ms", RECD_INT, "5000", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //        ###########
   //        # Parsing #
@@ -1127,9 +1127,9 @@ static const RecordElement RecordsConfig[] =
   //# 2: full logging
   {RECT_CONFIG, "proxy.config.log.logging_enabled", RECD_INT, "3", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-4]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.log_buffer_size", RECD_INT, "9216", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.log_buffer_size", RECD_INT, "9216", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.max_secs_per_buffer", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.max_secs_per_buffer", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.log.max_space_mb_for_logs", RECD_INT, "25000", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
@@ -1137,17 +1137,17 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.log.max_space_mb_headroom", RECD_INT, "1000", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.hostname", RECD_STRING, "localhost", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.hostname", RECD_STRING, "localhost", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.log.logfile_dir", RECD_STRING, TS_BUILD_LOGDIR, RECU_DYNAMIC, RR_NULL, RECC_STR, "^[^[:space:]]+$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.logfile_perm", RECD_STRING, "rw-r--r--", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.logfile_perm", RECD_STRING, "rw-r--r--", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.config.filename", RECD_STRING, "logging.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.config.filename", RECD_STRING, "logging.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.hosts_config_file", RECD_STRING, "log_hosts.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.hosts_config_file", RECD_STRING, "log_hosts.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.collation_host", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.collation_host", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.log.collation_port", RECD_INT, "8085", RECU_DYNAMIC, RR_REQUIRED, RECC_INT, "[0-65535]", RECA_NULL}
   ,
@@ -1155,15 +1155,15 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.log.collation_host_tagged", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.collation_retry_sec", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.collation_retry_sec", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.collation_max_send_buffers", RECD_INT, "16", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.collation_max_send_buffers", RECD_INT, "16", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.log.collation_preproc_threads", RECD_INT, "1", RECU_DYNAMIC, RR_REQUIRED, RECC_INT, "[1-128]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.collation_host_timeout", RECD_INT, "86390", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.collation_host_timeout", RECD_INT, "86390", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.collation_client_timeout", RECD_INT, "86400", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.collation_client_timeout", RECD_INT, "86400", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.log.rolling_enabled", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-4]", RECA_NULL}
   ,
@@ -1175,15 +1175,15 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.log.auto_delete_rolled_files", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.sampling_frequency", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.sampling_frequency", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.space_used_frequency", RECD_INT, "2", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.space_used_frequency", RECD_INT, "2", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.file_stat_frequency", RECD_INT, "32", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.file_stat_frequency", RECD_INT, "32", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.ascii_buffer_size", RECD_INT, "36864", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.ascii_buffer_size", RECD_INT, "36864", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.log.max_line_size", RECD_INT, "9216", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.log.max_line_size", RECD_INT, "9216", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   // How often periodic tasks get executed in the Log.cc infrastructure
   {RECT_CONFIG, "proxy.config.log.periodic_tasks_interval", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_NULL, "^[0-9]+$", RECA_NULL}
@@ -1196,7 +1196,7 @@ static const RecordElement RecordsConfig[] =
   //##############################################################################
   {RECT_CONFIG, "proxy.config.reverse_proxy.enabled", RECD_INT, "1", RECU_DYNAMIC, RR_REQUIRED, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.url_remap.filename", RECD_STRING, "remap.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.url_remap.filename", RECD_STRING, "remap.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.url_remap.remap_required", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
@@ -1231,57 +1231,57 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.ssl.client.TLSv1_2", RECD_INT, "1", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.server.cipher_suite", RECD_STRING, "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.server.cipher_suite", RECD_STRING, "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.client.cipher_suite", RECD_STRING, NULL, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.client.cipher_suite", RECD_STRING, nullptr, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.ssl.server.honor_cipher_order", RECD_INT, "1", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.ssl.client.certification_level", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-2]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.server.cert.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.server.cert.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.server.cert_chain.filename", RECD_STRING, NULL, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.server.cert_chain.filename", RECD_STRING, nullptr, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.server.multicert.filename", RECD_STRING, "ssl_multicert.config", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.server.multicert.filename", RECD_STRING, "ssl_multicert.config", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.ssl.server.multicert.exit_on_load_fail", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.server.ticket_key.filename", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.server.ticket_key.filename", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.server.private_key.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.server.private_key.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.CA.cert.filename", RECD_STRING, NULL, RECU_RESTART_TS, RR_NULL, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.CA.cert.filename", RECD_STRING, nullptr, RECU_RESTART_TS, RR_NULL, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.CA.cert.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.CA.cert.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.ssl.client.verify.server", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.client.cert.filename", RECD_STRING, NULL, RECU_RESTART_TS, RR_NULL, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.client.cert.filename", RECD_STRING, nullptr, RECU_RESTART_TS, RR_NULL, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.client.cert.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.client.cert.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.client.private_key.filename", RECD_STRING, NULL, RECU_RESTART_TS, RR_NULL, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.client.private_key.filename", RECD_STRING, nullptr, RECU_RESTART_TS, RR_NULL, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.client.private_key.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.client.private_key.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.client.CA.cert.filename", RECD_STRING, NULL, RECU_RESTART_TS, RR_NULL, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.client.CA.cert.filename", RECD_STRING, nullptr, RECU_RESTART_TS, RR_NULL, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.client.CA.cert.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.client.CA.cert.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.session_cache", RECD_INT, "2", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.session_cache", RECD_INT, "2", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.session_cache.size", RECD_INT, "102400", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.session_cache.size", RECD_INT, "102400", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.session_cache.num_buckets", RECD_INT, "256", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.session_cache.num_buckets", RECD_INT, "256", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.session_cache.skip_cache_on_bucket_contention", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.session_cache.skip_cache_on_bucket_contention", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.ssl.max_record_size", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, "[0-16383]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.session_cache.timeout", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.session_cache.timeout", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.session_cache.auto_clear", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.session_cache.auto_clear", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.ssl.hsts_max_age", RECD_INT, "-1", RECU_DYNAMIC, RR_NULL, RECC_STR, "^-?[0-9]+$", RECA_NULL}
   ,
@@ -1289,17 +1289,17 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.ssl.allow_client_renegotiation", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.server.dhparams_file", RECD_STRING, NULL, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.server.dhparams_file", RECD_STRING, nullptr, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.ssl.handshake_timeout_in", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-65535]", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.ssl.wire_trace_enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-2]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.wire_trace_addr", RECD_STRING, NULL , RECU_DYNAMIC, RR_NULL, RECC_IP, "[0-255]\\.[0-255]\\.[0-255]\\.[0-255]", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.wire_trace_addr", RECD_STRING, nullptr , RECU_DYNAMIC, RR_NULL, RECC_IP, "[0-255]\\.[0-255]\\.[0-255]\\.[0-255]", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.ssl.wire_trace_percentage", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-100]", RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.ssl.wire_trace_server_name", RECD_STRING, NULL , RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
+  {RECT_CONFIG, "proxy.config.ssl.wire_trace_server_name", RECD_STRING, nullptr , RECU_DYNAMIC, RR_NULL, RECC_STR, ".*", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.ssl.cert.load_elevated", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_READ_ONLY}
   ,
@@ -1327,16 +1327,16 @@ static const RecordElement RecordsConfig[] =
   //# WCCP
   //#
   //############################################################################
-  {RECT_LOCAL, "proxy.config.wccp.addr", RECD_STRING, "", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_LOCAL, "proxy.config.wccp.addr", RECD_STRING, "", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.wccp.services", RECD_STRING, "", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL }
+  {RECT_CONFIG, "proxy.config.wccp.services", RECD_STRING, "", RECU_RESTART_TM, RR_NULL, RECC_NULL, nullptr, RECA_NULL }
   ,
 
   //##############################################################################
   //# Plug-in Configuration
   //##############################################################################
   //# Directory in which to find plugins
-  {RECT_CONFIG, "proxy.config.plugin.plugin_dir", RECD_STRING, TS_BUILD_LIBEXECDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_READ_ONLY}
+  {RECT_CONFIG, "proxy.config.plugin.plugin_dir", RECD_STRING, TS_BUILD_LIBEXECDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_READ_ONLY}
   ,
   {RECT_CONFIG, "proxy.config.plugin.load_elevated", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_READ_ONLY}
   ,
@@ -1355,39 +1355,39 @@ static const RecordElement RecordsConfig[] =
   //#
   //# Add NODE       Records Here
   //##############################################################################
-  {RECT_NODE, "proxy.node.hostname_FQ", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.hostname_FQ", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_NODE, "proxy.node.hostname", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.hostname", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //#
   //# Restart Stats
   //#
-  {RECT_NODE, "proxy.node.restarts.manager.start_time", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.restarts.manager.start_time", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_NODE, "proxy.node.restarts.proxy.start_time", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.restarts.proxy.start_time", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_NODE, "proxy.node.restarts.proxy.cache_ready_time", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.restarts.proxy.cache_ready_time", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_NODE, "proxy.node.restarts.proxy.stop_time", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.restarts.proxy.stop_time", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_NODE, "proxy.node.restarts.proxy.restart_count", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.restarts.proxy.restart_count", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   //#
   //# Manager Version Info
   //#
-  {RECT_NODE, "proxy.node.version.manager.short", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.version.manager.short", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_NODE, "proxy.node.version.manager.long", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.version.manager.long", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_NODE, "proxy.node.version.manager.build_number", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.version.manager.build_number", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_NODE, "proxy.node.version.manager.build_time", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.version.manager.build_time", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_NODE, "proxy.node.version.manager.build_date", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.version.manager.build_date", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_NODE, "proxy.node.version.manager.build_machine", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.version.manager.build_machine", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_NODE, "proxy.node.version.manager.build_person", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_NODE, "proxy.node.version.manager.build_person", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //#
@@ -1399,7 +1399,7 @@ static const RecordElement RecordsConfig[] =
   //#  SSL requests from this proxy to a parent from
   //#  self-looping.
   //#
-  {RECT_LOCAL, "proxy.local.http.parent_proxy.disable_connect_tunneling", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_LOCAL, "proxy.local.http.parent_proxy.disable_connect_tunneling", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //############
@@ -1431,9 +1431,9 @@ static const RecordElement RecordsConfig[] =
   ,
 
   //# Add LOCAL Records Here
-  {RECT_LOCAL, "proxy.local.incoming_ip_to_bind", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_LOCAL, "proxy.local.incoming_ip_to_bind", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_LOCAL, "proxy.local.outgoing_ip_to_bind", RECD_STRING, NULL, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_LOCAL, "proxy.local.outgoing_ip_to_bind", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_LOCAL, "proxy.local.log.collation_mode", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-4]", RECA_NULL}
   ,
@@ -1448,9 +1448,9 @@ static const RecordElement RecordsConfig[] =
   //#
   //############
   /* this should be renamed in 6.0 */
-  {RECT_CONFIG, "proxy.config.allocator.thread_freelist_size", RECD_INT, "512", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.allocator.thread_freelist_size", RECD_INT, "512", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.allocator.thread_freelist_low_watermark", RECD_INT, "32", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.allocator.thread_freelist_low_watermark", RECD_INT, "32", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.allocator.hugepages", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
   ,
@@ -1462,7 +1462,7 @@ static const RecordElement RecordsConfig[] =
   //# Eric's super cool remap processor
   //#
   //############
-  {RECT_CONFIG, "proxy.config.remap.num_remap_threads", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+  {RECT_CONFIG, "proxy.config.remap.num_remap_threads", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
   ,
 
   //###########
@@ -1470,7 +1470,7 @@ static const RecordElement RecordsConfig[] =
   //# Temporary and esoteric values.
   //#
   //###########
-  {RECT_CONFIG, "proxy.config.cache.http.compatibility.4-2-0-fixup", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL},
+  {RECT_CONFIG, "proxy.config.cache.http.compatibility.4-2-0-fixup", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL},
 
 };
 // clang-format on
diff --git a/mgmt/RecordsConfigUtils.cc b/mgmt/RecordsConfigUtils.cc
index cdacc79a2fe..a97abd25069 100644
--- a/mgmt/RecordsConfigUtils.cc
+++ b/mgmt/RecordsConfigUtils.cc
@@ -36,13 +36,13 @@ override_record(const RecordElement *record, void *)
     const char *value;
     RecData data = {0};
 
-    if ((value = RecConfigOverrideFromEnvironment(record->name, NULL))) {
+    if ((value = RecConfigOverrideFromEnvironment(record->name, nullptr))) {
       if (RecDataSetFromString(record->value_type, &data, value)) {
         // WARNING: If we are not the record owner, RecSetRecord() doesn't set our copy
         // of the record. It sends a set message to the local manager. This can cause
         // "interesting" results if you are trying to override configuration values
         // early in startup (before we have synced with the local manager).
-        RecSetRecord(record->type, record->name, record->value_type, &data, NULL, REC_SOURCE_ENV, false);
+        RecSetRecord(record->type, record->name, record->value_type, &data, nullptr, REC_SOURCE_ENV, false);
         RecDataZero(record->value_type, &data);
       }
     }
@@ -55,7 +55,7 @@ override_record(const RecordElement *record, void *)
 void
 RecordsConfigOverrideFromEnvironment()
 {
-  RecordsConfigIterate(override_record, NULL);
+  RecordsConfigIterate(override_record, nullptr);
 }
 
 //-------------------------------------------------------------------------
@@ -87,7 +87,7 @@ initialize_record(const RecordElement *record, void *)
 
     // If you specify a consistency check, you have to specify a regex expression. We abort here
     // so that this breaks QA completely.
-    if (record->check != RECC_NULL && record->regex == NULL) {
+    if (record->check != RECC_NULL && record->regex == nullptr) {
       ink_fatal("%s has a consistency check but no regular expression", record->name);
     }
 
@@ -149,7 +149,7 @@ initialize_record(const RecordElement *record, void *)
 void
 LibRecordsConfigInit()
 {
-  RecordsConfigIterate(initialize_record, NULL);
+  RecordsConfigIterate(initialize_record, nullptr);
 }
 
 void
diff --git a/mgmt/Rollback.cc b/mgmt/Rollback.cc
index 3b331ed49bc..db4bc92f16e 100644
--- a/mgmt/Rollback.cc
+++ b/mgmt/Rollback.cc
@@ -45,7 +45,7 @@ const char *RollbackStrings[] = {"Rollback Ok", "File was not found", "Version w
                                  "Invalid Version - Version Numbers Must Increase"};
 
 Rollback::Rollback(const char *fileName_, bool root_access_needed_, Rollback *parentRollback_, unsigned flags)
-  : configFiles(NULL),
+  : configFiles(nullptr),
     root_access_needed(root_access_needed_),
     parentRollback(parentRollback_),
     currentVersion(0),
@@ -68,11 +68,11 @@ Rollback::Rollback(const char *fileName_, bool root_access_needed_, Rollback *pa
   char *activeVerStr;
   bool needZeroLength;
 
-  ink_assert(fileName_ != NULL);
+  ink_assert(fileName_ != nullptr);
 
   // parent must not also have a parent
   if (parentRollback) {
-    ink_assert(parentRollback->parentRollback == NULL);
+    ink_assert(parentRollback->parentRollback == nullptr);
   }
 
   // Copy the file name.
@@ -174,7 +174,7 @@ Rollback::Rollback(const char *fileName_, bool root_access_needed_, Rollback *pa
 
     // Make sure that we have a backup of the file
     if (highestSeen == 0) {
-      textBuffer *version0 = NULL;
+      textBuffer *version0 = nullptr;
       char failStr[]       = "[Rollback::Rollback] Automatic Roll of Version 1 failed: %s";
       if (getVersion_ml(ACTIVE_VERSION, &version0) != OK_ROLLBACK) {
         mgmt_log(failStr, fileName);
@@ -183,7 +183,7 @@ Rollback::Rollback(const char *fileName_, bool root_access_needed_, Rollback *pa
           mgmt_log(failStr, fileName);
         }
       }
-      if (version0 != NULL) {
+      if (version0 != nullptr) {
         delete version0;
       }
     }
@@ -232,7 +232,7 @@ char *
 Rollback::createPathStr(version_t version)
 {
   int bufSize  = 0;
-  char *buffer = NULL;
+  char *buffer = nullptr;
   ats_scoped_str sysconfdir(RecConfigReadConfigDir());
   bufSize = strlen(sysconfdir) + fileNameLen + MAX_VERSION_DIGITS + 1;
   buffer  = (char *)ats_malloc(bufSize);
@@ -287,7 +287,7 @@ Rollback::openFile(version_t version, int oflags, int *errnoPtr)
   fd = mgmt_open_mode(filePath, oflags, 0644);
 
   if (fd < 0) {
-    if (errnoPtr != NULL) {
+    if (errnoPtr != nullptr) {
       *errnoPtr = errno;
     }
     mgmt_log("[Rollback::openFile] Open of %s failed: %s\n", fileName, strerror(errno));
@@ -376,7 +376,7 @@ Rollback::internalUpdate(textBuffer *buf, version_t newVersion, bool notifyChang
   versionInfo *toRemove;
   versionInfo *newBak;
   bool failedLink = false;
-  char *alarmMsg  = NULL;
+  char *alarmMsg  = nullptr;
 
   // Check to see if the callee has specified a newVersion number
   //   If the newVersion argument is less than zero, the callee
@@ -454,9 +454,9 @@ Rollback::internalUpdate(textBuffer *buf, version_t newVersion, bool notifyChang
   //
   if (numVersions >= this->numberBackups && failedLink == false) {
     toRemove = versionQ.head;
-    ink_assert(toRemove != NULL);
+    ink_assert(toRemove != nullptr);
     ink_assert((toRemove->version) < this->currentVersion);
-    if (toRemove != NULL) {
+    if (toRemove != nullptr) {
       removeVersion_ml(toRemove->version);
     }
   }
@@ -526,7 +526,7 @@ Rollback::getVersion_ml(version_t version, textBuffer **buffer)
   int readResult;           // return val of (indirect) read calls
   textBuffer *newBuffer;    // return buffer
 
-  *buffer = NULL;
+  *buffer = nullptr;
 
   if (version == currentVersion) {
     version = ACTIVE_VERSION;
@@ -650,7 +650,7 @@ Rollback::findVersions_ml(ExpandingArray *listNames)
 
   dir = opendir(sysconfdir);
 
-  if (dir == NULL) {
+  if (dir == nullptr) {
     mgmt_log("[Rollback::findVersions] Unable to open configuration directory: %s: %s\n", (const char *)sysconfdir,
              strerror(errno));
     return INVALID_VERSION;
@@ -717,7 +717,7 @@ Rollback::extractVersionInfo(ExpandingArray *listNames, const char *testFileName
           version = atoi(currentVersionStr);
 
           // Add info about version number and modTime
-          if (listNames != NULL) {
+          if (listNames != nullptr) {
             struct stat fileInfo;
             versionInfo *verInfo;
 
@@ -788,7 +788,7 @@ Rollback::removeVersion_ml(version_t version)
 {
   struct stat statInfo;
   char *versionPath;
-  versionInfo *removeInfo = NULL;
+  versionInfo *removeInfo = nullptr;
   bool infoFound          = false;
 
   if (this->statFile(version, &statInfo) < 0) {
@@ -806,7 +806,7 @@ Rollback::removeVersion_ml(version_t version)
   //   We are doing a linear search but since we almost always
   //    are deleting the oldest version, the head of the queue
   //    should be what we are looking for
-  for (removeInfo = versionQ.head; removeInfo != NULL; removeInfo = removeInfo->link.next) {
+  for (removeInfo = versionQ.head; removeInfo != nullptr; removeInfo = removeInfo->link.next) {
     if (removeInfo->version == version) {
       infoFound = true;
       break;
@@ -874,7 +874,7 @@ Rollback::setLastModifiedTime()
     // We really shoudn't fail to stat the file since we just
     //  created it.  If we do, just punt and just use the current
     //  time.
-    fileLastModified = (time(NULL) - ink_timezone()) * 1000000000;
+    fileLastModified = (time(nullptr) - ink_timezone()) * 1000000000;
     return false;
   }
 }
diff --git a/mgmt/WebMgmtUtils.cc b/mgmt/WebMgmtUtils.cc
index 3f1bcd7e745..c36c112cd22 100644
--- a/mgmt/WebMgmtUtils.cc
+++ b/mgmt/WebMgmtUtils.cc
@@ -67,7 +67,7 @@ varSetFromStr(const char *varName, const char *value)
   // Use any empty string if we get a NULL so
   //  sprintf does puke.  However, we need to
   //  switch this back to NULL for STRING types
-  if (value == NULL) {
+  if (value == nullptr) {
     value = "";
   }
 
@@ -96,7 +96,7 @@ varSetFromStr(const char *varName, const char *value)
     break;
   case RECD_STRING:
     if (*value == '\0') {
-      RecSetRecordString((char *)varName, NULL, REC_SOURCE_EXPLICIT);
+      RecSetRecordString((char *)varName, nullptr, REC_SOURCE_EXPLICIT);
     } else {
       RecSetRecordString((char *)varName, (char *)value, REC_SOURCE_EXPLICIT);
     }
@@ -558,7 +558,7 @@ bytesFromInt(RecInt bytes, char *bufVal)
 bool
 varStrFromName(const char *varNameConst, char *bufVal, int bufLen)
 {
-  char *varName        = NULL;
+  char *varName        = nullptr;
   RecDataT varDataType = RECD_NULL;
   bool found           = true;
   int varNameLen       = 0;
@@ -633,7 +633,7 @@ varStrFromName(const char *varNameConst, char *bufVal, int bufLen)
     break;
   case RECD_STRING:
     RecGetRecordString_Xmalloc(varName, &data.rec_string);
-    if (data.rec_string == NULL) {
+    if (data.rec_string == nullptr) {
       bufVal[0] = '\0';
     } else if (strlen(data.rec_string) < (size_t)(bufLen - 1)) {
       ink_strlcpy(bufVal, data.rec_string, bufLen);
@@ -748,12 +748,12 @@ MgmtData::compareFromString(const char *str)
     }
     break;
   case RECD_STRING:
-    if (str == NULL || *str == '\0') {
-      if (data.rec_string == NULL) {
+    if (str == nullptr || *str == '\0') {
+      if (data.rec_string == nullptr) {
         compare = true;
       }
     } else {
-      if ((data.rec_string != NULL) && (strcmp(str, data.rec_string) == 0)) {
+      if ((data.rec_string != nullptr) && (strcmp(str, data.rec_string) == 0)) {
         compare = true;
       }
     }
@@ -808,9 +808,9 @@ processFormSubmission(char *submission)
   char *submission_copy;
   int pairNum;
 
-  if (submission == NULL) {
+  if (submission == nullptr) {
     ink_hash_table_destroy(nameVal);
-    return NULL;
+    return nullptr;
   }
 
   submission_copy = ats_strdup(submission);
@@ -830,7 +830,7 @@ processFormSubmission(char *submission)
 
       // If the value is blank, store it as a null
       if (pairNum == 1) {
-        value = NULL;
+        value = nullptr;
       } else {
         value = ats_strdup(pair[1]);
         substituteUnsafeChars(value);
@@ -866,9 +866,9 @@ processFormSubmission_noSubstitute(char *submission)
   char *submission_copy;
   int pairNum;
 
-  if (submission == NULL) {
+  if (submission == nullptr) {
     ink_hash_table_destroy(nameVal);
-    return NULL;
+    return nullptr;
   }
 
   submission_copy = ats_strdup(submission);
@@ -887,7 +887,7 @@ processFormSubmission_noSubstitute(char *submission)
 
       // If the value is blank, store it as a null
       if (pairNum == 1) {
-        value = NULL;
+        value = nullptr;
       } else {
         value = ats_strdup(pair[1]);
       }
@@ -945,7 +945,7 @@ substituteUnsafeChars(char *buffer)
     if (*read == '%') {
       subStr[0] = *(++read);
       subStr[1] = *(++read);
-      charVal   = strtol(subStr, (char **)NULL, 16);
+      charVal   = strtol(subStr, (char **)nullptr, 16);
       *write    = (char)charVal;
       read++;
       write++;
@@ -1037,7 +1037,7 @@ setHostnameVar()
 
   // non-FQ is just the hostname (ie: proxydev)
   firstDot = strchr(ourHostName, '.');
-  if (firstDot != NULL) {
+  if (firstDot != nullptr) {
     *firstDot = '\0';
   }
   varSetFromStr("proxy.node.hostname", ourHostName);
@@ -1069,7 +1069,7 @@ appendDefaultDomain(char *hostname, int bufLength)
   // Ensure null termination of the result string
   hostname[bufLength - 1] = '\0';
 
-  if (strchr(hostname, '.') == NULL) {
+  if (strchr(hostname, '.') == nullptr) {
     if (_res.defdname[0] != '\0') {
       if (bufLength - 2 >= (int)(strlen(hostname) + strlen(_res.defdname))) {
         ink_strlcat(hostname, ".", bufLength);
@@ -1136,11 +1136,11 @@ recordRegexCheck(const char *pattern, const char *value)
   const char *error;
   int erroffset;
 
-  regex = pcre_compile(pattern, 0, &error, &erroffset, NULL);
+  regex = pcre_compile(pattern, 0, &error, &erroffset, nullptr);
   if (!regex) {
     return false;
   } else {
-    int r = pcre_exec(regex, NULL, value, strlen(value), 0, 0, NULL, 0);
+    int r = pcre_exec(regex, nullptr, value, strlen(value), 0, 0, nullptr, 0);
 
     pcre_free(regex);
     return (r != -1) ? true : false;
@@ -1241,7 +1241,7 @@ getFilesInDirectory(char *managedDir, ExpandingArray *fileList)
   //  struct stat records_config_fileInfo;
   fileEntry *fileListEntry;
 
-  if ((dir = opendir(managedDir)) == NULL) {
+  if ((dir = opendir(managedDir)) == nullptr) {
     mgmt_log("[getFilesInDirectory] Unable to open %s directory: %s\n", managedDir, strerror(errno));
     return -1;
   }
@@ -1312,7 +1312,7 @@ newPathString(const char *s1, const char *s2)
   }
   srcLen = strlen(s1);
   newStr = new char[srcLen + addLen + 1];
-  ink_assert(newStr != NULL);
+  ink_assert(newStr != nullptr);
 
   ink_strlcpy(newStr, s1, srcLen + addLen + 1);
   if (newStr[srcLen - 1] != '/') {
diff --git a/mgmt/api/APITestCliRemote.cc b/mgmt/api/APITestCliRemote.cc
index b1f0fffbbca..3e8547cd197 100644
--- a/mgmt/api/APITestCliRemote.cc
+++ b/mgmt/api/APITestCliRemote.cc
@@ -697,7 +697,7 @@ print_split_dns_ele(TSSplitDnsEle *ele)
   char buf[MAX_BUF_SIZE];
   bzero(buf, MAX_BUF_SIZE);
 
-  char *pd_name = 0;
+  char *pd_name = nullptr;
   switch (ele->pd_type) {
   case TS_PD_DOMAIN:
     pd_name = ats_strdup("dest_domain");
@@ -874,7 +874,7 @@ start_TS(char *tsArgs)
   char *args;
 
   strtok(tsArgs, ":");
-  args = strtok(NULL, ":");
+  args = strtok(nullptr, ":");
   if (args) {
     if (strcmp(args, "all\n") == 0) {
       clear = TS_CACHE_CLEAR_CACHE;
@@ -1080,7 +1080,7 @@ test_records()
     printf("[TSRecordGetString] proxy.config.proxy_name=%s\n", rec_value);
   }
   TSfree(rec_value);
-  rec_value = NULL;
+  rec_value = nullptr;
 
   // test RecordSet
   err = TSRecordSetString("proxy.config.proxy_name", (TSString)new_str, &action);
@@ -1384,9 +1384,9 @@ test_record_set_mlt(void)
 void
 test_read_url(bool valid)
 {
-  char *header = NULL;
+  char *header = nullptr;
   int headerSize;
-  char *body = NULL;
+  char *body = nullptr;
   int bodySize;
   TSMgmtError err;
 
@@ -1470,7 +1470,7 @@ test_read_url(bool valid)
 void
 test_read_file()
 {
-  char *f_text = NULL;
+  char *f_text = nullptr;
   int f_size   = -1;
   int f_ver    = -1;
 
@@ -1492,7 +1492,7 @@ test_read_file()
 void
 test_write_file()
 {
-  char *f_text      = NULL;
+  char *f_text      = nullptr;
   int f_size        = -1;
   int f_ver         = -1;
   char new_f_text[] = "blah, blah blah\n I hope this works. please!!!   \n";
@@ -1530,7 +1530,7 @@ test_cfg_context_get(char *args)
   char *filename;
 
   strtok(args, ":");
-  filename = strtok(NULL, ":");
+  filename = strtok(nullptr, ":");
   fprintf(stderr, "modify file: %s\n", filename);
   char *name = TSstrdup(filename);
 
@@ -1598,7 +1598,7 @@ test_cfg_context_move(char *args)
   char *filename;
 
   strtok(args, ":");
-  filename = strtok(NULL, ":");
+  filename = strtok(nullptr, ":");
   fprintf(stderr, "modify file: %s\n", filename);
   char *name = TSstrdup(filename);
 
@@ -1662,7 +1662,7 @@ test_cfg_context_move(char *args)
   }
 
   // clean up; commit change
-  TSCfgContextCommit(ctx, NULL, NULL);
+  TSCfgContextCommit(ctx, nullptr, nullptr);
 
 END:
   TSCfgContextDestroy(ctx);
@@ -1780,7 +1780,7 @@ test_cfg_context_ops()
   // print_VirtIpAddr_ele_list(ctx);
 
   // commit change
-  TSCfgContextCommit(ctx, NULL, NULL);
+  TSCfgContextCommit(ctx, nullptr, nullptr);
 
   printf("\nAFTER CHANGE:\n");
 // print_VirtIpAddr_ele_list(ctx);
@@ -1834,7 +1834,7 @@ test_cfg_plugin()
   TSCfgContextAppendEle(ctx, (TSCfgEle *)ele);
 
   // commit change
-  TSCfgContextCommit(ctx, NULL, NULL);
+  TSCfgContextCommit(ctx, nullptr, nullptr);
 
   TSCfgContextDestroy(ctx);
 }
@@ -1909,7 +1909,7 @@ test_cfg_socks()
   }
 
   // commit change
-  TSCfgContextCommit(ctx, NULL, NULL);
+  TSCfgContextCommit(ctx, nullptr, nullptr);
 
   TSCfgContextDestroy(ctx);
 }
@@ -2030,7 +2030,7 @@ register_event_callback(void)
   TSMgmtError err;
 
   printf("\n[register_event_callback] \n");
-  err = TSEventSignalCbRegister(NULL, eventCallbackFn, NULL);
+  err = TSEventSignalCbRegister(nullptr, eventCallbackFn, nullptr);
   print_err("TSEventSignalCbRegister", err);
 }
 
@@ -2047,7 +2047,7 @@ unregister_event_callback(void)
   TSMgmtError err;
 
   printf("\n[unregister_event_callback]\n");
-  err = TSEventSignalCbUnregister(NULL, eventCallbackFn);
+  err = TSEventSignalCbUnregister(nullptr, eventCallbackFn);
   print_err("TSEventSignalCbUnregister", err);
 }
 
@@ -2088,7 +2088,7 @@ add_snapshot(char *args)
   char *snap_name;
 
   strtok(args, ":");
-  snap_name = strtok(NULL, ":");
+  snap_name = strtok(nullptr, ":");
   fprintf(stderr, "add snapshot: %s\n", snap_name);
   char *name = TSstrdup(snap_name);
 
@@ -2104,7 +2104,7 @@ remove_snapshot(char *args)
   char *snap_name;
 
   strtok(args, ":");
-  snap_name = strtok(NULL, ":");
+  snap_name = strtok(nullptr, ":");
   fprintf(stderr, "remove snapshot: %s\n", snap_name);
   char *name = TSstrdup(snap_name);
 
@@ -2120,7 +2120,7 @@ restore_snapshot(char *args)
   char *snap_name;
 
   strtok(args, ":");
-  snap_name = strtok(NULL, ":");
+  snap_name = strtok(nullptr, ":");
   fprintf(stderr, "resotre snapshot: %s\n", snap_name);
   char *name = TSstrdup(snap_name);
 
@@ -2249,7 +2249,7 @@ print_stats()
 void
 reset_stats()
 {
-  TSMgmtError err = TSStatsReset(false, NULL);
+  TSMgmtError err = TSStatsReset(false, nullptr);
   print_err("TSStatsReset", err);
   return;
 }
@@ -2397,7 +2397,7 @@ main(int /* argc ATS_UNUSED */, char ** /* argv ATS_UNUSED */)
 {
   TSMgmtError ret;
 
-  if ((ret = TSInit(NULL, TS_MGMT_OPT_DEFAULTS)) == TS_ERR_OKAY) {
+  if ((ret = TSInit(nullptr, TS_MGMT_OPT_DEFAULTS)) == TS_ERR_OKAY) {
     runInteractive();
     TSTerminate();
     printf("END REMOTE API TEST\n");
diff --git a/mgmt/api/CfgContextImpl.cc b/mgmt/api/CfgContextImpl.cc
index deba250fd4f..ac728807dc2 100644
--- a/mgmt/api/CfgContextImpl.cc
+++ b/mgmt/api/CfgContextImpl.cc
@@ -128,7 +128,7 @@ CacheObj::formatEleToRule()
 {
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
 
   char *pd_str, *time_str;
@@ -138,7 +138,7 @@ CacheObj::formatEleToRule()
   pd_str = pdest_sspec_to_string(m_ele->cache_info.pd_type, m_ele->cache_info.pd_val, &(m_ele->cache_info.sec_spec));
   if (!pd_str) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
   ink_strlcat(buf, pd_str, sizeof(buf));
   ats_free(pd_str);
@@ -354,7 +354,7 @@ CongestionObj::formatEleToRule()
 {
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
 
   char buf[MAX_BUF_SIZE];
@@ -545,7 +545,7 @@ HostingObj::formatEleToRule()
 {
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
 
   char *list_str;
@@ -752,7 +752,7 @@ IcpObj::formatEleToRule()
 
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
 
   memset(buf, 0, MAX_RULE_SIZE);
@@ -930,7 +930,7 @@ IpAllowObj::formatEleToRule()
 {
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
     ;
   }
 
@@ -1024,7 +1024,7 @@ ParentProxyObj::ParentProxyObj(TokenList *tokens)
 
   tok = tokens->first();
   tok = tokens_to_pdss_format(tokens, tok, &(m_ele->parent_info));
-  if (tok == NULL) {
+  if (tok == nullptr) {
     goto FORMAT_ERR;
   }
   // search parent and round_robin action tags
@@ -1100,7 +1100,7 @@ ParentProxyObj::formatEleToRule()
 {
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
 
   char *pd_str, *list_str;
@@ -1109,7 +1109,7 @@ ParentProxyObj::formatEleToRule()
 
   pd_str = pdest_sspec_to_string(m_ele->parent_info.pd_type, m_ele->parent_info.pd_val, &(m_ele->parent_info.sec_spec));
   if (!pd_str) {
-    return NULL;
+    return nullptr;
   }
   ink_strlcat(buf, pd_str, sizeof(buf));
   ats_free(pd_str);
@@ -1137,7 +1137,7 @@ ParentProxyObj::formatEleToRule()
     }
   }
 
-  if (m_ele->proxy_list != NULL) {
+  if (m_ele->proxy_list != nullptr) {
     // include space delimiter if not already exist
     if (!isspace(buf[strlen(buf) - 1])) {
       ink_strlcat(buf, " ", sizeof(buf));
@@ -1285,7 +1285,7 @@ VolumeObj::formatEleToRule()
 {
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
 
   char buf[MAX_RULE_SIZE];
@@ -1422,7 +1422,7 @@ PluginObj::formatEleToRule()
 {
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
 
   char *list_str;
@@ -1621,7 +1621,7 @@ RemapObj::formatEleToRule()
 {
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
 
   char buf[MAX_RULE_SIZE];
@@ -1802,7 +1802,7 @@ SocksObj::SocksObj(TokenList *tokens)
   tok = tokens->first();
   if (strcmp(tok->name, "no_socks") == 0) { // no-socks rule; TS_SOCKS_BYPASS
 
-    if (m_ele->ip_addrs != NULL) {
+    if (m_ele->ip_addrs != nullptr) {
       goto FORMAT_ERR;
     }
     m_ele->ip_addrs = string_to_ip_addr_list(tok->value, ",");
@@ -1877,20 +1877,20 @@ SocksObj::formatEleToRule()
 {
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
   char buf[MAX_RULE_SIZE];
   memset(buf, 0, MAX_RULE_SIZE);
 
-  if (m_ele->ip_addrs != NULL) { // TS_SOCKS_BYPASS rule
+  if (m_ele->ip_addrs != nullptr) { // TS_SOCKS_BYPASS rule
     char *str_list = ip_addr_list_to_string((LLQ *)m_ele->ip_addrs, ",");
     if (str_list) {
       snprintf(buf, sizeof(buf), "no_socks %s", str_list);
       ats_free(str_list);
     } else {
-      return NULL; // invalid ip_addr_list
+      return nullptr; // invalid ip_addr_list
     }
-  } else if (m_ele->username != NULL) { // TS_SOCKS_AUTH rule
+  } else if (m_ele->username != nullptr) { // TS_SOCKS_AUTH rule
     snprintf(buf, sizeof(buf), "auth u %s %s", m_ele->username, m_ele->password);
   } else { // TS_SOCKS_MULTIPLE rule
     // destination ip
@@ -1900,11 +1900,11 @@ SocksObj::formatEleToRule()
       ink_strlcat(buf, ip_str, sizeof(buf));
       ats_free(ip_str);
     } else {
-      return NULL; // invalid IP
+      return nullptr; // invalid IP
     }
 
     // parent server list
-    if (m_ele->socks_servers != NULL) {
+    if (m_ele->socks_servers != nullptr) {
       // include space delimiter if not already exist
       if (!isspace(buf[strlen(buf) - 1])) {
         ink_strlcat(buf, " ", sizeof(buf));
@@ -1916,7 +1916,7 @@ SocksObj::formatEleToRule()
         ink_strlcat(buf, "\"", sizeof(buf));
         ats_free(list_str);
       } else {
-        return NULL; // invalid list
+        return nullptr; // invalid list
       }
     }
     // round-robin, if specified
@@ -1965,7 +1965,7 @@ SocksObj::isValid()
     }
     break;
   case TS_SOCKS_AUTH:
-    if (m_ele->username == NULL || m_ele->password == NULL || m_ele->ip_addrs || m_ele->dest_ip_addr) {
+    if (m_ele->username == nullptr || m_ele->password == nullptr || m_ele->ip_addrs || m_ele->dest_ip_addr) {
       m_valid = false;
     } else {
       m_valid = true;
@@ -2027,47 +2027,47 @@ SplitDnsObj::SplitDnsObj(TokenList *tokens)
   tok = tokens->first();
   while (tok) {
     if (!strcmp(tok->name, "dest_domain")) {
-      if ((m_ele->pd_type != TS_PD_UNDEFINED) || (m_ele->pd_val != NULL) || (!tok->value)) {
+      if ((m_ele->pd_type != TS_PD_UNDEFINED) || (m_ele->pd_val != nullptr) || (!tok->value)) {
         // fields are already defined!!
         goto FORMAT_ERR;
       }
       m_ele->pd_type = TS_PD_DOMAIN;
       m_ele->pd_val  = ats_strdup(tok->value);
     } else if (strcmp(tok->name, "dest_host") == 0) {
-      if ((m_ele->pd_type != TS_PD_UNDEFINED) || (m_ele->pd_val != NULL) || (!tok->value)) {
+      if ((m_ele->pd_type != TS_PD_UNDEFINED) || (m_ele->pd_val != nullptr) || (!tok->value)) {
         // fields are already defined!!
         goto FORMAT_ERR;
       }
       m_ele->pd_type = TS_PD_HOST;
       m_ele->pd_val  = ats_strdup(tok->value);
     } else if (strcmp(tok->name, "url_regex") == 0) {
-      if ((m_ele->pd_type != TS_PD_UNDEFINED) || (m_ele->pd_val != NULL) || (!tok->value)) {
+      if ((m_ele->pd_type != TS_PD_UNDEFINED) || (m_ele->pd_val != nullptr) || (!tok->value)) {
         // fields are already defined!!
         goto FORMAT_ERR;
       }
       m_ele->pd_type = TS_PD_URL_REGEX;
       m_ele->pd_val  = ats_strdup(tok->value);
     } else if (strcmp(tok->name, "url") == 0) {
-      if ((m_ele->pd_type != TS_PD_UNDEFINED) || (m_ele->pd_val != NULL) || (!tok->value)) {
+      if ((m_ele->pd_type != TS_PD_UNDEFINED) || (m_ele->pd_val != nullptr) || (!tok->value)) {
         // fields are already defined!!
         goto FORMAT_ERR;
       }
       m_ele->pd_type = TS_PD_URL;
       m_ele->pd_val  = ats_strdup(tok->value);
     } else if (strcmp(tok->name, "named") == 0) {
-      if ((m_ele->dns_servers_addrs != NULL) || (!tok->value)) {
+      if ((m_ele->dns_servers_addrs != nullptr) || (!tok->value)) {
         // fields are already defined!!
         goto FORMAT_ERR;
       }
       m_ele->dns_servers_addrs = (TSDomainList)string_to_domain_list(tok->value, "; ");
     } else if (strcmp(tok->name, "def_domain") == 0) {
-      if ((m_ele->def_domain != NULL) || (!tok->value)) {
+      if ((m_ele->def_domain != nullptr) || (!tok->value)) {
         // fields are already defined!!
         goto FORMAT_ERR;
       }
       m_ele->def_domain = ats_strdup(tok->value);
     } else if (strcmp(tok->name, "search_list") == 0) {
-      if ((m_ele->search_list != NULL) || (!tok->value)) {
+      if ((m_ele->search_list != nullptr) || (!tok->value)) {
         // fields are already defined!!
         goto FORMAT_ERR;
       }
@@ -2096,7 +2096,7 @@ SplitDnsObj::formatEleToRule()
 {
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
 
   char buf[MAX_RULE_SIZE];
@@ -2287,7 +2287,7 @@ StorageObj::formatEleToRule()
 {
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
 
   char buf[MAX_RULE_SIZE];
@@ -2354,21 +2354,21 @@ VirtIpAddrObj::VirtIpAddrObj(TokenList *tokens)
   }
   // IP Address
   tok = tokens->first();
-  if (tok->value != NULL) {
+  if (tok->value != nullptr) {
     goto FORMAT_ERR;
   }
   m_ele->ip_addr = string_to_ip_addr(tok->name);
 
   // Device
   tok = tokens->next(tok);
-  if (tok->value != NULL) {
+  if (tok->value != nullptr) {
     goto FORMAT_ERR;
   }
   m_ele->intr = ats_strdup(tok->name);
 
   // Subinterface
   tok = tokens->next(tok);
-  if (tok->value != NULL) {
+  if (tok->value != nullptr) {
     goto FORMAT_ERR;
   }
   m_ele->sub_intr = ink_atoi(tok->name); // ERROR: can't convert?
@@ -2390,7 +2390,7 @@ VirtIpAddrObj::formatEleToRule()
 {
   if (!isValid()) {
     m_ele->cfg_ele.error = TS_ERR_INVALID_CONFIG_RULE;
-    return NULL;
+    return nullptr;
   }
 
   char *ip_str;
@@ -2456,7 +2456,7 @@ CfgContext::~CfgContext()
 TSMgmtError
 CfgContext::addEle(CfgEleObj *ele)
 {
-  ink_assert(ele != NULL);
+  ink_assert(ele != nullptr);
   m_eles.enqueue(ele); // enqueue CfgEleObj at end of Queue
   return TS_ERR_OKAY;
 }
@@ -2464,7 +2464,7 @@ CfgContext::addEle(CfgEleObj *ele)
 TSMgmtError
 CfgContext::removeEle(CfgEleObj *ele)
 {
-  ink_assert(ele != NULL);
+  ink_assert(ele != nullptr);
   m_eles.remove(ele);
   delete ele;
 
@@ -2474,7 +2474,7 @@ CfgContext::removeEle(CfgEleObj *ele)
 TSMgmtError
 CfgContext::insertEle(CfgEleObj *ele, CfgEleObj *after_ele)
 {
-  ink_assert(ele != NULL && after_ele != NULL);
+  ink_assert(ele != nullptr && after_ele != nullptr);
   m_eles.insert(ele, after_ele);
 
   return TS_ERR_OKAY;
@@ -2484,7 +2484,7 @@ CfgContext::insertEle(CfgEleObj *ele, CfgEleObj *after_ele)
 TSMgmtError
 CfgContext::pushEle(CfgEleObj *ele)
 {
-  ink_assert(ele != NULL);
+  ink_assert(ele != nullptr);
   m_eles.push(ele);
 
   return TS_ERR_OKAY;
diff --git a/mgmt/api/CfgContextManager.cc b/mgmt/api/CfgContextManager.cc
index fc013e654d5..ec306347613 100644
--- a/mgmt/api/CfgContextManager.cc
+++ b/mgmt/api/CfgContextManager.cc
@@ -54,7 +54,7 @@
 CfgContext *
 CfgContextCreate(TSFileNameT file)
 {
-  CfgContext *ctx = NULL;
+  CfgContext *ctx = nullptr;
   ctx             = new CfgContext(file);
   return ctx;
 }
@@ -88,8 +88,8 @@ TSMgmtError
 CfgContextCommit(CfgContext *ctx, LLQ *errRules)
 {
   int ret;
-  char *new_text = NULL;
-  char *rule     = NULL;
+  char *new_text = nullptr;
+  char *rule     = nullptr;
   CfgEleObj *ele;
   int ver, size = 0, index;
   int *iPtr;
@@ -158,9 +158,9 @@ CfgContextGet(CfgContext *ctx)
 {
   TSMgmtError ret;
   int size, ver;
-  char *old_text      = NULL;
-  RuleList *rule_list = NULL;
-  CfgEleObj *ele      = NULL;
+  char *old_text      = nullptr;
+  RuleList *rule_list = nullptr;
+  CfgEleObj *ele      = nullptr;
 
   ink_release_assert(ctx);
 
@@ -183,7 +183,7 @@ CfgContextGet(CfgContext *ctx)
   for (Rule *rule_node = rule_list->first(); rule_node; rule_node = rule_list->next(rule_node)) {
     // rule_node->Print();
     ele = create_ele_obj_from_rule_node(rule_node);
-    if (ele == NULL) { // invalid rule; skip it
+    if (ele == nullptr) { // invalid rule; skip it
       continue;
     }
 
@@ -248,7 +248,7 @@ CfgContextGetObjAt(CfgContext *ctx, int index)
 
   ink_assert(ctx);
   if (!ctx) {
-    return NULL;
+    return nullptr;
   }
 
   // iterate through the ctx, keep count of all NON-Comment Obj Objects
@@ -266,7 +266,7 @@ CfgContextGetObjAt(CfgContext *ctx, int index)
     }
   }
 
-  return NULL; // invalid index
+  return nullptr; // invalid index
 }
 
 /*--------------------------------------------------------------
@@ -285,7 +285,7 @@ CfgContextGetEleAt(CfgContext *ctx, int index)
 
   ink_assert(ctx);
   if (!ctx) {
-    return NULL;
+    return nullptr;
   }
 
   // iterate through the ctx, keep count of all NON-Comment Ele Objects
@@ -305,7 +305,7 @@ CfgContextGetEleAt(CfgContext *ctx, int index)
     }
   }
 
-  return NULL; // invalid index
+  return nullptr; // invalid index
 }
 
 /*--------------------------------------------------------------
@@ -321,7 +321,7 @@ CfgContextGetFirst(CfgContext *ctx, TSCfgIterState *state)
 
   ink_assert(ctx && state);
   if (!ctx || !state) {
-    return NULL;
+    return nullptr;
   }
 
   // iterate; return the first CfgEleObj that's not a comment
@@ -336,7 +336,7 @@ CfgContextGetFirst(CfgContext *ctx, TSCfgIterState *state)
     }
   }
 
-  return NULL;
+  return nullptr;
 }
 
 /*--------------------------------------------------------------
@@ -352,7 +352,7 @@ CfgContextGetNext(CfgContext *ctx, TSCfgIterState *state)
 
   ink_assert(ctx && state);
   if (!ctx || !state) {
-    return NULL;
+    return nullptr;
   }
 
   // iterate through the ctx, keep count of all NON-Comment Ele Objects
@@ -377,7 +377,7 @@ CfgContextGetNext(CfgContext *ctx, TSCfgIterState *state)
      */
   }
 
-  return NULL; // ERROR
+  return nullptr; // ERROR
 }
 
 /*--------------------------------------------------------------
@@ -391,8 +391,8 @@ TSMgmtError
 CfgContextMoveEleUp(CfgContext *ctx, int index)
 {
   CfgEleObj *curr_ele_obj;
-  TSCfgEle *ele_copy = 0; /* lv: just to make gcc happy */
-  int count          = 0; // start counting from 0
+  TSCfgEle *ele_copy = nullptr; /* lv: just to make gcc happy */
+  int count          = 0;       // start counting from 0
   TSMgmtError ret;
 
   ink_assert(ctx && index >= 0);
@@ -446,8 +446,8 @@ TSMgmtError
 CfgContextMoveEleDown(CfgContext *ctx, int index)
 {
   CfgEleObj *curr_ele_obj;
-  TSCfgEle *ele_copy = 0; /* lv: just to make gcc happy */
-  int count          = 0; // start counting from 0
+  TSCfgEle *ele_copy = nullptr; /* lv: just to make gcc happy */
+  int count          = 0;       // start counting from 0
   TSMgmtError ret;
   int tot_ele;
 
@@ -529,7 +529,7 @@ CfgContextAppendEle(CfgContext *ctx, TSCfgEle *ele)
 TSMgmtError
 CfgContextInsertEleAt(CfgContext *ctx, TSCfgEle *ele, int index)
 {
-  CfgEleObj *ele_obj, *curr_ele_obj, *last_comment = NULL;
+  CfgEleObj *ele_obj, *curr_ele_obj, *last_comment = nullptr;
   int count        = 0;
   TSMgmtError err  = TS_ERR_OKAY;
   bool has_comment = false;
diff --git a/mgmt/api/CfgContextUtils.cc b/mgmt/api/CfgContextUtils.cc
index c977775ce62..1dea013563c 100644
--- a/mgmt/api/CfgContextUtils.cc
+++ b/mgmt/api/CfgContextUtils.cc
@@ -47,18 +47,18 @@ string_to_ip_addr_ele(const char *str)
   Tokenizer cidr_tokens2(CIDR_DELIMITER_STR);
   TSIpAddrEle *ele;
   const char *const_ip_a, *const_ip_b;
-  char *ip_a = NULL, *ip_b = NULL;
+  char *ip_a = nullptr, *ip_b = nullptr;
   int numTokens = 0;
   char buf[MAX_BUF_SIZE];
 
   // ink_assert(str);
   if (!str) {
-    return NULL;
+    return nullptr;
   }
 
   ele = TSIpAddrEleCreate();
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   memset(buf, 0, MAX_BUF_SIZE);
@@ -121,7 +121,7 @@ string_to_ip_addr_ele(const char *str)
   ats_free(ip_b);
   TSIpAddrEleDestroy(ele);
 
-  return NULL;
+  return nullptr;
 }
 
 /* ----------------------------------------------------------------------------
@@ -138,7 +138,7 @@ char *
 ip_addr_ele_to_string(TSIpAddrEle *ele)
 {
   char buf[MAX_BUF_SIZE];
-  char *str, *ip_a_str = NULL, *ip_b_str = NULL;
+  char *str, *ip_a_str = nullptr, *ip_b_str = nullptr;
 
   // ink_assert(ele);
   if (!ele) {
@@ -191,7 +191,7 @@ ip_addr_ele_to_string(TSIpAddrEle *ele)
 Lerror:
   ats_free(ip_a_str);
   ats_free(ip_b_str);
-  return NULL;
+  return nullptr;
 }
 
 /* ----------------------------------------------------------------------------
@@ -206,10 +206,10 @@ ip_addr_to_string(TSIpAddr ip)
 {
   // ink_assert(ip != TS_INVALID_IP_ADDR);
   if (ip == TS_INVALID_IP_ADDR) {
-    return NULL;
+    return nullptr;
   }
   if (!ccu_checkIpAddr(ip)) {
-    return NULL;
+    return nullptr;
   }
   return ats_strdup((char *)ip);
 }
@@ -251,7 +251,7 @@ ip_addr_list_to_string(IpAddrList *list, const char *delimiter)
 
   // ink_assert(list && delimiter);
   if (!list || !delimiter) {
-    return NULL;
+    return nullptr;
   }
 
   num = queue_len((LLQ *)list);
@@ -262,7 +262,7 @@ ip_addr_list_to_string(IpAddrList *list, const char *delimiter)
 
     if (!ip_str) {
       enqueue((LLQ *)list, ip_ele);
-      return NULL;
+      return nullptr;
     }
     if (i == num - 1) {
       snprintf(buf + buf_pos, sizeof(buf) - buf_pos, "%s", ip_str);
@@ -376,7 +376,7 @@ port_list_to_string(PortList *ports, const char *delimiter)
   return str;
 
 Lerror:
-  return NULL;
+  return nullptr;
 }
 
 /* ---------------------------------------------------------------
@@ -432,7 +432,7 @@ port_ele_to_string(TSPortEle *ele)
 
   // ink_assert(ele);
   if (!ele || !ccu_checkPortEle(ele)) {
-    return NULL;
+    return nullptr;
   }
 
   memset(buf, 0, MAX_BUF_SIZE);
@@ -462,7 +462,7 @@ string_to_port_ele(const char *str)
 
   // ink_assert(str);
   if (!str) {
-    return NULL;
+    return nullptr;
   }
 
   memset(copy, 0, MAX_BUF_SIZE);
@@ -493,7 +493,7 @@ string_to_port_ele(const char *str)
 
 Lerror:
   TSPortEleDestroy(ele);
-  return NULL;
+  return nullptr;
 }
 
 /*----------------------------------------------------------------------------
@@ -513,7 +513,7 @@ string_list_to_string(TSStringList str_list, const char *delimiter)
 
   // ink_assert(str_list != TS_INVALID_LIST && delimiter);
   if (str_list == TS_INVALID_LIST || !delimiter) {
-    return NULL;
+    return nullptr;
   }
 
   memset(buf, 0, MAX_BUF_SIZE);
@@ -582,7 +582,7 @@ int_list_to_string(TSIntList list, const char *delimiter)
 
   // ink_assert(list != TS_INVALID_LIST && delimiter);
   if (list == TS_INVALID_LIST || !delimiter) {
-    return NULL;
+    return nullptr;
   }
 
   numElems = queue_len((LLQ *)list);
@@ -702,7 +702,7 @@ domain_list_to_string(TSDomainList list, const char *delimiter)
 
   // ink_assert(list != TS_INVALID_LIST && delimiter);
   if (list == TS_INVALID_LIST || !delimiter) {
-    return NULL;
+    return nullptr;
   }
 
   numElems = queue_len((LLQ *)list);
@@ -714,7 +714,7 @@ domain_list_to_string(TSDomainList list, const char *delimiter)
 
     dom_str = domain_to_string(domain);
     if (!dom_str) {
-      return NULL;
+      return nullptr;
     }
     if (i == numElems - 1) { // the last element shouldn't print comma
       if (buf_pos < sizeof(buf) && (psize = snprintf(buf + buf_pos, sizeof(buf) - buf_pos, "%s", dom_str)) > 0) {
@@ -748,7 +748,7 @@ domain_to_string(TSDomain *domain)
 
   // ink_assert(domain);
   if (!domain) {
-    return NULL;
+    return nullptr;
   }
 
   if (domain->domain_val) {
@@ -758,7 +758,7 @@ domain_to_string(TSDomain *domain)
       snprintf(buf, sizeof(buf), "%s", domain->domain_val);
     }
   } else {
-    return NULL; // invalid TSDomain
+    return nullptr; // invalid TSDomain
   }
 
   dom_str = ats_strdup(buf);
@@ -783,7 +783,7 @@ string_to_domain(const char *str)
 
   // ink_assert(str);
   if (!str) {
-    return NULL;
+    return nullptr;
   }
 
   dom = TSDomainCreate();
@@ -813,7 +813,7 @@ string_to_domain(const char *str)
 
 Lerror:
   TSDomainDestroy(dom);
-  return NULL;
+  return nullptr;
 }
 
 /* ---------------------------------------------------------------
@@ -836,7 +836,7 @@ pdest_sspec_to_string(TSPrimeDestT pd, char *pd_val, TSSspec *sspec)
 
   // ink_assert(pd != TS_PD_UNDEFINED && pd_val && sspec);
   if (pd == TS_PD_UNDEFINED || !pd_val || !sspec) {
-    return NULL;
+    return nullptr;
   }
 
   memset(buf, 0, MAX_BUF_SIZE);
@@ -923,7 +923,7 @@ pdest_sspec_to_string(TSPrimeDestT pd, char *pd_val, TSSspec *sspec)
       if (sspec->src_ip != TS_INVALID_IP_ADDR) {
         src_ip = ip_addr_to_string(sspec->src_ip);
         if (!src_ip) {
-          return NULL;
+          return nullptr;
         }
         if (buf_pos < sizeof(buf) && (psize = snprintf(buf + buf_pos, sizeof(buf) - buf_pos, "src_ip=%s ", src_ip)) > 0) {
           buf_pos += psize;
@@ -1101,7 +1101,7 @@ hms_time_to_string(TSHmsTime time)
   if ((s > 0) && (s < sizeof(buf))) {
     return ats_strdup(buf);
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 
@@ -1287,7 +1287,7 @@ header_type_to_string(TSHdrT hdr)
     break;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 /*----------------------------------------------------------------------------
@@ -1318,7 +1318,7 @@ scheme_type_to_string(TSSchemeT scheme)
     break;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 /*----------------------------------------------------------------------------
@@ -1362,7 +1362,7 @@ method_type_to_string(TSMethodT method)
     break;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 /*----------------------------------------------------------------------------
@@ -1380,7 +1380,7 @@ connect_type_to_string(TSConnectT conn)
   default:
     break;
   }
-  return NULL;
+  return nullptr;
 }
 
 TSConnectT
@@ -1410,7 +1410,7 @@ multicast_type_to_string(TSMcTtlT mc)
   default:
     break;
   }
-  return NULL;
+  return nullptr;
 }
 
 /* -------------------------------------------------------------------------
@@ -1445,7 +1445,7 @@ round_robin_type_to_string(TSRrT rr)
     break;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 /*----------------------------------------------------------------------------
@@ -1484,7 +1484,7 @@ filename_to_string(TSFileNameT file)
   case TS_FNAME_VADDRS:
     return "vaddrs.config";
   default: /* no such config file */
-    return NULL;
+    return nullptr;
   }
 }
 
@@ -1540,7 +1540,7 @@ admin_acc_type_to_string(TSAccessT access)
     break;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 /***************************************************************************
@@ -1567,7 +1567,7 @@ tokens_to_pdss_format(TokenList *tokens, Token *first_tok, TSPdSsFormat *pdss)
 
   // ink_assert(tokens && first_tok && pdss);
   if (!tokens || !first_tok || !pdss) {
-    return NULL;
+    return nullptr;
   }
 
   // tokens->Print();
@@ -1584,7 +1584,7 @@ tokens_to_pdss_format(TokenList *tokens, Token *first_tok, TSPdSsFormat *pdss)
   } else if (strcmp(first_tok->name, "url") == 0) {
     pdss->pd_type = TS_PD_URL;
   } else {
-    return NULL; // INVALID primary destination specifier
+    return nullptr; // INVALID primary destination specifier
   }
   pdss->pd_val = ats_strdup(first_tok->value);
 
@@ -1640,7 +1640,7 @@ tokens_to_pdss_format(TokenList *tokens, Token *first_tok, TSPdSsFormat *pdss)
 
   } // end while loop
 
-  return NULL;
+  return nullptr;
 }
 
 /***************************************************************************
@@ -1690,7 +1690,7 @@ ccu_checkIpAddr(const char *addr, const char *min_addr, const char *max_addr)
   // truncate any leading or trailing white spaces from addr,
   // which can occur if IP is from a list of IP addresses
   char *new_addr = chopWhiteSpaces_alloc((char *)addr);
-  if (new_addr == NULL) {
+  if (new_addr == nullptr) {
     return false;
   }
 
@@ -1895,7 +1895,7 @@ chopWhiteSpaces_alloc(char *str)
   int len;
 
   if (!str) {
-    return NULL;
+    return nullptr;
   }
 
   // skip any leading white spaces
@@ -1927,12 +1927,12 @@ create_ele_obj_from_rule_node(Rule *rule)
 {
   TSRuleTypeT rule_type;
   TokenList *token_list;
-  CfgEleObj *ele = NULL;
+  CfgEleObj *ele = nullptr;
 
   // sanity check
   // ink_assert(rule != NULL);
   if (!rule) {
-    return NULL;
+    return nullptr;
   }
 
   // first check if the rule node is a comment
@@ -2003,10 +2003,10 @@ create_ele_obj_from_rule_node(Rule *rule)
     ele = (CfgEleObj *)new VirtIpAddrObj(token_list);
     break;
   default:
-    return NULL; // invalid rule type
+    return nullptr; // invalid rule type
   }
   if (!ele || !ele->isValid()) {
-    return NULL;
+    return nullptr;
   }
   return ele;
 }
@@ -2022,10 +2022,10 @@ create_ele_obj_from_rule_node(Rule *rule)
 CfgEleObj *
 create_ele_obj_from_ele(TSCfgEle *ele)
 {
-  CfgEleObj *ele_obj = NULL;
+  CfgEleObj *ele_obj = nullptr;
 
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   switch (ele->type) {
@@ -2096,7 +2096,7 @@ create_ele_obj_from_ele(TSCfgEle *ele)
     break;
   case TS_TYPE_UNDEFINED:
   default:
-    return NULL; // error
+    return nullptr; // error
   }
 
   return ele_obj;
@@ -2123,7 +2123,7 @@ get_rule_type(TokenList *token_list, TSFileNameT file)
   switch (file) {
   case TS_FNAME_CACHE_OBJ: /* cache.config */
     tok = token_list->first();
-    while (tok != NULL) {
+    while (tok != nullptr) {
       if (strcmp(tok->name, "action") == 0) {
         if (strcmp(tok->value, "never-cache") == 0) {
           return TS_CACHE_NEVER;
@@ -2302,7 +2302,7 @@ copy_ip_addr_ele(TSIpAddrEle *src_ele)
   TSIpAddrEle *dst_ele;
 
   if (!src_ele) {
-    return NULL;
+    return nullptr;
   }
 
   dst_ele       = TSIpAddrEleCreate();
@@ -2327,7 +2327,7 @@ copy_port_ele(TSPortEle *src_ele)
   TSPortEle *dst_ele;
 
   if (!src_ele) {
-    return NULL;
+    return nullptr;
   }
 
   dst_ele         = TSPortEleCreate();
@@ -2343,7 +2343,7 @@ copy_domain(TSDomain *src_dom)
   TSDomain *dst_dom;
 
   if (!src_dom) {
-    return NULL;
+    return nullptr;
   }
 
   dst_dom = TSDomainCreate();
@@ -2475,12 +2475,12 @@ TSCacheEle *
 copy_cache_ele(TSCacheEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   TSCacheEle *nele = TSCacheEleCreate(ele->cfg_ele.type);
   if (!nele) {
-    return NULL;
+    return nullptr;
   }
 
   copy_cfg_ele(&(ele->cfg_ele), &(nele->cfg_ele));
@@ -2494,12 +2494,12 @@ TSCongestionEle *
 copy_congestion_ele(TSCongestionEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   TSCongestionEle *nele = TSCongestionEleCreate();
   if (!nele) {
-    return NULL;
+    return nullptr;
   }
   copy_cfg_ele(&(ele->cfg_ele), &(nele->cfg_ele));
   // copy_pdss_format(&(ele->congestion_info), &(nele->congestion_info));
@@ -2531,12 +2531,12 @@ TSHostingEle *
 copy_hosting_ele(TSHostingEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   TSHostingEle *nele = TSHostingEleCreate();
   if (!nele) {
-    return NULL;
+    return nullptr;
   }
 
   copy_cfg_ele(&(ele->cfg_ele), &(nele->cfg_ele));
@@ -2553,12 +2553,12 @@ TSIcpEle *
 copy_icp_ele(TSIcpEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   TSIcpEle *nele = TSIcpEleCreate();
   if (!nele) {
-    return NULL;
+    return nullptr;
   }
 
   copy_cfg_ele(&(ele->cfg_ele), &(nele->cfg_ele));
@@ -2584,12 +2584,12 @@ TSIpAllowEle *
 copy_ip_allow_ele(TSIpAllowEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   TSIpAllowEle *nele = TSIpAllowEleCreate();
   if (!nele) {
-    return NULL;
+    return nullptr;
   }
   if (ele->src_ip_addr) {
     nele->src_ip_addr = copy_ip_addr_ele(ele->src_ip_addr);
@@ -2602,12 +2602,12 @@ TSParentProxyEle *
 copy_parent_proxy_ele(TSParentProxyEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   TSParentProxyEle *nele = TSParentProxyEleCreate(TS_TYPE_UNDEFINED);
   if (!nele) {
-    return NULL;
+    return nullptr;
   }
 
   copy_cfg_ele(&(ele->cfg_ele), &(nele->cfg_ele));
@@ -2623,12 +2623,12 @@ TSVolumeEle *
 copy_volume_ele(TSVolumeEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   TSVolumeEle *nele = TSVolumeEleCreate();
   if (!nele) {
-    return NULL;
+    return nullptr;
   }
 
   copy_cfg_ele(&(ele->cfg_ele), &(nele->cfg_ele));
@@ -2644,12 +2644,12 @@ TSPluginEle *
 copy_plugin_ele(TSPluginEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   TSPluginEle *nele = TSPluginEleCreate();
   if (!nele) {
-    return NULL;
+    return nullptr;
   }
 
   copy_cfg_ele(&(ele->cfg_ele), &(nele->cfg_ele));
@@ -2665,12 +2665,12 @@ TSRemapEle *
 copy_remap_ele(TSRemapEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   TSRemapEle *nele = TSRemapEleCreate(TS_TYPE_UNDEFINED);
   if (!nele) {
-    return NULL;
+    return nullptr;
   }
 
   copy_cfg_ele(&(ele->cfg_ele), &(nele->cfg_ele));
@@ -2699,12 +2699,12 @@ TSSocksEle *
 copy_socks_ele(TSSocksEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   TSSocksEle *nele = TSSocksEleCreate(TS_TYPE_UNDEFINED);
   if (!nele) {
-    return NULL;
+    return nullptr;
   }
 
   copy_cfg_ele(&(ele->cfg_ele), &(nele->cfg_ele));
@@ -2726,12 +2726,12 @@ TSSplitDnsEle *
 copy_split_dns_ele(TSSplitDnsEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   TSSplitDnsEle *nele = TSSplitDnsEleCreate();
   if (!nele) {
-    return NULL;
+    return nullptr;
   }
 
   copy_cfg_ele(&(ele->cfg_ele), &(nele->cfg_ele));
@@ -2752,12 +2752,12 @@ TSStorageEle *
 copy_storage_ele(TSStorageEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   TSStorageEle *nele = TSStorageEleCreate();
   if (!nele) {
-    return NULL;
+    return nullptr;
   }
 
   copy_cfg_ele(&(ele->cfg_ele), &(nele->cfg_ele));
@@ -2775,12 +2775,12 @@ copy_virt_ip_addr_ele(TSVirtIpAddrEle *ele)
   TSVirtIpAddrEle *new_ele;
 
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   new_ele = TSVirtIpAddrEleCreate();
   if (!new_ele) {
-    return NULL;
+    return nullptr;
   }
 
   // copy cfg ele
@@ -2796,7 +2796,7 @@ INKCommentEle *
 copy_comment_ele(INKCommentEle *ele)
 {
   if (!ele) {
-    return NULL;
+    return nullptr;
   }
 
   INKCommentEle *nele = comment_ele_create(ele->comment);
@@ -2818,7 +2818,7 @@ comment_ele_create(char *comment)
   if (comment) {
     ele->comment = ats_strdup(comment);
   } else { // comment is NULL
-    ele->comment = NULL;
+    ele->comment = nullptr;
   }
 
   return ele;
diff --git a/mgmt/api/CoreAPI.cc b/mgmt/api/CoreAPI.cc
index 6fbe1728a01..11fe0c335b0 100644
--- a/mgmt/api/CoreAPI.cc
+++ b/mgmt/api/CoreAPI.cc
@@ -71,7 +71,7 @@ Init(const char * /* socket_path ATS_UNUSED */, TSInitOptionT options)
       return TS_ERR_SYS_CALL;
     }
   } else {
-    local_event_callbacks = NULL;
+    local_event_callbacks = nullptr;
   }
 
   return TS_ERR_OKAY;
@@ -381,7 +381,7 @@ ServerBacktrace(unsigned /* options */, char **trace)
 TSMgmtError
 ServerBacktrace(unsigned /* options */, char **trace)
 {
-  *trace = NULL;
+  *trace = nullptr;
   return TS_ERR_NOT_SUPPORTED;
 }
 
@@ -397,7 +397,7 @@ Reconfigure()
 {
   configFiles->rereadConfig();                              // TM rereads
   lmgmt->signalEvent(MGMT_EVENT_PLUGIN_CONFIG_UPDATE, "*"); // TS rereads
-  RecSetRecordInt("proxy.node.config.reconfigure_time", time(NULL), REC_SOURCE_DEFAULT);
+  RecSetRecordInt("proxy.node.config.reconfigure_time", time(nullptr), REC_SOURCE_DEFAULT);
   RecSetRecordInt("proxy.node.config.reconfigure_required", 0, REC_SOURCE_DEFAULT);
 
   return TS_ERR_OKAY;
@@ -897,7 +897,7 @@ ActiveEventGetMlt(LLQ *active_events)
   event_ht = lmgmt->alarm_keeper->getLocalAlarms();
 
   // iterate through hash-table and insert event_name's into active_events list
-  for (entry = ink_hash_table_iterator_first(event_ht, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(event_ht, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(event_ht, &iterator_state)) {
     char *key = (char *)ink_hash_table_entry_key(event_ht, entry);
 
@@ -957,7 +957,7 @@ EventIsActive(const char *event_name, bool *is_current)
 TSMgmtError
 EventSignalCbRegister(const char *event_name, TSEventSignalFunc func, void *data)
 {
-  return cb_table_register(local_event_callbacks, event_name, func, data, NULL);
+  return cb_table_register(local_event_callbacks, event_name, func, data, nullptr);
 }
 
 /*-------------------------------------------------------------------------
diff --git a/mgmt/api/CoreAPIRemote.cc b/mgmt/api/CoreAPIRemote.cc
index 68055549099..26f051216ec 100644
--- a/mgmt/api/CoreAPIRemote.cc
+++ b/mgmt/api/CoreAPIRemote.cc
@@ -82,8 +82,8 @@ send_and_parse_list(OpType op, LLQ *list)
 
   MgmtMarshallInt optype = op;
   MgmtMarshallInt err;
-  MgmtMarshallData reply    = {NULL, 0};
-  MgmtMarshallString strval = NULL;
+  MgmtMarshallData reply    = {nullptr, 0};
+  MgmtMarshallString strval = nullptr;
 
   if (!list) {
     return TS_ERR_PARAMS;
@@ -113,7 +113,7 @@ send_and_parse_list(OpType op, LLQ *list)
   // tokenize the strval and put into LLQ; use Tokenizer
   tokens.Initialize(strval, COPY_TOKS);
   tok = tokens.iterFirst(&i_state);
-  while (tok != NULL) {
+  while (tok != nullptr) {
     enqueue(list, ats_strdup(tok)); // add token to LLQ
     tok = tokens.iterNext(&i_state);
   }
@@ -146,7 +146,7 @@ mgmt_record_set(const char *rec_name, const char *rec_val, TSActionNeedT *action
   MgmtMarshallString name  = const_cast(rec_name);
   MgmtMarshallString value = const_cast(rec_val);
 
-  MgmtMarshallData reply = {NULL, 0};
+  MgmtMarshallData reply = {nullptr, 0};
   MgmtMarshallInt err;
   MgmtMarshallInt action = TS_ACTION_UNDEFINED;
 
@@ -212,7 +212,7 @@ Init(const char *socket_path, TSInitOptionT options)
       return TS_ERR_SYS_CALL;
     }
   } else {
-    remote_event_callbacks = NULL;
+    remote_event_callbacks = nullptr;
   }
 
   // try to connect to traffic manager
@@ -226,9 +226,9 @@ Init(const char *socket_path, TSInitOptionT options)
 
   // if connected, create event thread that listens for events from TM
   if (0 == (ts_init_options & TS_MGMT_OPT_NO_EVENTS)) {
-    ts_event_thread = ink_thread_create(event_poll_thread_main, &event_socket_fd, 0, 0, NULL);
+    ts_event_thread = ink_thread_create(event_poll_thread_main, &event_socket_fd, 0, 0, nullptr);
   } else {
-    ts_event_thread = static_cast(NULL);
+    ts_event_thread = ink_thread_null();
   }
 
 END:
@@ -236,9 +236,9 @@ Init(const char *socket_path, TSInitOptionT options)
   // create thread that periodically checks the socket connection
   // with TM alive - reconnects if not alive
   if (0 == (ts_init_options & TS_MGMT_OPT_NO_SOCK_TESTS)) {
-    ts_test_thread = ink_thread_create(socket_test_thread, NULL, 0, 0, NULL);
+    ts_test_thread = ink_thread_create(socket_test_thread, nullptr, 0, 0, nullptr);
   } else {
-    ts_test_thread = static_cast(NULL);
+    ts_test_thread = ink_thread_null();
   }
 
   return err;
@@ -284,9 +284,9 @@ Terminate()
   }
 
   // Clear operation
-  ts_test_thread  = static_cast(NULL);
-  ts_event_thread = static_cast(NULL);
-  set_socket_paths(NULL); // clear the socket_path
+  ts_test_thread  = ink_thread_null();
+  ts_event_thread = ink_thread_null();
+  set_socket_paths(nullptr); // clear the socket_path
 
   return TS_ERR_OKAY;
 }
@@ -299,7 +299,7 @@ ProxyStateGet()
 {
   TSMgmtError ret;
   MgmtMarshallInt optype = PROXY_STATE_GET;
-  MgmtMarshallData reply = {NULL, 0};
+  MgmtMarshallData reply = {nullptr, 0};
   MgmtMarshallInt err;
   MgmtMarshallInt state;
 
@@ -338,13 +338,13 @@ ProxyStateSet(TSProxyStateT state, TSCacheClearT clear)
 TSMgmtError
 ServerBacktrace(unsigned options, char **trace)
 {
-  ink_release_assert(trace != NULL);
+  ink_release_assert(trace != nullptr);
   TSMgmtError ret;
   MgmtMarshallInt optype = SERVER_BACKTRACE;
   MgmtMarshallInt err;
   MgmtMarshallInt flags     = options;
-  MgmtMarshallData reply    = {NULL, 0};
-  MgmtMarshallString strval = NULL;
+  MgmtMarshallData reply    = {nullptr, 0};
+  MgmtMarshallString strval = nullptr;
 
   ret = MGMTAPI_SEND_MESSAGE(main_socket_fd, SERVER_BACKTRACE, &optype, &flags);
   if (ret != TS_ERR_OKAY) {
@@ -501,12 +501,12 @@ mgmt_record_get_reply(OpType op, TSRecordEle *rec_ele)
 {
   TSMgmtError ret;
 
-  MgmtMarshallData reply = {NULL, 0};
+  MgmtMarshallData reply = {nullptr, 0};
   MgmtMarshallInt err;
   MgmtMarshallInt rclass;
   MgmtMarshallInt type;
-  MgmtMarshallString name = NULL;
-  MgmtMarshallData value  = {NULL, 0};
+  MgmtMarshallString name = nullptr;
+  MgmtMarshallData value  = {nullptr, 0};
 
   ink_zero(*rec_ele);
   rec_ele->rec_type = TS_REC_UNDEFINED;
@@ -543,7 +543,7 @@ static TSMgmtError
 mgmt_record_describe_reply(TSConfigRecordDescription *val)
 {
   TSMgmtError ret;
-  MgmtMarshallData reply = {NULL, 0};
+  MgmtMarshallData reply = {nullptr, 0};
 
   ret = recv_mgmt_message(main_socket_fd, reply);
   if (ret != TS_ERR_OKAY) {
@@ -551,10 +551,10 @@ mgmt_record_describe_reply(TSConfigRecordDescription *val)
   }
 
   MgmtMarshallInt err;
-  MgmtMarshallString name = NULL;
-  MgmtMarshallString expr = NULL;
-  MgmtMarshallData value  = {NULL, 0};
-  MgmtMarshallData deflt  = {NULL, 0};
+  MgmtMarshallString name = nullptr;
+  MgmtMarshallString expr = nullptr;
+  MgmtMarshallData value  = {nullptr, 0};
+  MgmtMarshallData deflt  = {nullptr, 0};
 
   MgmtMarshallInt rtype;
   MgmtMarshallInt rclass;
@@ -836,12 +836,12 @@ ReadFile(TSFileNameT file, char **text, int *size, int *version)
   MgmtMarshallInt optype = FILE_READ;
   MgmtMarshallInt fid    = file;
 
-  MgmtMarshallData reply = {NULL, 0};
+  MgmtMarshallData reply = {nullptr, 0};
   MgmtMarshallInt err;
   MgmtMarshallInt vers;
-  MgmtMarshallData data = {NULL, 0};
+  MgmtMarshallData data = {nullptr, 0};
 
-  *text = NULL;
+  *text = nullptr;
   *size = *version = 0;
 
   ret = MGMTAPI_SEND_MESSAGE(main_socket_fd, FILE_READ, &optype, &fid);
@@ -963,7 +963,7 @@ EventIsActive(const char *event_name, bool *is_current)
   MgmtMarshallInt optype  = EVENT_ACTIVE;
   MgmtMarshallString name = const_cast(event_name);
 
-  MgmtMarshallData reply = {NULL, 0};
+  MgmtMarshallData reply = {nullptr, 0};
   MgmtMarshallInt err;
   MgmtMarshallInt bval;
 
@@ -1008,7 +1008,7 @@ EventSignalCbRegister(const char *event_name, TSEventSignalFunc func, void *data
   bool first_time = false;
   TSMgmtError ret;
 
-  if (func == NULL) {
+  if (func == nullptr) {
     return TS_ERR_PARAMS;
   }
   if (!remote_event_callbacks) {
diff --git a/mgmt/api/CoreAPIShared.cc b/mgmt/api/CoreAPIShared.cc
index a0fb1d21789..c05ef04a98b 100644
--- a/mgmt/api/CoreAPIShared.cc
+++ b/mgmt/api/CoreAPIShared.cc
@@ -398,7 +398,7 @@ get_event_name(int id)
     ink_strlcpy(name, "MGMT_ALARM_ADD_ALARM", sizeof(name));
     break;
   default:
-    return NULL;
+    return nullptr;
   }
 
   return ats_strdup(name);
diff --git a/mgmt/api/EventCallback.cc b/mgmt/api/EventCallback.cc
index 03b1bd8baa5..629dfaed2ad 100644
--- a/mgmt/api/EventCallback.cc
+++ b/mgmt/api/EventCallback.cc
@@ -84,7 +84,7 @@ create_callback_table(const char *lock_name)
   CallbackTable *cb_table = (CallbackTable *)ats_malloc(sizeof(CallbackTable));
 
   for (int i = 0; i < NUM_EVENTS; i++) {
-    cb_table->event_callback_l[i] = NULL;
+    cb_table->event_callback_l[i] = nullptr;
   }
 
   // initialize the mutex
@@ -161,7 +161,7 @@ get_events_with_callbacks(CallbackTable *cb_table)
 
   if (all_events) {
     delete_queue(cb_ev_list);
-    return NULL;
+    return nullptr;
   }
 
   return cb_ev_list;
@@ -187,14 +187,14 @@ cb_table_register(CallbackTable *cb_table, const char *event_name, TSEventSignal
   EventCallbackT *event_cb; // create new EventCallbackT EACH TIME enqueue
 
   // the data and event_name can be NULL
-  if (func == NULL || !cb_table) {
+  if (func == nullptr || !cb_table) {
     return TS_ERR_PARAMS;
   }
 
   ink_mutex_acquire(&(cb_table->event_callback_lock));
 
   // got lock, add it
-  if (event_name == NULL) { // register for all alarms
+  if (event_name == nullptr) { // register for all alarms
     // printf("[EventSignalCbRegister] Register callback for all alarms\n");
     for (int i = 0; i < NUM_EVENTS; i++) {
       if (!cb_table->event_callback_l[i]) {
@@ -260,7 +260,7 @@ cb_table_unregister(CallbackTable *cb_table, const char *event_name, TSEventSign
   ink_mutex_acquire(&cb_table->event_callback_lock);
 
   // got lock, add it
-  if (event_name == NULL) { // unregister the callback for ALL EVENTS
+  if (event_name == nullptr) { // unregister the callback for ALL EVENTS
     // for each event
     for (int i = 0; i < NUM_EVENTS; i++) {
       if (!cb_table->event_callback_l[i]) { // this event has no callbacks
@@ -268,14 +268,14 @@ cb_table_unregister(CallbackTable *cb_table, const char *event_name, TSEventSign
       }
 
       // func == NULL means unregister all functions associated with alarm
-      if (func == NULL) {
+      if (func == nullptr) {
         while (!queue_is_empty(cb_table->event_callback_l[i])) {
           event_cb = (EventCallbackT *)dequeue(cb_table->event_callback_l[i]);
           delete_event_callback(event_cb);
         }
         // clean up queue and set to NULL
         delete_queue(cb_table->event_callback_l[i]);
-        cb_table->event_callback_l[i] = NULL;
+        cb_table->event_callback_l[i] = nullptr;
       } else { // only remove the func passed in
         int queue_depth;
 
@@ -297,7 +297,7 @@ cb_table_unregister(CallbackTable *cb_table, const char *event_name, TSEventSign
         // is queue empty now? then clean up
         if (queue_is_empty(cb_table->event_callback_l[i])) {
           delete_queue(cb_table->event_callback_l[i]);
-          cb_table->event_callback_l[i] = NULL;
+          cb_table->event_callback_l[i] = nullptr;
         }
       }
     } // end for (int i = 0; i < NUM_EVENTS; i++) {
@@ -310,7 +310,7 @@ cb_table_unregister(CallbackTable *cb_table, const char *event_name, TSEventSign
 
         queue_depth = queue_len(cb_table->event_callback_l[id]);
         // func == NULL means unregister all functions associated with alarm
-        if (func == NULL) {
+        if (func == nullptr) {
           while (!queue_is_empty(cb_table->event_callback_l[id])) {
             event_cb = (EventCallbackT *)dequeue(cb_table->event_callback_l[id]);
             delete_event_callback(event_cb);
@@ -318,7 +318,7 @@ cb_table_unregister(CallbackTable *cb_table, const char *event_name, TSEventSign
 
           // clean up queue and set to NULL
           delete_queue(cb_table->event_callback_l[id]);
-          cb_table->event_callback_l[id] = NULL;
+          cb_table->event_callback_l[id] = nullptr;
         } else {
           // remove this function
           for (int j = 0; j < queue_depth; j++) {
@@ -337,7 +337,7 @@ cb_table_unregister(CallbackTable *cb_table, const char *event_name, TSEventSign
           // is queue empty now?
           if (queue_is_empty(cb_table->event_callback_l[id])) {
             delete_queue(cb_table->event_callback_l[id]);
-            cb_table->event_callback_l[id] = NULL;
+            cb_table->event_callback_l[id] = nullptr;
           }
         } // end if NULL else
       }
diff --git a/mgmt/api/EventControlMain.cc b/mgmt/api/EventControlMain.cc
index 0dd0fe13e71..32e81bc3935 100644
--- a/mgmt/api/EventControlMain.cc
+++ b/mgmt/api/EventControlMain.cc
@@ -254,12 +254,12 @@ event_callback_main(void *arg)
   // initialize queue for accepted con
   accepted_clients = ink_hash_table_create(InkHashTableKeyType_Word);
   if (!accepted_clients) {
-    return NULL;
+    return nullptr;
   }
   // initialize queue for holding mgmt events
   if ((ret = init_mgmt_events()) != TS_ERR_OKAY) {
     ink_hash_table_destroy(accepted_clients);
-    return NULL;
+    return nullptr;
   }
   // register callback with alarms processor
   lmgmt->alarm_keeper->registerCallback(apiEventCallback);
@@ -298,7 +298,7 @@ event_callback_main(void *arg)
     }
 
     // select call - timeout is set so we can check events at regular intervals
-    fds_ready = mgmt_select(FD_SETSIZE, &selectFDs, (fd_set *)NULL, (fd_set *)NULL, &timeout);
+    fds_ready = mgmt_select(FD_SETSIZE, &selectFDs, (fd_set *)nullptr, (fd_set *)nullptr, &timeout);
 
     // check return
     if (fds_ready > 0) {
@@ -428,8 +428,8 @@ event_callback_main(void *arg)
   // all entries should be removed and freed already
   ink_hash_table_destroy(accepted_clients);
 
-  ink_thread_exit(NULL);
-  return NULL;
+  ink_thread_exit(nullptr);
+  return nullptr;
 }
 
 /*-------------------------------------------------------------------------
@@ -449,7 +449,7 @@ static TSMgmtError
 handle_event_reg_callback(EventClientT *client, void *req, size_t reqlen)
 {
   MgmtMarshallInt optype;
-  MgmtMarshallString name = NULL;
+  MgmtMarshallString name = nullptr;
   TSMgmtError ret;
 
   ret = recv_mgmt_request(req, reqlen, EVENT_REG_CALLBACK, &optype, &name);
@@ -492,7 +492,7 @@ static TSMgmtError
 handle_event_unreg_callback(EventClientT *client, void *req, size_t reqlen)
 {
   MgmtMarshallInt optype;
-  MgmtMarshallString name = NULL;
+  MgmtMarshallString name = nullptr;
   TSMgmtError ret;
 
   ret = recv_mgmt_request(req, reqlen, EVENT_UNREG_CALLBACK, &optype, &name);
@@ -525,31 +525,31 @@ handle_event_unreg_callback(EventClientT *client, void *req, size_t reqlen)
 typedef TSMgmtError (*event_message_handler)(EventClientT *, void *, size_t);
 
 static const event_message_handler handlers[] = {
-  NULL,                        // FILE_READ
-  NULL,                        // FILE_WRITE
-  NULL,                        // RECORD_SET
-  NULL,                        // RECORD_GET
-  NULL,                        // PROXY_STATE_GET
-  NULL,                        // PROXY_STATE_SET
-  NULL,                        // RECONFIGURE
-  NULL,                        // RESTART
-  NULL,                        // BOUNCE
-  NULL,                        // EVENT_RESOLVE
-  NULL,                        // EVENT_GET_MLT
-  NULL,                        // EVENT_ACTIVE
+  nullptr,                     // FILE_READ
+  nullptr,                     // FILE_WRITE
+  nullptr,                     // RECORD_SET
+  nullptr,                     // RECORD_GET
+  nullptr,                     // PROXY_STATE_GET
+  nullptr,                     // PROXY_STATE_SET
+  nullptr,                     // RECONFIGURE
+  nullptr,                     // RESTART
+  nullptr,                     // BOUNCE
+  nullptr,                     // EVENT_RESOLVE
+  nullptr,                     // EVENT_GET_MLT
+  nullptr,                     // EVENT_ACTIVE
   handle_event_reg_callback,   // EVENT_REG_CALLBACK
   handle_event_unreg_callback, // EVENT_UNREG_CALLBACK
-  NULL,                        // EVENT_NOTIFY
-  NULL,                        // SNAPSHOT_TAKE
-  NULL,                        // SNAPSHOT_RESTORE
-  NULL,                        // SNAPSHOT_REMOVE
-  NULL,                        // SNAPSHOT_GET_MLT
-  NULL,                        // DIAGS
-  NULL,                        // STATS_RESET_NODE
-  NULL,                        // STATS_RESET_CLUSTER
-  NULL,                        // STORAGE_DEVICE_CMD_OFFLINE
-  NULL,                        // RECORD_MATCH_GET
-  NULL,                        // LIFECYCLE_MESSAGE
+  nullptr,                     // EVENT_NOTIFY
+  nullptr,                     // SNAPSHOT_TAKE
+  nullptr,                     // SNAPSHOT_RESTORE
+  nullptr,                     // SNAPSHOT_REMOVE
+  nullptr,                     // SNAPSHOT_GET_MLT
+  nullptr,                     // DIAGS
+  nullptr,                     // STATS_RESET_NODE
+  nullptr,                     // STATS_RESET_CLUSTER
+  nullptr,                     // STORAGE_DEVICE_CMD_OFFLINE
+  nullptr,                     // RECORD_MATCH_GET
+  nullptr,                     // LIFECYCLE_MESSAGE
 };
 
 static TSMgmtError
@@ -561,7 +561,7 @@ handle_event_message(EventClientT *client, void *req, size_t reqlen)
     goto fail;
   }
 
-  if (handlers[optype] == NULL) {
+  if (handlers[optype] == nullptr) {
     goto fail;
   }
 
diff --git a/mgmt/api/GenericParser.cc b/mgmt/api/GenericParser.cc
index cfff32598ac..b0d8fdbe4b9 100644
--- a/mgmt/api/GenericParser.cc
+++ b/mgmt/api/GenericParser.cc
@@ -32,7 +32,7 @@
  *   free callers from allocating the memory.
  ***************************************************************************/
 
-Token::Token() : name(NULL), value(NULL)
+Token::Token() : name(nullptr), value(nullptr)
 {
 }
 
@@ -59,7 +59,7 @@ Token::setValue(const char *str)
   char *str_copy = (char *)strtrim(str);
   // Can't use ats_strdup after strtrim?
   //  value = ats_strdup(str);
-  ink_assert(value == NULL);
+  ink_assert(value == nullptr);
   if (str_copy) {
     size_t len = strlen(str_copy);
     value      = (char *)ats_malloc(sizeof(char) * (BUFSIZ));
@@ -76,7 +76,7 @@ Token::appendValue(const char *str)
   char *str_copy        = (char *)strtrim(str);
   static bool firstTime = true;
 
-  if (value == NULL) {
+  if (value == nullptr) {
     setValue(str_copy);
   } else {
     if (!firstTime) {
@@ -91,9 +91,9 @@ Token::appendValue(const char *str)
 void
 Token::Print()
 {
-  ink_assert(name != NULL);
+  ink_assert(name != nullptr);
   printf(" (%s", name);
-  if (value != NULL) {
+  if (value != nullptr) {
     printf(", %s", value);
   }
   printf("),");
@@ -112,7 +112,7 @@ TokenList::TokenList() : length(0)
 
 TokenList::~TokenList()
 {
-  Token *token = NULL;
+  Token *token = nullptr;
 
   while ((token = dequeue())) {
     delete (token);
@@ -139,28 +139,33 @@ TokenList::Print()
  ***************************************************************************/
 
 Rule::Rule()
-  : tokenList(NULL), m_filetype(TS_FNAME_UNDEFINED), m_filename(NULL), m_ruleStr(NULL), m_comment(NULL), m_errorHint(NULL)
+  : tokenList(nullptr),
+    m_filetype(TS_FNAME_UNDEFINED),
+    m_filename(nullptr),
+    m_ruleStr(nullptr),
+    m_comment(nullptr),
+    m_errorHint(nullptr)
 {
 }
 
 void
 Rule::setRuleStr(const char *str)
 {
-  ink_assert(m_comment == NULL);
+  ink_assert(m_comment == nullptr);
   m_ruleStr = ats_strdup(str);
 }
 
 void
 Rule::setComment(const char *str)
 {
-  ink_assert(m_comment == NULL);
+  ink_assert(m_comment == nullptr);
   m_comment = ats_strdup(str);
 }
 
 void
 Rule::setErrorHint(const char *str)
 {
-  ink_assert(m_errorHint == NULL);
+  ink_assert(m_errorHint == nullptr);
   m_errorHint = ats_strdup(str);
 }
 
@@ -218,7 +223,7 @@ Rule::parse(const char *const_rule, TSFileNameT filetype)
   case TS_FNAME_VADDRS: /* vaddrs.config */
     return vaddrsParse(rule);
   default:
-    return NULL;
+    return nullptr;
   }
 }
 
@@ -232,7 +237,7 @@ Rule::arm_securityParse(char *rule)
   ruleTok.Initialize(rule);
   tok_iter_state ruleTok_state;
   const char *tokenStr   = ruleTok.iterFirst(&ruleTok_state);
-  Token *token           = (Token *)NULL;
+  Token *token           = (Token *)nullptr;
   TokenList *m_tokenList = new TokenList();
 
   // ASSUMPTIONS:
@@ -243,20 +248,20 @@ Rule::arm_securityParse(char *rule)
     // If 1st element is non-digit, it is a value
     if (!ParseRules::is_digit(tokenStr[0])) {
       // it is a name
-      if (token != (Token *)NULL) {
+      if (token != (Token *)nullptr) {
         // We have a token that hasn't been enqueue, enqueue it
         m_tokenList->enqueue(token);
       }
 
       token = new Token();      // Create a new token
       token->setName(tokenStr); // Set token Name
-    } else if (token != (Token *)NULL) {
+    } else if (token != (Token *)nullptr) {
       // it is a value or part of a value
       token->appendValue(tokenStr); // ISA port# or IP; append to value
     }
   }
 
-  if (token != (Token *)NULL) { // Enqueue the last token -- we haven't done it yet.
+  if (token != (Token *)nullptr) { // Enqueue the last token -- we haven't done it yet.
     m_tokenList->enqueue(token);
   }
 
@@ -276,27 +281,27 @@ Rule::cacheParse(char *rule, unsigned short minNumToken, unsigned short maxNumTo
   int numRuleTok = ruleTok.Initialize(rule);
   tok_iter_state ruleTok_state;
   const char *tokenStr = ruleTok.iterFirst(&ruleTok_state);
-  Token *token         = NULL;
+  Token *token         = nullptr;
   bool insideQuote     = false;
   const char *newStr;
 
   // Sanity Check -- number of token
   if (numRuleTok < minNumToken) {
     setErrorHint("Expecting more space delimited tokens!");
-    return NULL;
+    return nullptr;
   }
   if (numRuleTok > maxNumToken) {
     setErrorHint("Expecting less space delimited tokens!");
-    return NULL;
+    return nullptr;
   }
   // Sanity Check -- no space before or after '='
   if (strstr(rule, " =")) {
     setErrorHint("Expected space before '='");
-    return NULL;
+    return nullptr;
   }
   if (strstr(rule, "= ")) {
     setErrorHint("Expected space after '='");
-    return NULL;
+    return nullptr;
   }
 
   TokenList *m_tokenList = new TokenList();
@@ -312,7 +317,7 @@ Rule::cacheParse(char *rule, unsigned short minNumToken, unsigned short maxNumTo
       if (numSubRuleTok < 2) {
         setErrorHint("'=' is expected in space-delimited token");
         delete m_tokenList;
-        return NULL;
+        return nullptr;
       }
 
       token = new Token();
@@ -352,7 +357,7 @@ Rule::cacheParse(char *rule, unsigned short minNumToken, unsigned short maxNumTo
       if (insideQuote) {
         //              printf("enqueue\n");
         m_tokenList->enqueue(token);
-        token       = NULL; // transfered ownership of token to the token list
+        token       = nullptr; // transfered ownership of token to the token list
         insideQuote = false;
       } else {
         insideQuote = true;
@@ -402,12 +407,12 @@ Rule::icpParse(char *rule, unsigned short minNumToken, unsigned short maxNumToke
   // Sanity Check -- number of token
   if (numRuleTok < minNumToken) {
     setErrorHint("Expecting more ':' delimited tokens!");
-    return NULL;
+    return nullptr;
   }
   if (numRuleTok > maxNumToken + 1 ||
       (numRuleTok == maxNumToken + 1 && strspn(ruleTok[maxNumToken], " ") != strlen(ruleTok[maxNumToken]))) {
     setErrorHint("Expecting less ':' delimited tokens!");
-    return NULL;
+    return nullptr;
   }
 
   m_tokenList = new TokenList();
@@ -438,7 +443,7 @@ Rule::ip_allowParse(char *rule)
 TokenList *
 Rule::logsParse(char * /* rule ATS_UNUSED */)
 {
-  return NULL;
+  return nullptr;
 }
 
 /**
@@ -448,7 +453,7 @@ TokenList *
 Rule::log_hostsParse(char *rule)
 {
   if (strstr(rule, " ")) {
-    return NULL;
+    return nullptr;
   }
 
   Token *token           = new Token();
@@ -512,7 +517,7 @@ Rule::remapParse(char *rule)
 
   if ((numRuleTok != 3) && (numRuleTok != 4)) {
     setErrorHint("Expecting exactly 4 space delimited tokens");
-    return NULL;
+    return nullptr;
   }
 
   Token *token;
@@ -550,13 +555,13 @@ Rule::socksParse(char *rule)
   int numRuleTok = ruleTok.Initialize(rule);
   tok_iter_state ruleTok_state;
   const char *tokenStr = ruleTok.iterFirst(&ruleTok_state);
-  Token *token         = NULL;
+  Token *token         = nullptr;
   bool insideQuote     = false;
   const char *newStr;
 
   if (numRuleTok < 2) {
     setErrorHint("Expecting at least 2 space delimited tokens");
-    return NULL;
+    return nullptr;
   }
 
   TokenList *m_tokenList = new TokenList();
@@ -601,7 +606,7 @@ Rule::socksParse(char *rule)
         if (numSubRuleTok < 2) {
           setErrorHint("'=' is expected in space-delimited token");
           delete m_tokenList;
-          return NULL;
+          return nullptr;
         }
 
         token = new Token();
@@ -625,7 +630,7 @@ Rule::socksParse(char *rule)
           //          printf("!insideQuote: %s\n", subtoken);
           token->setValue(newStr);
           m_tokenList->enqueue(token);
-          token = NULL; // transfered ownership of token to the token list
+          token = nullptr; // transfered ownership of token to the token list
         } else {
           //          printf("insideQuote: %s\n", subtoken);
           //          printf("%s 1\n", subtoken);
@@ -642,7 +647,7 @@ Rule::socksParse(char *rule)
         if (insideQuote) {
           //              printf("enqueue\n");
           m_tokenList->enqueue(token);
-          token       = NULL; // transfered ownership of token to the token list
+          token       = nullptr; // transfered ownership of token to the token list
           insideQuote = false;
         } else {
           insideQuote = true;
@@ -665,27 +670,27 @@ Rule::splitdnsParse(char *rule)
   int numRuleTok = ruleTok.Initialize(rule);
   tok_iter_state ruleTok_state;
   const char *tokenStr = ruleTok.iterFirst(&ruleTok_state);
-  Token *token         = NULL;
+  Token *token         = nullptr;
   bool insideQuote     = false;
   const char *newStr;
 
   // Sanity Check -- number of token
   if (numRuleTok < 0) {
     setErrorHint("Expecting more space delimited tokens!");
-    return NULL;
+    return nullptr;
   }
   if (numRuleTok > 10) {
     setErrorHint("Expecting less space delimited tokens!");
-    return NULL;
+    return nullptr;
   }
   // Sanity Check -- no space before or after '='
   if (strstr(rule, " =")) {
     setErrorHint("Expected space before '='");
-    return NULL;
+    return nullptr;
   }
   if (strstr(rule, "= ")) {
     setErrorHint("Expected space after '='");
-    return NULL;
+    return nullptr;
   }
 
   TokenList *m_tokenList = new TokenList();
@@ -701,7 +706,7 @@ Rule::splitdnsParse(char *rule)
       if (numSubRuleTok < 2) {
         setErrorHint("'=' is expected in space-delimited token");
         delete m_tokenList;
-        return NULL;
+        return nullptr;
       }
 
       token = new Token();
@@ -714,7 +719,7 @@ Rule::splitdnsParse(char *rule)
       if (!insideQuote) {
         token->setValue(newStr);
         m_tokenList->enqueue(token);
-        token = NULL; // transfered ownership of token to the token list
+        token = nullptr; // transfered ownership of token to the token list
       } else {
         //          printf("%s 1\n", subtoken);
         token->appendValue(newStr);
@@ -730,7 +735,7 @@ Rule::splitdnsParse(char *rule)
       if (insideQuote) {
         //              printf("enqueue\n");
         m_tokenList->enqueue(token);
-        token       = NULL; // transfered ownership of token to the token list
+        token       = nullptr; // transfered ownership of token to the token list
         insideQuote = false;
       } else {
         insideQuote = true;
@@ -759,7 +764,7 @@ Rule::updateParse(char *rule)
   // sixth token must be all white spaces
   if (numRuleTok < 5 || numRuleTok > 6 || (numRuleTok == 6 && strspn(ruleTok[5], " ") != strlen(ruleTok[5]))) {
     setErrorHint("Expecting exactly 5 '\' delimited tokens");
-    return NULL;
+    return nullptr;
   }
 
   Token *token;
@@ -815,7 +820,7 @@ Rule::storageParse(char *rule)
 
   if ((numRuleTok != 1) && (numRuleTok != 2)) {
     setErrorHint("Expecting one or two tokens");
-    return NULL;
+    return nullptr;
   }
 
   Token *token;
@@ -860,7 +865,7 @@ Rule::inQuote(const char *str)
  *   continue parsing each rule.
  *   NOTE: a rule that spans more than one line would be a problem in here.
  ***************************************************************************/
-RuleList::RuleList() : length(0), m_filename(NULL)
+RuleList::RuleList() : length(0), m_filename(nullptr)
 {
   m_filetype = TS_FNAME_UNDEFINED;
 }
@@ -869,7 +874,7 @@ RuleList::~RuleList()
 {
   ats_free(m_filename);
 
-  Rule *rule = NULL;
+  Rule *rule = nullptr;
   while ((rule = dequeue())) {
     delete rule;
   }
diff --git a/mgmt/api/INKMgmtAPI.cc b/mgmt/api/INKMgmtAPI.cc
index d06ecb7d49a..f385721dc7e 100644
--- a/mgmt/api/INKMgmtAPI.cc
+++ b/mgmt/api/INKMgmtAPI.cc
@@ -120,7 +120,7 @@ TSListDequeue(TSList l)
 {
   ink_assert(l);
   if (!l || queue_is_empty((LLQ *)l)) {
-    return NULL;
+    return nullptr;
   }
 
   return dequeue((LLQ *)l);
@@ -227,7 +227,7 @@ TSIpAddrListDequeue(TSIpAddrList ip_addrl)
 {
   ink_assert(ip_addrl);
   if (!ip_addrl || queue_is_empty((LLQ *)ip_addrl)) {
-    return NULL;
+    return nullptr;
   }
 
   return (TSIpAddrEle *)dequeue((LLQ *)ip_addrl);
@@ -334,7 +334,7 @@ TSPortListDequeue(TSPortList portl)
 {
   ink_assert(portl);
   if (!portl || queue_is_empty((LLQ *)portl)) {
-    return NULL;
+    return nullptr;
   }
 
   return (TSPortEle *)dequeue((LLQ *)portl);
@@ -440,7 +440,7 @@ TSDomainListDequeue(TSDomainList domainl)
 {
   ink_assert(domainl);
   if (!domainl || queue_is_empty((LLQ *)domainl)) {
-    return NULL;
+    return nullptr;
   }
 
   return (TSDomain *)dequeue((LLQ *)domainl);
@@ -542,7 +542,7 @@ TSStringListDequeue(TSStringList strl)
 {
   ink_assert(strl);
   if (!strl || queue_is_empty((LLQ *)strl)) {
-    return NULL;
+    return nullptr;
   }
 
   return (char *)dequeue((LLQ *)strl);
@@ -642,7 +642,7 @@ TSIntListDequeue(TSIntList intl)
 {
   ink_assert(intl);
   if (!intl || queue_is_empty((LLQ *)intl)) {
-    return NULL;
+    return nullptr;
   }
 
   return (int *)dequeue((LLQ *)intl);
@@ -695,15 +695,15 @@ void
 init_pdss_format(TSPdSsFormat &info)
 {
   info.pd_type              = TS_PD_UNDEFINED;
-  info.pd_val               = NULL;
+  info.pd_val               = nullptr;
   info.sec_spec.active      = 0;
   info.sec_spec.time.hour_a = 0;
   info.sec_spec.time.min_a  = 0;
   info.sec_spec.time.hour_b = 0;
   info.sec_spec.time.min_b  = 0;
   info.sec_spec.src_ip      = TS_INVALID_IP_ADDR;
-  info.sec_spec.prefix      = NULL;
-  info.sec_spec.suffix      = NULL;
+  info.sec_spec.prefix      = nullptr;
+  info.sec_spec.suffix      = nullptr;
   info.sec_spec.port        = TS_INVALID_PORT;
   info.sec_spec.method      = TS_METHOD_UNDEFINED;
   info.sec_spec.scheme      = TS_SCHEME_UNDEFINED;
@@ -716,8 +716,8 @@ TSEventCreate(void)
   TSMgmtEvent *event = (TSMgmtEvent *)ats_malloc(sizeof(TSMgmtEvent));
 
   event->id          = -1;
-  event->name        = NULL;
-  event->description = NULL;
+  event->name        = nullptr;
+  event->description = nullptr;
   event->priority    = TS_EVENT_PRIORITY_UNDEFINED;
 
   return event;
@@ -739,7 +739,7 @@ TSRecordEleCreate(void)
 {
   TSRecordEle *ele = (TSRecordEle *)ats_malloc(sizeof(TSRecordEle));
 
-  ele->rec_name = NULL;
+  ele->rec_name = nullptr;
   ele->rec_type = TS_REC_UNDEFINED;
 
   return ele;
@@ -809,7 +809,7 @@ TSDomainCreate()
 {
   TSDomain *ele = (TSDomain *)ats_malloc(sizeof(TSDomain));
 
-  ele->domain_val = NULL;
+  ele->domain_val = nullptr;
   ele->port       = TS_INVALID_PORT;
 
   return ele;
@@ -836,9 +836,9 @@ TSSspecCreate(void)
   (sec_spec->time).hour_b = 0;
   (sec_spec->time).min_b  = 0;
   sec_spec->src_ip        = TS_INVALID_IP_ADDR;
-  sec_spec->prefix        = NULL;
-  sec_spec->suffix        = NULL;
-  sec_spec->port          = NULL;
+  sec_spec->prefix        = nullptr;
+  sec_spec->suffix        = nullptr;
+  sec_spec->port          = nullptr;
   sec_spec->method        = TS_METHOD_UNDEFINED;
   sec_spec->scheme        = TS_SCHEME_UNDEFINED;
   return sec_spec;
@@ -865,7 +865,7 @@ TSPdSsFormatCreate(void)
 
   /* should set default values here */
   ele->pd_type = TS_PD_UNDEFINED;
-  ele->pd_val  = NULL;
+  ele->pd_val  = nullptr;
 
   ele->sec_spec.active        = 0;
   (ele->sec_spec.time).hour_a = -1;
@@ -873,9 +873,9 @@ TSPdSsFormatCreate(void)
   (ele->sec_spec.time).hour_b = -1;
   (ele->sec_spec.time).min_b  = -1;
   ele->sec_spec.src_ip        = TS_INVALID_IP_ADDR;
-  ele->sec_spec.prefix        = NULL;
-  ele->sec_spec.suffix        = NULL;
-  ele->sec_spec.port          = NULL;
+  ele->sec_spec.prefix        = nullptr;
+  ele->sec_spec.suffix        = nullptr;
+  ele->sec_spec.port          = nullptr;
   ele->sec_spec.method        = TS_METHOD_UNDEFINED;
   ele->sec_spec.scheme        = TS_SCHEME_UNDEFINED;
 
@@ -905,7 +905,7 @@ TSCacheEleCreate(TSRuleTypeT type)
   if (type != TS_CACHE_NEVER && type != TS_CACHE_IGNORE_NO_CACHE && type != TS_CACHE_CLUSTER_CACHE_LOCAL &&
       type != TS_CACHE_IGNORE_CLIENT_NO_CACHE && type != TS_CACHE_IGNORE_SERVER_NO_CACHE && type != TS_CACHE_PIN_IN_CACHE &&
       type != TS_CACHE_REVALIDATE && type != TS_CACHE_TTL_IN_CACHE && type != TS_CACHE_AUTH_CONTENT && type != TS_TYPE_UNDEFINED) {
-    return NULL; // invalid type
+    return nullptr; // invalid type
   }
 
   ele = (TSCacheEle *)ats_malloc(sizeof(TSCacheEle));
@@ -948,8 +948,8 @@ TSCongestionEleCreate()
   ele->cfg_ele.error = TS_ERR_OKAY;
   // init_pdss_format(ele->congestion_info);
   ele->pd_type                 = TS_PD_UNDEFINED;
-  ele->pd_val                  = NULL;
-  ele->prefix                  = NULL;
+  ele->pd_val                  = nullptr;
+  ele->prefix                  = nullptr;
   ele->port                    = TS_INVALID_PORT;
   ele->scheme                  = TS_HTTP_CONGEST_PER_IP;
   ele->max_connection_failures = 5;
@@ -990,7 +990,7 @@ TSHostingEleCreate()
   ele->cfg_ele.type  = TS_HOSTING;
   ele->cfg_ele.error = TS_ERR_OKAY;
   ele->pd_type       = TS_PD_UNDEFINED;
-  ele->pd_val        = NULL;
+  ele->pd_val        = nullptr;
   ele->volumes       = TS_INVALID_LIST;
 
   return ele;
@@ -1020,7 +1020,7 @@ TSIcpEleCreate()
   /* set defaults */
   ele->cfg_ele.type      = TS_ICP;
   ele->cfg_ele.error     = TS_ERR_OKAY;
-  ele->peer_hostname     = NULL;
+  ele->peer_hostname     = nullptr;
   ele->peer_host_ip_addr = TS_INVALID_IP_ADDR;
   ele->peer_type         = TS_ICP_UNDEFINED;
   ele->peer_proxy_port   = TS_INVALID_PORT;
@@ -1081,7 +1081,7 @@ TSParentProxyEleCreate(TSRuleTypeT type)
   TSParentProxyEle *ele;
 
   if (type != TS_PP_PARENT && type != TS_PP_GO_DIRECT && type != TS_TYPE_UNDEFINED) {
-    return NULL;
+    return nullptr;
   }
 
   ele = (TSParentProxyEle *)ats_malloc(sizeof(TSParentProxyEle));
@@ -1145,7 +1145,7 @@ TSPluginEleCreate()
 
   ele->cfg_ele.type  = TS_PLUGIN;
   ele->cfg_ele.error = TS_ERR_OKAY;
-  ele->name          = NULL;
+  ele->name          = nullptr;
   ele->args          = TS_INVALID_LIST;
 
   return ele;
@@ -1174,7 +1174,7 @@ TSRemapEleCreate(TSRuleTypeT type)
 
   if (type != TS_REMAP_MAP && type != TS_REMAP_REVERSE_MAP && type != TS_REMAP_REDIRECT && type != TS_REMAP_REDIRECT_TEMP &&
       type != TS_TYPE_UNDEFINED) {
-    return NULL;
+    return nullptr;
   }
 
   ele                   = (TSRemapEle *)ats_malloc(sizeof(TSRemapEle));
@@ -1182,13 +1182,13 @@ TSRemapEleCreate(TSRuleTypeT type)
   ele->cfg_ele.error    = TS_ERR_OKAY;
   ele->map              = true;
   ele->from_scheme      = TS_SCHEME_UNDEFINED;
-  ele->from_host        = NULL;
+  ele->from_host        = nullptr;
   ele->from_port        = TS_INVALID_PORT;
-  ele->from_path_prefix = NULL;
+  ele->from_path_prefix = nullptr;
   ele->to_scheme        = TS_SCHEME_UNDEFINED;
-  ele->to_host          = NULL;
+  ele->to_host          = nullptr;
   ele->to_port          = TS_INVALID_PORT;
-  ele->to_path_prefix   = NULL;
+  ele->to_path_prefix   = nullptr;
 
   return ele;
 }
@@ -1219,8 +1219,8 @@ TSSocksEleCreate(TSRuleTypeT type)
   ele->dest_ip_addr  = TS_INVALID_IP_ADDR;
   ele->socks_servers = TS_INVALID_LIST;
   ele->rr            = TS_RR_NONE;
-  ele->username      = NULL;
-  ele->password      = NULL;
+  ele->username      = nullptr;
+  ele->password      = nullptr;
 
   return ele;
 }
@@ -1255,9 +1255,9 @@ TSSplitDnsEleCreate()
   ele->cfg_ele.type      = TS_SPLIT_DNS;
   ele->cfg_ele.error     = TS_ERR_OKAY;
   ele->pd_type           = TS_PD_UNDEFINED;
-  ele->pd_val            = NULL;
+  ele->pd_val            = nullptr;
   ele->dns_servers_addrs = TS_INVALID_LIST;
-  ele->def_domain        = NULL;
+  ele->def_domain        = nullptr;
   ele->search_list       = TS_INVALID_LIST;
 
   return ele;
@@ -1290,7 +1290,7 @@ TSStorageEleCreate()
 
   ele->cfg_ele.type  = TS_STORAGE;
   ele->cfg_ele.error = TS_ERR_OKAY;
-  ele->pathname      = NULL;
+  ele->pathname      = nullptr;
   ele->size          = -1;
 
   return ele;
@@ -1316,7 +1316,7 @@ TSVirtIpAddrEleCreate()
 
   ele->cfg_ele.type  = TS_VADDRS;
   ele->cfg_ele.error = TS_ERR_OKAY;
-  ele->intr          = NULL;
+  ele->intr          = nullptr;
   ele->sub_intr      = -1;
   ele->ip_addr       = TS_INVALID_IP_ADDR;
 
@@ -1671,7 +1671,7 @@ TSProxyBacktraceGet(unsigned options, TSString *trace)
     return TS_ERR_PARAMS;
   }
 
-  if (trace == NULL) {
+  if (trace == nullptr) {
     return TS_ERR_PARAMS;
   }
 
@@ -1752,7 +1752,7 @@ char *
 TSGetErrorMessage(TSMgmtError err_id)
 {
   char msg[1024]; // need to define a MAX_ERR_MSG_SIZE???
-  char *err_msg = NULL;
+  char *err_msg = nullptr;
 
   switch (err_id) {
   case TS_ERR_OKAY:
@@ -1851,8 +1851,8 @@ tsapi TSMgmtError
 TSReadFromUrlEx(const char *url, char **header, int *headerSize, char **body, int *bodySize, int timeout)
 {
   int hFD        = -1;
-  char *httpHost = NULL;
-  char *httpPath = NULL;
+  char *httpHost = nullptr;
+  char *httpPath = nullptr;
   int httpPort   = HTTP_PORT;
   int bufsize    = URL_BUFSIZE;
   char buffer[URL_BUFSIZE];
diff --git a/mgmt/api/NetworkMessage.cc b/mgmt/api/NetworkMessage.cc
index 06a3dba9b9a..8073759c8fb 100644
--- a/mgmt/api/NetworkMessage.cc
+++ b/mgmt/api/NetworkMessage.cc
@@ -157,7 +157,7 @@ send_mgmt_request(int fd, OpType optype, ...)
 {
   va_list ap;
   MgmtMarshallInt msglen;
-  MgmtMarshallData req            = {NULL, 0};
+  MgmtMarshallData req            = {nullptr, 0};
   const MgmtMarshallType fields[] = {MGMT_MARSHALL_DATA};
   const NetCmdOperation *cmd;
 
@@ -198,8 +198,8 @@ send_mgmt_error(int fd, OpType optype, TSMgmtError error)
 {
   MgmtMarshallInt ecode     = error;
   MgmtMarshallInt intval    = 0;
-  MgmtMarshallData dataval  = {NULL, 0};
-  MgmtMarshallString strval = NULL;
+  MgmtMarshallData dataval  = {nullptr, 0};
+  MgmtMarshallString strval = nullptr;
 
   // Switch on operations, grouped by response format.
   switch (optype) {
@@ -274,7 +274,7 @@ send_mgmt_response(int fd, OpType optype, ...)
 {
   va_list ap;
   MgmtMarshallInt msglen;
-  MgmtMarshallData reply          = {NULL, 0};
+  MgmtMarshallData reply          = {nullptr, 0};
   const MgmtMarshallType fields[] = {MGMT_MARSHALL_DATA};
   const NetCmdOperation *cmd;
 
diff --git a/mgmt/api/NetworkUtilsLocal.cc b/mgmt/api/NetworkUtilsLocal.cc
index 9738ad18005..7e28dfdc9b5 100644
--- a/mgmt/api/NetworkUtilsLocal.cc
+++ b/mgmt/api/NetworkUtilsLocal.cc
@@ -57,7 +57,7 @@ preprocess_msg(int fd, void **req, size_t *reqlen)
   TSMgmtError ret;
   MgmtMarshallData msg;
 
-  *req    = NULL;
+  *req    = nullptr;
   *reqlen = 0;
 
   ret = recv_mgmt_message(fd, msg);
@@ -66,7 +66,7 @@ preprocess_msg(int fd, void **req, size_t *reqlen)
   }
 
   // We should never receive an empty payload.
-  if (msg.ptr == NULL) {
+  if (msg.ptr == nullptr) {
     return TS_ERR_NET_READ;
   }
 
diff --git a/mgmt/api/NetworkUtilsRemote.cc b/mgmt/api/NetworkUtilsRemote.cc
index 5af947ca616..483d4ccfcf4 100644
--- a/mgmt/api/NetworkUtilsRemote.cc
+++ b/mgmt/api/NetworkUtilsRemote.cc
@@ -39,8 +39,8 @@ int main_socket_fd  = -1;
 int event_socket_fd = -1;
 
 // need to store for reconnecting scenario
-char *main_socket_path  = NULL; // "/mgmtapi.sock"
-char *event_socket_path = NULL; // "/eventapi.sock"
+char *main_socket_path  = nullptr; // "/mgmtapi.sock"
+char *event_socket_path = nullptr; // "/eventapi.sock"
 
 static void *event_callback_thread(void *arg);
 
@@ -60,8 +60,8 @@ set_socket_paths(const char *path)
     main_socket_path  = Layout::relative_to(path, MGMTAPI_MGMT_SOCKET_NAME);
     event_socket_path = Layout::relative_to(path, MGMTAPI_EVENT_SOCKET_NAME);
   } else {
-    main_socket_path  = NULL;
-    event_socket_path = NULL;
+    main_socket_path  = nullptr;
+    event_socket_path = nullptr;
   }
 
   return;
@@ -80,7 +80,7 @@ static bool
 socket_test(int fd)
 {
   MgmtMarshallInt optype = API_PING;
-  MgmtMarshallInt now    = time(NULL);
+  MgmtMarshallInt now    = time(nullptr);
 
   if (MGMTAPI_SEND_MESSAGE(fd, API_PING, &optype, &now) == TS_ERR_OKAY) {
     return true; // write was successful; connection still open
@@ -231,7 +231,7 @@ reconnect()
 
   // relaunch a new event thread since socket_fd changed
   if (0 == (ts_init_options & TS_MGMT_OPT_NO_EVENTS)) {
-    ts_event_thread = ink_thread_create(event_poll_thread_main, &event_socket_fd, 0, 0, NULL);
+    ts_event_thread = ink_thread_create(event_poll_thread_main, &event_socket_fd, 0, 0, nullptr);
     // reregister the callbacks on the TM side for this new client connection
     if (remote_event_callbacks) {
       err = send_register_all_callbacks(event_socket_fd, remote_event_callbacks);
@@ -240,7 +240,7 @@ reconnect()
       }
     }
   } else {
-    ts_event_thread = static_cast(NULL);
+    ts_event_thread = ink_thread_null();
   }
 
   return TS_ERR_OKAY;
@@ -419,8 +419,8 @@ socket_test_thread(void *)
     sleep(5);
   }
 
-  ink_thread_exit(NULL);
-  return NULL;
+  ink_thread_exit(nullptr);
+  return nullptr;
 }
 
 /**********************************************************************
@@ -451,7 +451,7 @@ send_register_all_callbacks(int fd, CallbackTable *cb_table)
   // need to check that the list has all the events registered
   if (!events_with_cb) { // all events have registered callback
     MgmtMarshallInt optype        = EVENT_REG_CALLBACK;
-    MgmtMarshallString event_name = NULL;
+    MgmtMarshallString event_name = nullptr;
 
     err = MGMTAPI_SEND_MESSAGE(fd, EVENT_REG_CALLBACK, &optype, &event_name);
     if (err != TS_ERR_OKAY) {
@@ -558,7 +558,7 @@ parse_generic_response(OpType optype, int fd)
 {
   TSMgmtError err;
   MgmtMarshallInt ival;
-  MgmtMarshallData data = {NULL, 0};
+  MgmtMarshallData data = {nullptr, 0};
 
   err = recv_mgmt_message(fd, data);
   if (err != TS_ERR_OKAY) {
@@ -604,12 +604,12 @@ event_poll_thread_main(void *arg)
   // the sock_fd is going to be the one we listen for events on
   while (1) {
     TSMgmtError ret;
-    TSMgmtEvent *event = NULL;
+    TSMgmtEvent *event = nullptr;
 
-    MgmtMarshallData reply = {NULL, 0};
+    MgmtMarshallData reply = {nullptr, 0};
     MgmtMarshallInt optype;
-    MgmtMarshallString name = NULL;
-    MgmtMarshallString desc = NULL;
+    MgmtMarshallString name = nullptr;
+    MgmtMarshallString desc = nullptr;
 
     // possible sock_fd is invalid if TM restarts and client reconnects
     if (sock_fd < 0) {
@@ -645,11 +645,11 @@ event_poll_thread_main(void *arg)
     event->description = desc;
 
     // got event notice; spawn new thread to handle the event's callback functions
-    ink_thread_create(event_callback_thread, (void *)event, 0, 0, NULL);
+    ink_thread_create(event_callback_thread, (void *)event, 0, 0, nullptr);
   }
 
-  ink_thread_exit(NULL);
-  return NULL;
+  ink_thread_exit(nullptr);
+  return nullptr;
 }
 
 /**********************************************************************
@@ -675,7 +675,7 @@ event_callback_thread(void *arg)
   func_q = create_queue();
   if (!func_q) {
     TSEventDestroy(event_notice);
-    return NULL;
+    return nullptr;
   }
 
   // obtain lock
@@ -700,7 +700,7 @@ event_callback_thread(void *arg)
   // execute the callback function
   while (!queue_is_empty(func_q)) {
     cb = (TSEventSignalFunc)dequeue(func_q);
-    (*cb)(event_notice->name, event_notice->description, event_notice->priority, NULL);
+    (*cb)(event_notice->name, event_notice->description, event_notice->priority, nullptr);
   }
 
   // clean up event notice
@@ -708,6 +708,6 @@ event_callback_thread(void *arg)
   delete_queue(func_q);
 
   // all done!
-  ink_thread_exit(NULL);
-  return NULL;
+  ink_thread_exit(nullptr);
+  return nullptr;
 }
diff --git a/mgmt/api/TSControlMain.cc b/mgmt/api/TSControlMain.cc
index 864e07eea16..b688339546f 100644
--- a/mgmt/api/TSControlMain.cc
+++ b/mgmt/api/TSControlMain.cc
@@ -129,7 +129,7 @@ ts_ctrl_main(void *arg)
   // initialize queue for accepted con
   accepted_con = ink_hash_table_create(InkHashTableKeyType_Word);
   if (!accepted_con) {
-    return NULL;
+    return nullptr;
   }
 
   // now we can start listening, accepting connections and servicing requests
@@ -168,7 +168,7 @@ ts_ctrl_main(void *arg)
     }
 
     // select call - timeout is set so we can check events at regular intervals
-    fds_ready = mgmt_select(FD_SETSIZE, &selectFDs, (fd_set *)NULL, (fd_set *)NULL, &timeout);
+    fds_ready = mgmt_select(FD_SETSIZE, &selectFDs, (fd_set *)nullptr, (fd_set *)nullptr, &timeout);
 
     // check if have any connections or requests
     if (fds_ready > 0) {
@@ -201,7 +201,7 @@ ts_ctrl_main(void *arg)
           client_entry = (ClientT *)ink_hash_table_entry_value(accepted_con, con_entry);
           // got information; check
           if (client_entry->fd && FD_ISSET(client_entry->fd, &selectFDs)) {
-            void *req = NULL;
+            void *req = nullptr;
             size_t reqlen;
 
             ret = preprocess_msg(client_entry->fd, &req, &reqlen);
@@ -255,8 +255,8 @@ ts_ctrl_main(void *arg)
   // all entries should be removed and freed already
   ink_hash_table_destroy(accepted_con);
 
-  ink_thread_exit(NULL);
-  return NULL;
+  ink_thread_exit(nullptr);
+  return nullptr;
 }
 
 /*-------------------------------------------------------------------------
@@ -307,7 +307,7 @@ send_record_get_response(int fd, const RecRecord *rec)
   MgmtMarshallInt type;
   MgmtMarshallInt rclass;
   MgmtMarshallString name;
-  MgmtMarshallData value = {NULL, 0};
+  MgmtMarshallData value = {nullptr, 0};
 
   if (rec) {
     type   = rec->data_type;
@@ -316,7 +316,7 @@ send_record_get_response(int fd, const RecRecord *rec)
   } else {
     type   = RECD_NULL;
     rclass = RECT_NULL;
-    name   = NULL;
+    name   = nullptr;
   }
 
   switch (type) {
@@ -454,7 +454,7 @@ handle_record_match(int fd, void *req, size_t reqlen)
 
   // If successful, send a list terminator.
   if (match.err == TS_ERR_OKAY) {
-    return send_record_get_response(fd, NULL);
+    return send_record_get_response(fd, nullptr);
   }
 
   return match.err;
@@ -473,8 +473,8 @@ handle_record_set(int fd, void *req, size_t reqlen)
   TSMgmtError ret;
   TSActionNeedT action = TS_ACTION_UNDEFINED;
   MgmtMarshallInt optype;
-  MgmtMarshallString name  = NULL;
-  MgmtMarshallString value = NULL;
+  MgmtMarshallString name  = nullptr;
+  MgmtMarshallString value = nullptr;
 
   ret = recv_mgmt_request(req, reqlen, RECORD_SET, &optype, &name, &value);
   if (ret != TS_ERR_OKAY) {
@@ -517,7 +517,7 @@ handle_file_read(int fd, void *req, size_t reqlen)
 
   MgmtMarshallInt err;
   MgmtMarshallInt vers  = 0;
-  MgmtMarshallData data = {NULL, 0};
+  MgmtMarshallData data = {nullptr, 0};
 
   err = recv_mgmt_request(req, reqlen, FILE_READ, &optype, &fid);
   if (err != TS_ERR_OKAY) {
@@ -551,7 +551,7 @@ handle_file_write(int fd, void *req, size_t reqlen)
   MgmtMarshallInt optype;
   MgmtMarshallInt fid;
   MgmtMarshallInt vers;
-  MgmtMarshallData data = {NULL, 0};
+  MgmtMarshallData data = {nullptr, 0};
 
   MgmtMarshallInt err;
 
@@ -560,7 +560,7 @@ handle_file_write(int fd, void *req, size_t reqlen)
     goto done;
   }
 
-  if (data.ptr == NULL) {
+  if (data.ptr == nullptr) {
     err = TS_ERR_PARAMS;
     goto done;
   }
@@ -684,7 +684,7 @@ static TSMgmtError
 handle_storage_device_cmd_offline(int fd, void *req, size_t reqlen)
 {
   MgmtMarshallInt optype;
-  MgmtMarshallString name = NULL;
+  MgmtMarshallString name = nullptr;
   MgmtMarshallInt err;
 
   err = recv_mgmt_request(req, reqlen, STORAGE_DEVICE_CMD_OFFLINE, &optype, &name);
@@ -707,7 +707,7 @@ static TSMgmtError
 handle_event_resolve(int fd, void *req, size_t reqlen)
 {
   MgmtMarshallInt optype;
-  MgmtMarshallString name = NULL;
+  MgmtMarshallString name = nullptr;
   MgmtMarshallInt err;
 
   err = recv_mgmt_request(req, reqlen, EVENT_RESOLVE, &optype, &name);
@@ -736,7 +736,7 @@ handle_event_get_mlt(int fd, void *req, size_t reqlen)
 
   MgmtMarshallInt optype;
   MgmtMarshallInt err;
-  MgmtMarshallString list = NULL;
+  MgmtMarshallString list = nullptr;
 
   err = recv_mgmt_request(req, reqlen, EVENT_GET_MLT, &optype);
   if (err != TS_ERR_OKAY) {
@@ -781,7 +781,7 @@ handle_event_active(int fd, void *req, size_t reqlen)
 {
   bool active;
   MgmtMarshallInt optype;
-  MgmtMarshallString name = NULL;
+  MgmtMarshallString name = nullptr;
 
   MgmtMarshallInt err;
   MgmtMarshallInt bval = 0;
@@ -816,7 +816,7 @@ static TSMgmtError
 handle_snapshot(int fd, void *req, size_t reqlen)
 {
   MgmtMarshallInt optype;
-  MgmtMarshallString name = NULL;
+  MgmtMarshallString name = nullptr;
 
   MgmtMarshallInt err;
 
@@ -868,7 +868,7 @@ handle_snapshot_get_mlt(int fd, void *req, size_t reqlen)
 
   MgmtMarshallInt optype;
   MgmtMarshallInt err;
-  MgmtMarshallString list = NULL;
+  MgmtMarshallString list = nullptr;
 
   err = recv_mgmt_request(req, reqlen, SNAPSHOT_GET_MLT, &optype);
   if (err != TS_ERR_OKAY) {
@@ -911,7 +911,7 @@ static TSMgmtError
 handle_stats_reset(int fd, void *req, size_t reqlen)
 {
   MgmtMarshallInt optype;
-  MgmtMarshallString name = NULL;
+  MgmtMarshallString name = nullptr;
   MgmtMarshallInt err;
 
   err = recv_mgmt_request(req, reqlen, STATS_RESET_NODE, &optype, &name);
@@ -944,7 +944,7 @@ handle_server_backtrace(int fd, void *req, size_t reqlen)
 {
   MgmtMarshallInt optype;
   MgmtMarshallInt options;
-  MgmtMarshallString trace = NULL;
+  MgmtMarshallString trace = nullptr;
   MgmtMarshallInt err;
 
   err = recv_mgmt_request(req, reqlen, SERVER_BACKTRACE, &optype, &options);
@@ -961,9 +961,9 @@ handle_server_backtrace(int fd, void *req, size_t reqlen)
 static void
 send_record_describe(const RecRecord *rec, void *edata)
 {
-  MgmtMarshallString rec_name      = NULL;
-  MgmtMarshallData rec_value       = {NULL, 0};
-  MgmtMarshallData rec_default     = {NULL, 0};
+  MgmtMarshallString rec_name      = nullptr;
+  MgmtMarshallData rec_value       = {nullptr, 0};
+  MgmtMarshallData rec_default     = {nullptr, 0};
   MgmtMarshallInt rec_type         = TS_REC_UNDEFINED;
   MgmtMarshallInt rec_class        = RECT_NULL;
   MgmtMarshallInt rec_version      = 0;
@@ -974,7 +974,7 @@ send_record_describe(const RecRecord *rec, void *edata)
   MgmtMarshallInt rec_updatetype   = 0;
   MgmtMarshallInt rec_checktype    = RECC_NULL;
   MgmtMarshallInt rec_source       = REC_SOURCE_NULL;
-  MgmtMarshallString rec_checkexpr = NULL;
+  MgmtMarshallString rec_checkexpr = nullptr;
 
   TSMgmtError err = TS_ERR_OKAY;
 
@@ -1070,7 +1070,7 @@ handle_record_describe(int fd, void *req, size_t reqlen)
 
     // If successful, send a list terminator.
     if (match.err == TS_ERR_OKAY) {
-      send_record_describe(NULL, &match);
+      send_record_describe(nullptr, &match);
     }
 
   } else {
@@ -1130,9 +1130,9 @@ static const control_message_handler handlers[] = {
   /* EVENT_RESOLVE              */ {MGMT_API_PRIVILEGED, handle_event_resolve},
   /* EVENT_GET_MLT              */ {0, handle_event_get_mlt},
   /* EVENT_ACTIVE               */ {0, handle_event_active},
-  /* EVENT_REG_CALLBACK         */ {0, NULL},
-  /* EVENT_UNREG_CALLBACK       */ {0, NULL},
-  /* EVENT_NOTIFY               */ {0, NULL},
+  /* EVENT_REG_CALLBACK         */ {0, nullptr},
+  /* EVENT_UNREG_CALLBACK       */ {0, nullptr},
+  /* EVENT_NOTIFY               */ {0, nullptr},
   /* SNAPSHOT_TAKE              */ {MGMT_API_PRIVILEGED, handle_snapshot},
   /* SNAPSHOT_RESTORE           */ {MGMT_API_PRIVILEGED, handle_snapshot},
   /* SNAPSHOT_REMOVE            */ {MGMT_API_PRIVILEGED, handle_snapshot},
@@ -1161,7 +1161,7 @@ handle_control_message(int fd, void *req, size_t reqlen)
     goto fail;
   }
 
-  if (handlers[optype].handler == NULL) {
+  if (handlers[optype].handler == nullptr) {
     goto fail;
   }
 
diff --git a/mgmt/cluster/ClusterCom.cc b/mgmt/cluster/ClusterCom.cc
index 77dac62ed6a..7755927d7d0 100644
--- a/mgmt/cluster/ClusterCom.cc
+++ b/mgmt/cluster/ClusterCom.cc
@@ -60,7 +60,7 @@ drainIncomingChannel_broadcast(void *arg)
   ClusterCom *ccom = (ClusterCom *)arg;
 
   time_t t;
-  time_t last_multicast_receive_time = time(NULL);
+  time_t last_multicast_receive_time = time(nullptr);
 
   /* Avert race condition, thread spun during constructor */
   while (lmgmt->ccom != ccom || !lmgmt->ccom->init) {
@@ -81,9 +81,9 @@ drainIncomingChannel_broadcast(void *arg)
     if (ccom->cluster_type != NO_CLUSTER) {
       nevents = mgmt_read_timeout(ccom->receive_fd, ccom->mc_poll_timeout /* secs */, 0 /* usecs */);
       if (nevents > 0) {
-        last_multicast_receive_time = time(NULL); // valid multicast msg
+        last_multicast_receive_time = time(nullptr); // valid multicast msg
       } else {
-        t = time(NULL);
+        t = time(nullptr);
         if ((t - last_multicast_receive_time) > ccom->mc_poll_timeout) {
           // Timeout on multicast receive channel, reset channel.
           if (ccom->receive_fd > 0) {
@@ -107,7 +107,7 @@ drainIncomingChannel_broadcast(void *arg)
     }
   }
 
-  return NULL;
+  return nullptr;
 } /* End drainIncomingChannel */
 
 /*
@@ -259,7 +259,7 @@ drainIncomingChannel(void *arg)
           bool stat = false;
           char fname[1024];
           version_t ver;
-          textBuffer *buff = NULL;
+          textBuffer *buff = nullptr;
           Rollback *rb;
 
           /* Get the file and blast it back */
@@ -322,7 +322,7 @@ drainIncomingChannel(void *arg)
     }
   }
 
-  return NULL;
+  return nullptr;
 } /* End drainIncomingChannel */
 
 /*
@@ -400,7 +400,7 @@ ClusterCom::ClusterCom(unsigned long oip, char *host, int mcport, char *group, i
 
   /* Grab the proxy cluster port */
   cluster_port = REC_readInteger("proxy.config.cluster.cluster_port", &found);
-  RecRegisterConfigUpdateCb("proxy.config.cluster.cluster_port", cluster_com_port_watcher, NULL);
+  RecRegisterConfigUpdateCb("proxy.config.cluster.cluster_port", cluster_com_port_watcher, nullptr);
 
   if (!(strlen(group) < (MAX_MC_GROUP_LEN - 1))) {
     mgmt_fatal(0, "[ClusterCom::ClusterCom] mc group length too large!\n");
@@ -431,7 +431,7 @@ ClusterCom::ClusterCom(unsigned long oip, char *host, int mcport, char *group, i
   ink_assert(found);
 
   /* Launch time */
-  startup_time = time(NULL);
+  startup_time = time(nullptr);
 
   /* Timeout before broadcasting virtual ip information */
   startup_timeout = REC_readInteger("proxy.config.cluster.startup_timeout", &found);
@@ -444,8 +444,8 @@ ClusterCom::ClusterCom(unsigned long oip, char *host, int mcport, char *group, i
   mismatchLog = ink_hash_table_create(InkHashTableKeyType_String);
 
   if (cluster_type != NO_CLUSTER) {
-    ink_thread_create(drainIncomingChannel_broadcast, this, 0, 0, NULL); /* Spin drainer thread */
-    ink_thread_create(drainIncomingChannel, this, 0, 0, NULL);           /* Spin drainer thread */
+    ink_thread_create(drainIncomingChannel_broadcast, this, 0, 0, nullptr); /* Spin drainer thread */
+    ink_thread_create(drainIncomingChannel, this, 0, 0, nullptr);           /* Spin drainer thread */
   }
   return;
 } /* End ClusterCom::ClusterCom */
@@ -460,7 +460,7 @@ ClusterCom::checkPeers(time_t *ticker)
 {
   static int number_of_nodes = -1;
   bool signal_alarm          = false;
-  time_t t                   = time(NULL);
+  time_t t                   = time(nullptr);
   InkHashTableEntry *entry;
   InkHashTableIteratorState iterator_state;
 
@@ -484,7 +484,7 @@ ClusterCom::checkPeers(time_t *ticker)
      * table out from underneath you.
      */
     ink_mutex_acquire(&(mutex)); /* Grab cluster lock */
-    for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != NULL;
+    for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != nullptr;
          entry = ink_hash_table_iterator_next(peers, &iterator_state)) {
       ClusterPeerInfo *tmp = (ClusterPeerInfo *)ink_hash_table_entry_value(peers, entry);
       if ((idle_since = t - tmp->idle_ticks) > peer_timeout) {
@@ -529,7 +529,7 @@ ClusterCom::checkPeers(time_t *ticker)
       for (int c = 0; c <= 1; c++) {
         bool flag = false; /* Used to mark first loop on second pass */
 
-        for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != NULL;
+        for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != nullptr;
              entry = ink_hash_table_iterator_next(peers, &iterator_state)) {
           char str_number[80];
           char *key            = (char *)ink_hash_table_entry_key(peers, entry);
@@ -625,7 +625,7 @@ ClusterCom::checkPeers(time_t *ticker)
   // fix me -- what does aggregated_node_data do?
 
   ink_mutex_acquire(&(mutex)); /* Grab the cluster lock */
-  for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(peers, &iterator_state)) {
     ClusterPeerInfo *tmp = (ClusterPeerInfo *)ink_hash_table_entry_value(peers, entry);
 
@@ -652,7 +652,7 @@ ClusterCom::generateClusterDelta(void)
   }
 
   ink_mutex_acquire(&(mutex));
-  for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(peers, &iterator_state)) {
     ClusterPeerInfo *tmp = (ClusterPeerInfo *)ink_hash_table_entry_value(peers, entry);
 
@@ -692,12 +692,12 @@ ClusterCom::handleMultiCastMessage(char *message)
 
   ++MultiCastMessages;
 
-  t              = time(NULL); /* Get current time for determining most recent changes */
+  t              = time(nullptr); /* Get current time for determining most recent changes */
   our_wall_clock = t;
 
   /* Grab the ip address, we need to know this so that we only complain
      once about a cluster name or traffic server version mismatch */
-  if ((line = strtok_r(message, "\n", &last)) == NULL) {
+  if ((line = strtok_r(message, "\n", &last)) == nullptr) {
     goto Lbogus; /* IP of sender */
   }
 
@@ -714,7 +714,7 @@ ClusterCom::handleMultiCastMessage(char *message)
   }
 
   /* Make sure this is a message for the cluster we belong to */
-  if ((line = strtok_r(NULL, "\n", &last)) == NULL) {
+  if ((line = strtok_r(nullptr, "\n", &last)) == nullptr) {
     goto Lbogus; /* ClusterName of sender */
   }
 
@@ -729,7 +729,7 @@ ClusterCom::handleMultiCastMessage(char *message)
   }
 
   /* Make sure this a message from a Traffic Server of the same version */
-  if ((line = strtok_r(NULL, "\n", &last)) == NULL) {
+  if ((line = strtok_r(nullptr, "\n", &last)) == nullptr) {
     goto Lbogus; /* TS version of sender */
   }
 
@@ -740,7 +740,7 @@ ClusterCom::handleMultiCastMessage(char *message)
   }
 
   /* Figure out what type of message this is */
-  if ((line = strtok_r(NULL, "\n", &last)) == NULL) {
+  if ((line = strtok_r(nullptr, "\n", &last)) == nullptr) {
     goto Lbogus;
   }
   if (strcmp("type: files", line) == 0) { /* Config Files report */
@@ -760,7 +760,7 @@ ClusterCom::handleMultiCastMessage(char *message)
   }
 
   /* Check OS and version info */
-  if ((line = strtok_r(NULL, "\n", &last)) == NULL) {
+  if ((line = strtok_r(nullptr, "\n", &last)) == nullptr) {
     goto Lbogus; /* OS of sender */
   }
   if (!strstr(line, "os: ") || !strstr(line, sys_name)) {
@@ -774,7 +774,7 @@ ClusterCom::handleMultiCastMessage(char *message)
           line, sys_name, sys_release);
   }
 
-  if ((line = strtok_r(NULL, "\n", &last)) == NULL) {
+  if ((line = strtok_r(nullptr, "\n", &last)) == nullptr) {
     goto Lbogus; /* OS-Version of sender */
   }
   if (!strstr(line, "rel: ") || !strstr(line, sys_release)) {
@@ -788,7 +788,7 @@ ClusterCom::handleMultiCastMessage(char *message)
           line, sys_name, sys_release);
   }
 
-  if ((line = strtok_r(NULL, "\n", &last)) == NULL) {
+  if ((line = strtok_r(nullptr, "\n", &last)) == nullptr) {
     goto Lbogus; /* Hostname of sender */
   }
   if (strlen(line) >= sizeof(hostname) || sscanf(line, "hostname: %s", hostname) != 1) {
@@ -796,7 +796,7 @@ ClusterCom::handleMultiCastMessage(char *message)
     return;
   }
 
-  if ((line = strtok_r(NULL, "\n", &last)) == NULL) {
+  if ((line = strtok_r(nullptr, "\n", &last)) == nullptr) {
     goto Lbogus; /* mc_port of sender */
   }
   if (sscanf(line, "port: %d", &peer_cluster_port) != 1) {
@@ -804,7 +804,7 @@ ClusterCom::handleMultiCastMessage(char *message)
     return;
   }
 
-  if ((line = strtok_r(NULL, "\n", &last)) == NULL) {
+  if ((line = strtok_r(nullptr, "\n", &last)) == nullptr) {
     goto Lbogus; /* rs_port of sender */
   }
   if (sscanf(line, "ccomport: %d", &ccom_port) != 1) {
@@ -813,7 +813,7 @@ ClusterCom::handleMultiCastMessage(char *message)
   }
 
   /* Their wall clock time and last config change time */
-  if ((line = strtok_r(NULL, "\n", &last)) == NULL) {
+  if ((line = strtok_r(nullptr, "\n", &last)) == nullptr) {
     goto Lbogus;
   }
   int64_t tt;
@@ -901,14 +901,14 @@ void
 ClusterCom::handleMultiCastStatPacket(char *last, ClusterPeerInfo *peer)
 {
   char *line;
-  RecRecords *rec_ptr = NULL;
+  RecRecords *rec_ptr = nullptr;
   int tmp_id          = -1;
   RecDataT tmp_type   = RECD_NULL;
-  RecRecord *rec      = NULL;
+  RecRecord *rec      = nullptr;
 
   /* Loop over records, updating peer copy(summed later) */
   rec_ptr = &(peer->node_rec_data);
-  for (int i = 0; (line = strtok_r(NULL, "\n", &last)) && i < rec_ptr->num_recs; i++) {
+  for (int i = 0; (line = strtok_r(nullptr, "\n", &last)) && i < rec_ptr->num_recs; i++) {
     tmp_id   = -1;
     tmp_type = RECD_NULL;
     rec      = &(rec_ptr->recs[i]);
@@ -919,7 +919,7 @@ ClusterCom::handleMultiCastStatPacket(char *last, ClusterPeerInfo *peer)
     case RECD_COUNTER: {
       RecInt tmp_msg_val = -1;
       tmp_id             = ink_atoi(line);
-      char *v2 = strchr(line, ':'), *v3 = NULL;
+      char *v2 = strchr(line, ':'), *v3 = nullptr;
       if (v2) {
         tmp_type = (RecDataT)ink_atoi(v2 + 1);
         v3       = strchr(v2 + 1, ':');
@@ -963,7 +963,7 @@ ClusterCom::handleMultiCastStatPacket(char *last, ClusterPeerInfo *peer)
     }
     case RECD_STRING: { /* String stats not supported for cluster passing */
       int ccons;
-      char *tmp_msg_val = NULL;
+      char *tmp_msg_val = nullptr;
 
       // the types specified are all have a defined constant size
       // coverity[secure_coding]
@@ -980,7 +980,7 @@ ClusterCom::handleMultiCastStatPacket(char *last, ClusterPeerInfo *peer)
 
       if (strcmp(tmp_msg_val, "NULL") == 0 && rec->data.rec_string) {
         ats_free(rec->data.rec_string);
-        rec->data.rec_string = NULL;
+        rec->data.rec_string = nullptr;
       } else if (!(strcmp(tmp_msg_val, "NULL") == 0)) {
         ats_free(rec->data.rec_string);
         rec->data.rec_string = (RecString)ats_strdup(tmp_msg_val);
@@ -1085,7 +1085,7 @@ insert_locals(textBuffer *rec_cfg_new, textBuffer *rec_cfg, MgmtHashTable *local
         // value; keep track that we accessed this LOCAL already;
         // later, we need to iterate through all of our un-accessed
         // LOCALs and add them to the bottom of the remote config
-        local_access_ht->mgmt_hash_table_insert(name, 0);
+        local_access_ht->mgmt_hash_table_insert(name, nullptr);
       } else {
         // LOCAL didn't exist in our config, don't merge into the
         // remote config
@@ -1097,13 +1097,14 @@ insert_locals(textBuffer *rec_cfg_new, textBuffer *rec_cfg, MgmtHashTable *local
     rec_cfg_new->copyFrom("\n", strlen("\n"));
   }
   // remove any of our accessed LOCALs from local_ht
-  for (hte = local_access_ht->mgmt_hash_table_iterator_first(&htis); hte != NULL;
+  for (hte = local_access_ht->mgmt_hash_table_iterator_first(&htis); hte != nullptr;
        hte = local_access_ht->mgmt_hash_table_iterator_next(&htis)) {
     name = (char *)local_access_ht->mgmt_hash_table_entry_key(hte);
     local_ht->mgmt_hash_table_delete(name);
   }
   // add our un-accessed LOCALs to the remote config
-  for (hte = local_ht->mgmt_hash_table_iterator_first(&htis); hte != NULL; hte = local_ht->mgmt_hash_table_iterator_next(&htis)) {
+  for (hte = local_ht->mgmt_hash_table_iterator_first(&htis); hte != nullptr;
+       hte = local_ht->mgmt_hash_table_iterator_next(&htis)) {
     line = (char *)local_ht->mgmt_hash_table_entry_value(hte);
     rec_cfg_new->copyFrom(line, strlen(line));
     rec_cfg_new->copyFrom("\n", strlen("\n"));
@@ -1131,7 +1132,7 @@ ClusterCom::handleMultiCastFilePacket(char *last, char *ip)
   InkHashTableValue hash_value;
   bool file_update_failure;
 
-  while ((line = strtok_r(NULL, "\n", &last))) {
+  while ((line = strtok_r(nullptr, "\n", &last))) {
     Rollback *rb;
 
     file_update_failure = false;
@@ -1187,7 +1188,7 @@ ClusterCom::handleMultiCastFilePacket(char *last, char *ip)
             if (!insert_locals(reply_new, reply, our_locals_ht)) {
               file_update_failure = true;
               delete reply_new;
-              reply_new = 0;
+              reply_new = nullptr;
             } else {
               delete reply;
               reply = reply_new;
@@ -1219,7 +1220,7 @@ ClusterCom::handleMultiCastFilePacket(char *last, char *ip)
 
   ink_mutex_acquire(&(mutex)); /* Grab cluster lock to access hash table */
   if (ink_hash_table_lookup(peers, (InkHashTableKey)ip, &hash_value) != 0) {
-    ((ClusterPeerInfo *)hash_value)->manager_idle_ticks = time(NULL);
+    ((ClusterPeerInfo *)hash_value)->manager_idle_ticks = time(nullptr);
     if (((ClusterPeerInfo *)hash_value)->manager_alive < 0) {
       Note("marking manager on node %s as up", ip);
     }
@@ -1241,7 +1242,7 @@ ClusterCom::handleMultiCastAlarmPacket(char *last, char *ip)
 
   /* Allows us to expire stale alarms */
   lmgmt->alarm_keeper->resetSeenFlag(ip);
-  while ((line = strtok_r(NULL, "\n", &last))) {
+  while ((line = strtok_r(nullptr, "\n", &last))) {
     int ccons;
     alarm_t a;
     char *desc;
@@ -1282,7 +1283,7 @@ ClusterCom::handleMultiCastVMapPacket(char *last, char *ip)
   lmgmt->virt_map->rl_resetSeenFlag(ip); /* Ala alarms */
   ink_mutex_release(&(mutex));
 
-  while ((line = strtok_r(NULL, "\n", &last))) {
+  while ((line = strtok_r(nullptr, "\n", &last))) {
     char vaddr[80];
 
     if (strcmp(line, "virt: none") == 0) {
@@ -1324,7 +1325,7 @@ ClusterCom::sendSharedData(bool send_proxy_heart_beat)
     return true;
   }
 
-  now = time(NULL);
+  now = time(nullptr);
   if (now == -1) {
     // The time call failed
     last_shared_send = 0;
@@ -1436,8 +1437,8 @@ ClusterCom::constructSharedGenericPacket(char *message, int max, RecT packet_typ
   ink_release_assert(running_sum < max);
 
   /* Current time stamp, for xntp like synching */
-  if (time(NULL) > 0) {
-    snprintf(tmp, sizeof(tmp), "time: %" PRId64 "\n", (int64_t)time(NULL));
+  if (time(nullptr) > 0) {
+    snprintf(tmp, sizeof(tmp), "time: %" PRId64 "\n", (int64_t)time(nullptr));
     ink_strlcpy(&message[running_sum], tmp, (max - running_sum));
     running_sum += strlen(tmp);
   } else {
@@ -1538,7 +1539,7 @@ ClusterCom::constructSharedFilePacket(char *message, int max)
   buff  = configFiles->filesManaged();
   files = buff->bufPtr();
   line  = strtok_r(files, "\n", &last);
-  if (line == NULL) {
+  if (line == nullptr) {
     delete buff;
     return;
   }
@@ -1576,7 +1577,7 @@ ClusterCom::constructSharedFilePacket(char *message, int max)
     } else {
       mgmt_elog(0, "[ClusterCom::constructSharedFilePacket] Invalid base name? '%s'\n", line);
     }
-  } while ((line = strtok_r(NULL, "\n", &last)));
+  } while ((line = strtok_r(nullptr, "\n", &last)));
 
   delete buff;
   return;
@@ -1790,7 +1791,7 @@ ClusterCom::sendClusterMessage(int msg_type, const char *args)
   }
 
   ink_mutex_acquire(&(mutex)); /* Grab cluster lock */
-  for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(peers, &iterator_state)) {
     ClusterPeerInfo *tmp = (ClusterPeerInfo *)ink_hash_table_entry_value(peers, entry);
 
@@ -2073,7 +2074,7 @@ ClusterCom::isMaster()
   InkHashTableEntry *entry;
   InkHashTableIteratorState iterator_state;
 
-  for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(peers, &iterator_state)) {
     ClusterPeerInfo *pinfo = (ClusterPeerInfo *)ink_hash_table_entry_value(peers, entry);
 
@@ -2107,7 +2108,7 @@ ClusterCom::lowestPeer(int *no)
   InkHashTableEntry *entry;
   InkHashTableIteratorState iterator_state;
 
-  for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(peers, &iterator_state)) {
     ClusterPeerInfo *tmp = (ClusterPeerInfo *)ink_hash_table_entry_value(peers, entry);
     if (tmp->num_virt_addrs == -1) {
@@ -2180,7 +2181,7 @@ ClusterCom::highestPeer(int *no)
   InkHashTableEntry *entry;
   InkHashTableIteratorState iterator_state;
 
-  for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(peers, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(peers, &iterator_state)) {
     ClusterPeerInfo *tmp = (ClusterPeerInfo *)ink_hash_table_entry_value(peers, entry);
     if (tmp->num_virt_addrs == -1) {
@@ -2220,7 +2221,7 @@ checkBackDoor(int req_fd, char *message)
     ink_mutex_acquire(&(lmgmt->ccom->mutex));
     tmp_msg = "\nLocal Map (virtual-ip):\n-----------------------\n";
     mgmt_writeline(req_fd, tmp_msg, strlen(tmp_msg));
-    for (entry = ink_hash_table_iterator_first(lmgmt->virt_map->our_map, &iterator_state); entry != NULL;
+    for (entry = ink_hash_table_iterator_first(lmgmt->virt_map->our_map, &iterator_state); entry != nullptr;
          entry = ink_hash_table_iterator_next(lmgmt->virt_map->our_map, &iterator_state)) {
       char *tmp = (char *)ink_hash_table_entry_key(lmgmt->virt_map->our_map, entry);
       mgmt_writeline(req_fd, tmp, strlen(tmp));
@@ -2235,7 +2236,7 @@ checkBackDoor(int req_fd, char *message)
     map_empty = true;
     tmp_msg   = "\nPeer Map (virtual-ip real-ip):\n------------------------------\n";
     mgmt_writeline(req_fd, tmp_msg, strlen(tmp_msg));
-    for (entry = ink_hash_table_iterator_first(lmgmt->virt_map->ext_map, &iterator_state); entry != NULL;
+    for (entry = ink_hash_table_iterator_first(lmgmt->virt_map->ext_map, &iterator_state); entry != nullptr;
          entry = ink_hash_table_iterator_next(lmgmt->virt_map->ext_map, &iterator_state)) {
       char *tmp = (char *)ink_hash_table_entry_key(lmgmt->virt_map->ext_map, entry);
       mgmt_writeline(req_fd, tmp, strlen(tmp));
@@ -2322,7 +2323,7 @@ checkBackDoor(int req_fd, char *message)
 
     ink_mutex_acquire(&(lmgmt->ccom->mutex));
 
-    for (entry = ink_hash_table_iterator_first(lmgmt->ccom->peers, &iterator_state); entry != NULL;
+    for (entry = ink_hash_table_iterator_first(lmgmt->ccom->peers, &iterator_state); entry != nullptr;
          entry = ink_hash_table_iterator_next(lmgmt->ccom->peers, &iterator_state)) {
       const char *tmp_msg;
       char ip_addr[80];
@@ -2388,7 +2389,7 @@ checkBackDoor(int req_fd, char *message)
     return true;
   } else if (strstr(message, "cluster: ")) {
     int msg_type;
-    char *args = NULL;
+    char *args = nullptr;
 
     if (strstr(message, "cluster: shutdown_manager")) {
       msg_type = CLUSTER_MSG_SHUTDOWN_MANAGER;
diff --git a/mgmt/cluster/VMap.cc b/mgmt/cluster/VMap.cc
index 7ad0e6ae181..a175c3eac2d 100644
--- a/mgmt/cluster/VMap.cc
+++ b/mgmt/cluster/VMap.cc
@@ -69,11 +69,11 @@ VMap::VMap(char *interface, unsigned long ip, ink_mutex *m)
 
   our_ip               = ip;
   num_interfaces       = 0;
-  id_map               = NULL;
+  id_map               = nullptr;
   interface_realip_map = ink_hash_table_create(InkHashTableKeyType_String);
   our_map              = ink_hash_table_create(InkHashTableKeyType_String);
   ext_map              = ink_hash_table_create(InkHashTableKeyType_String);
-  addr_list            = NULL;
+  addr_list            = nullptr;
   num_addrs            = 0;
   num_nics             = 0;
 
@@ -121,7 +121,7 @@ VMap::VMap(char *interface, unsigned long ip, ink_mutex *m)
     // INKqa06739
     // Fetch the list of network interfaces
     // . from Stevens, Unix Network Prog., pg 434-435
-    ifbuf   = 0;
+    ifbuf   = nullptr;
     lastlen = 0;
     len     = 128 * sizeof(struct ifreq); // initial buffer size guess
     for (;;) {
@@ -197,14 +197,14 @@ VMap::VMap(char *interface, unsigned long ip, ink_mutex *m)
     close(tmp_socket);
   }
 
-  RecRegisterConfigUpdateCb("proxy.config.vmap.enabled", vmapEnableHandler, NULL);
+  RecRegisterConfigUpdateCb("proxy.config.vmap.enabled", vmapEnableHandler, nullptr);
 
   down_up_timeout = REC_readInteger("proxy.config.vmap.down_up_timeout", &found);
   addr_list_fname = REC_readString("proxy.config.vmap.addr_file", &found);
   lt_readAListFile(addr_list_fname);
 
   map_change_thresh = 10;
-  last_map_change   = time(NULL);
+  last_map_change   = time(nullptr);
 
   return;
 
@@ -235,14 +235,14 @@ void
 VMap::lt_runGambit()
 {
   int i, no = 0;
-  char vaddr[80], raddr[80], *conf_addr = NULL;
+  char vaddr[80], raddr[80], *conf_addr = nullptr;
   bool init = false;
   struct in_addr virtual_addr, real_addr;
 
   if (!enabled) {
     return;
   }
-  if (!((time(NULL) - lmgmt->ccom->startup_time) > lmgmt->ccom->startup_timeout)) {
+  if (!((time(nullptr) - lmgmt->ccom->startup_time) > lmgmt->ccom->startup_timeout)) {
     return;
   }
   if (num_addrs == 0) {
@@ -306,7 +306,7 @@ VMap::lt_readAListFile(const char *fname)
   char tmp_addr[1024], tmp_interface[1024];
   FILE *fin;
   char tmp_id[1024];
-  ats_scoped_str vaddr_path(RecConfigReadConfigPath(NULL, fname));
+  ats_scoped_str vaddr_path(RecConfigReadConfigPath(nullptr, fname));
 
   if (!(fin = fopen(vaddr_path, "r"))) {
     mgmt_log("[VMap::lt_readAListFile] Unable to open file: %s, addr list unchanged\n", (const char *)vaddr_path);
@@ -333,7 +333,7 @@ VMap::lt_readAListFile(const char *fname)
   if (num_addrs) {
     addr_list = (unsigned long *)ats_malloc(sizeof(unsigned long) * num_addrs);
   } else { /* Handle the case where there are no addrs in the file */
-    addr_list = NULL;
+    addr_list = nullptr;
     fclose(fin);
     ink_mutex_release(mutex);
     return;
@@ -394,7 +394,7 @@ VMap::rl_resetSeenFlag(char *ip)
   InkHashTableEntry *entry;
   InkHashTableIteratorState iterator_state;
 
-  for (entry = ink_hash_table_iterator_first(ext_map, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(ext_map, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(ext_map, &iterator_state)) {
     char *key = (char *)ink_hash_table_entry_key(ext_map, entry);
     bool *tmp = (bool *)ink_hash_table_entry_value(ext_map, entry);
@@ -417,7 +417,7 @@ VMap::rl_clearUnSeen(char *ip)
   InkHashTableEntry *entry;
   InkHashTableIteratorState iterator_state;
 
-  for (entry = ink_hash_table_iterator_first(ext_map, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(ext_map, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(ext_map, &iterator_state)) {
     char *key = (char *)ink_hash_table_entry_key(ext_map, entry);
     bool *tmp = (bool *)ink_hash_table_entry_value(ext_map, entry);
@@ -507,7 +507,7 @@ VMap::rl_map(char *virt_ip, char *real_ip)
 
   if (!real_ip) {
     mgmt_elog(0, "[VMap::rl_map] no real ip associated with virtual ip %s, mapping to local\n", buf);
-    last_map_change = time(NULL);
+    last_map_change = time(nullptr);
   }
   ink_hash_table_insert(tmp, buf, (void *)entry);
   return true;
@@ -533,7 +533,7 @@ VMap::rl_unmap(char *virt_ip, char *real_ip)
   }
 
   if (!real_ip) {
-    last_map_change = time(NULL);
+    last_map_change = time(nullptr);
   }
   ink_hash_table_delete(tmp, buf);
   ats_free(hash_value);
@@ -549,17 +549,17 @@ VMap::rl_unmap(char *virt_ip, char *real_ip)
 char *
 VMap::rl_checkConflict(char *virt_ip)
 {
-  char *key       = NULL;
+  char *key       = nullptr;
   bool in_our_map = false, in_ext_map = false;
   InkHashTableValue hash_value;
   InkHashTableEntry *entry;
   InkHashTableIteratorState iterator_state;
 
-  if ((time(NULL) - last_map_change) < map_change_thresh) {
-    return NULL;
+  if ((time(nullptr) - last_map_change) < map_change_thresh) {
+    return nullptr;
   }
 
-  for (entry = ink_hash_table_iterator_first(ext_map, &iterator_state); (entry != NULL && !in_ext_map);
+  for (entry = ink_hash_table_iterator_first(ext_map, &iterator_state); (entry != nullptr && !in_ext_map);
        entry = ink_hash_table_iterator_next(ext_map, &iterator_state)) {
     key = (char *)ink_hash_table_entry_key(ext_map, entry);
     if (strstr(key, virt_ip)) {
@@ -574,7 +574,7 @@ VMap::rl_checkConflict(char *virt_ip)
   if (in_our_map && in_ext_map) {
     char *buf, buf2[80];
 
-    if ((buf = strstr(key, " ")) != NULL) {
+    if ((buf = strstr(key, " ")) != nullptr) {
       buf++;
       ink_strlcpy(buf2, buf, sizeof(buf2));
     } else {
@@ -582,7 +582,7 @@ VMap::rl_checkConflict(char *virt_ip)
     }
     return ats_strdup(buf2);
   }
-  return NULL;
+  return nullptr;
 } /* End VMap::rl_checkConflict */
 
 /*
@@ -598,7 +598,7 @@ VMap::rl_checkGlobConflict(char *virt_ip)
   InkHashTableEntry *entry;
   InkHashTableIteratorState iterator_state;
 
-  for (entry = ink_hash_table_iterator_first(ext_map, &iterator_state); (entry != NULL && !in_ext_map);
+  for (entry = ink_hash_table_iterator_first(ext_map, &iterator_state); (entry != nullptr && !in_ext_map);
        entry = ink_hash_table_iterator_next(ext_map, &iterator_state)) {
     char *key = (char *)ink_hash_table_entry_key(ext_map, entry);
     if (strstr(key, virt_ip)) {
@@ -694,7 +694,7 @@ VMap::rl_boundAddr(char *virt_ip)
     return 1;
   }
 
-  for (entry = ink_hash_table_iterator_first(ext_map, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(ext_map, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(ext_map, &iterator_state)) {
     char *key = (char *)ink_hash_table_entry_key(ext_map, entry);
 
@@ -721,13 +721,13 @@ VMap::rl_boundTo(char *virt_ip)
     return our_ip;
   }
 
-  for (entry = ink_hash_table_iterator_first(ext_map, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(ext_map, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(ext_map, &iterator_state)) {
     char *key = (char *)ink_hash_table_entry_key(ext_map, entry);
 
     if (strstr(key, virt_ip)) {
       char *buf, buf2[80];
-      if ((buf = strstr(key, " ")) != NULL) {
+      if ((buf = strstr(key, " ")) != nullptr) {
         buf++;
         ink_strlcpy(buf2, buf, sizeof(buf2));
       } else {
@@ -768,7 +768,7 @@ VMap::lt_constructVMapMessage(char *ip, char *message, int max)
   bsum = n;
 
   ink_mutex_acquire(mutex);
-  for (entry = ink_hash_table_iterator_first(our_map, &iterator_state); (entry != NULL && n < max);
+  for (entry = ink_hash_table_iterator_first(our_map, &iterator_state); (entry != nullptr && n < max);
        entry = ink_hash_table_iterator_next(our_map, &iterator_state)) {
     char buf[1024];
     char *key = (char *)ink_hash_table_entry_key(our_map, entry);
@@ -831,7 +831,7 @@ VMap::downOurAddrs()
   InkHashTableIteratorState iterator_state;
 
   ink_mutex_acquire(mutex);
-  for (entry = ink_hash_table_iterator_first(our_map, &iterator_state); entry != NULL;
+  for (entry = ink_hash_table_iterator_first(our_map, &iterator_state); entry != nullptr;
        entry = ink_hash_table_iterator_next(our_map, &iterator_state)) {
     some_address_mapped = true;
   }
diff --git a/mgmt/utils/ExpandingArray.cc b/mgmt/utils/ExpandingArray.cc
index 7afdcf16140..952d553246a 100644
--- a/mgmt/utils/ExpandingArray.cc
+++ b/mgmt/utils/ExpandingArray.cc
@@ -53,7 +53,7 @@ void *ExpandingArray::operator[](int index)
   if (index < numValidValues) {
     return internalArray[index];
   } else {
-    return NULL;
+    return nullptr;
   }
 }
 
diff --git a/mgmt/utils/MgmtLocalCleanup.cc b/mgmt/utils/MgmtLocalCleanup.cc
index 44fa5310f07..c57e34347e3 100644
--- a/mgmt/utils/MgmtLocalCleanup.cc
+++ b/mgmt/utils/MgmtLocalCleanup.cc
@@ -27,7 +27,7 @@
 void
 mgmt_cleanup()
 {
-  if (lmgmt != NULL) {
+  if (lmgmt != nullptr) {
     lmgmt->mgmtShutdown();
   }
 }
diff --git a/mgmt/utils/MgmtMarshall.cc b/mgmt/utils/MgmtMarshall.cc
index 4490e14114e..c7d8fd0c71c 100644
--- a/mgmt/utils/MgmtMarshall.cc
+++ b/mgmt/utils/MgmtMarshall.cc
@@ -227,7 +227,7 @@ mgmt_message_length_v(const MgmtMarshallType *fields, unsigned count, va_list ap
     case MGMT_MARSHALL_STRING:
       nbytes += 4;
       ptr.m_string = va_arg(ap, MgmtMarshallString *);
-      if (*ptr.m_string == NULL) {
+      if (*ptr.m_string == nullptr) {
         ptr.m_string = ∅
       }
       nbytes += strlen(*ptr.m_string) + 1;
@@ -280,7 +280,7 @@ mgmt_message_write_v(int fd, const MgmtMarshallType *fields, unsigned count, va_
     case MGMT_MARSHALL_STRING: {
       MgmtMarshallData data;
       ptr.m_string = va_arg(ap, MgmtMarshallString *);
-      if (*ptr.m_string == NULL) {
+      if (*ptr.m_string == nullptr) {
         ptr.m_string = ∅
       }
       data.ptr = *ptr.m_string;
@@ -412,7 +412,7 @@ mgmt_message_marshall_v(void *buf, size_t remain, const MgmtMarshallType *fields
     case MGMT_MARSHALL_STRING: {
       MgmtMarshallData data;
       ptr.m_string = va_arg(ap, MgmtMarshallString *);
-      if (*ptr.m_string == NULL) {
+      if (*ptr.m_string == nullptr) {
         ptr.m_string = ∅
       }
 
diff --git a/mgmt/utils/MgmtSocket.cc b/mgmt/utils/MgmtSocket.cc
index d6e5e7478f4..5451c23f32c 100644
--- a/mgmt/utils/MgmtSocket.cc
+++ b/mgmt/utils/MgmtSocket.cc
@@ -103,7 +103,7 @@ mgmt_fopen(const char *filename, const char *mode)
     // no leak here as f will be returned if it is > 0
     // coverity[overwrite_var]
     f = ::fopen(filename, mode);
-    if (f != NULL) {
+    if (f != nullptr) {
       return f;
     }
     if (!mgmt_transient_error()) {
@@ -254,9 +254,9 @@ mgmt_write_timeout(int fd, int sec, int usec)
 
   if (sec < 0 && usec < 0) {
     // blocking select; only returns when fd is ready to write
-    return (mgmt_select(fd + 1, NULL, &writeSet, NULL, NULL));
+    return (mgmt_select(fd + 1, nullptr, &writeSet, nullptr, nullptr));
   } else {
-    return (mgmt_select(fd + 1, NULL, &writeSet, NULL, &timeout));
+    return (mgmt_select(fd + 1, nullptr, &writeSet, nullptr, &timeout));
   }
 }
 
@@ -291,7 +291,7 @@ mgmt_read_timeout(int fd, int sec, int usec)
   FD_ZERO(&readSet);
   FD_SET(fd, &readSet);
 
-  return mgmt_select(fd + 1, &readSet, NULL, NULL, &timeout);
+  return mgmt_select(fd + 1, &readSet, nullptr, nullptr, &timeout);
 }
 
 bool
diff --git a/mgmt/utils/MgmtUtils.cc b/mgmt/utils/MgmtUtils.cc
index d0b61b625db..6e4b0fb8e23 100644
--- a/mgmt/utils/MgmtUtils.cc
+++ b/mgmt/utils/MgmtUtils.cc
@@ -329,7 +329,7 @@ mgmt_getAddrForIntr(char *intrName, sockaddr *addr, int *mtu)
 {
   bool found = false;
 
-  if (intrName == NULL) {
+  if (intrName == nullptr) {
     return false;
   }
 
@@ -349,7 +349,7 @@ mgmt_getAddrForIntr(char *intrName, sockaddr *addr, int *mtu)
   // INKqa06739
   // Fetch the list of network interfaces
   // . from Stevens, Unix Network Prog., pg 434-435
-  ifbuf   = 0;
+  ifbuf   = nullptr;
   lastlen = 0;
   len     = 128 * sizeof(struct ifreq); // initial buffer size guess
   for (;;) {
@@ -420,7 +420,7 @@ mgmt_sortipaddrs(int num, struct in_addr **list)
 
   min   = (list[0])->s_addr;
   entry = list[0];
-  while (i < num && (tmp = (struct in_addr *)list[i]) != NULL) {
+  while (i < num && (tmp = (struct in_addr *)list[i]) != nullptr) {
     i++;
     if (min > tmp->s_addr) {
       min   = tmp->s_addr;
diff --git a/mgmt/utils/test_marshall.cc b/mgmt/utils/test_marshall.cc
index 5575ea27591..136f049cd1d 100644
--- a/mgmt/utils/test_marshall.cc
+++ b/mgmt/utils/test_marshall.cc
@@ -63,7 +63,7 @@ const MgmtMarshallType afields[] = {
 };
 
 const char alpha[]       = "abcdefghijklmnopqrstuvwxyz0123456789";
-const char *stringvals[] = {NULL, "", "randomstring"};
+const char *stringvals[] = {nullptr, "", "randomstring"};
 
 static bool
 errno_is_continue()
@@ -91,7 +91,7 @@ message_connect_channel(RegressionTest *t, int listenfd, int clientfd, int serve
   connect(clientfd, (const struct sockaddr *)&in, sizeof(in));
 
   while (need_accept) {
-    serverfd = accept(listenfd, NULL, NULL);
+    serverfd = accept(listenfd, nullptr, nullptr);
     if (serverfd == -1) {
       rprintf(t, "accepting, %d %s\n", errno, strerror(errno));
       if (!errno_is_continue()) {
@@ -149,8 +149,8 @@ REGRESSION_TEST(MessageReadWriteA)(RegressionTest *t, int /* atype ATS_UNUSED */
 
   MgmtMarshallInt mint       = 0;
   MgmtMarshallLong mlong     = 0;
-  MgmtMarshallString mstring = NULL;
-  MgmtMarshallData mdata     = {NULL, 0};
+  MgmtMarshallString mstring = nullptr;
+  MgmtMarshallData mdata     = {nullptr, 0};
 
   clientfd = mgmt_socket(AF_INET, SOCK_STREAM, 0);
   listenfd = message_listen(serverport);
@@ -179,15 +179,15 @@ REGRESSION_TEST(MessageReadWriteA)(RegressionTest *t, int /* atype ATS_UNUSED */
     const char *s = stringvals[i];
     size_t len    = 4 /* length */ + (s ? strlen(s) : 0) /* bytes */ + 1 /* NULL */;
 
-    mstring = s ? ats_strdup(s) : NULL;
+    mstring = s ? ats_strdup(s) : nullptr;
     CHECK_EQ(mgmt_message_write(clientfd, sfields, countof(sfields), &mstring), len);
     ats_free(mstring);
-    mstring = NULL;
+    mstring = nullptr;
 
     CHECK_EQ(mgmt_message_read(serverfd, sfields, countof(sfields), &mstring), len);
     CHECK_STRING(s, mstring);
     ats_free(mstring);
-    mstring = NULL;
+    mstring = nullptr;
   }
 
   // Marshall data.
@@ -216,14 +216,14 @@ REGRESSION_TEST(MessageMarshall)(RegressionTest *t, int /* atype ATS_UNUSED */,
 
   MgmtMarshallInt mint       = 0;
   MgmtMarshallLong mlong     = 0;
-  MgmtMarshallString mstring = NULL;
-  MgmtMarshallData mdata     = {NULL, 0};
+  MgmtMarshallString mstring = nullptr;
+  MgmtMarshallData mdata     = {nullptr, 0};
 
   // Parse empty message.
-  CHECK_EQ(mgmt_message_parse(NULL, 0, NULL, 0), 0);
+  CHECK_EQ(mgmt_message_parse(nullptr, 0, nullptr, 0), 0);
 
   // Marshall empty message.
-  CHECK_EQ(mgmt_message_marshall(NULL, 0, NULL, 0), 0);
+  CHECK_EQ(mgmt_message_marshall(nullptr, 0, nullptr, 0), 0);
 
   // Marshall some integral types.
   mint  = -156;
@@ -240,17 +240,17 @@ REGRESSION_TEST(MessageMarshall)(RegressionTest *t, int /* atype ATS_UNUSED */,
     const char *s = stringvals[i];
     size_t len    = 4 /* length */ + (s ? strlen(s) : 0) /* bytes */ + 1 /* NULL */;
 
-    mstring = s ? ats_strdup(s) : NULL;
+    mstring = s ? ats_strdup(s) : nullptr;
     CHECK_EQ(mgmt_message_marshall(msgbuf, 1, sfields, countof(sfields), &mstring), -1);
     CHECK_EQ(mgmt_message_marshall(msgbuf, sizeof(msgbuf), sfields, countof(sfields), &mstring), len);
     ats_free(mstring);
-    mstring = NULL;
+    mstring = nullptr;
 
     CHECK_EQ(mgmt_message_parse(msgbuf, 1, sfields, countof(sfields), &mstring), -1);
     CHECK_EQ(mgmt_message_parse(msgbuf, sizeof(msgbuf), sfields, countof(sfields), &mstring), len);
     CHECK_STRING(s, mstring);
     ats_free(mstring);
-    mstring = NULL;
+    mstring = nullptr;
   }
 
   // Marshall data.
@@ -274,7 +274,7 @@ REGRESSION_TEST(MessageMarshall)(RegressionTest *t, int /* atype ATS_UNUSED */,
   mdata.ptr = (void *)99;
   mdata.len = 1000;
   CHECK_EQ(mgmt_message_parse(msgbuf, sizeof(msgbuf), dfields, countof(dfields), &mdata), 4);
-  CHECK_VALUE(mdata.ptr, (void *)NULL, "%p");
+  CHECK_VALUE(mdata.ptr, (void *)nullptr, "%p");
   CHECK_VALUE(mdata.len, (size_t)0, "%zu");
 }
 
@@ -284,14 +284,14 @@ REGRESSION_TEST(MessageLength)(RegressionTest *t, int /* atype ATS_UNUSED */, in
 
   MgmtMarshallInt mint       = 0;
   MgmtMarshallLong mlong     = 0;
-  MgmtMarshallString mstring = NULL;
-  MgmtMarshallData mdata     = {NULL, 0};
+  MgmtMarshallString mstring = nullptr;
+  MgmtMarshallData mdata     = {nullptr, 0};
 
   // Check invalid marshall type.
   CHECK_EQ(mgmt_message_length(inval, countof(inval), NULL), -1);
 
   // Check empty types array.
-  CHECK_EQ(mgmt_message_length(NULL, 0), 0);
+  CHECK_EQ(mgmt_message_length(nullptr, 0), 0);
 
   CHECK_EQ(mgmt_message_length(ifields, countof(ifields), &mint, &mlong), 12);
 
@@ -300,14 +300,14 @@ REGRESSION_TEST(MessageLength)(RegressionTest *t, int /* atype ATS_UNUSED */, in
   CHECK_EQ(mgmt_message_length(sfields, countof(sfields), &mstring), sizeof("foo") + 4);
 
   // NULL strings are the same as empty strings ...
-  mstring = NULL;
+  mstring = nullptr;
   CHECK_EQ(mgmt_message_length(sfields, countof(sfields), &mstring), 4 + 1);
   mstring = (char *)"";
   CHECK_EQ(mgmt_message_length(sfields, countof(sfields), &mstring), 4 + 1);
 
   // data fields include a 4-byte length. We don't go looking at the data in this case.
   mdata.len = 99;
-  mdata.ptr = NULL;
+  mdata.ptr = nullptr;
   CHECK_EQ(mgmt_message_length(dfields, countof(dfields), &mdata), 99 + 4);
 
   mstring   = (char *)"all fields";
@@ -315,7 +315,7 @@ REGRESSION_TEST(MessageLength)(RegressionTest *t, int /* atype ATS_UNUSED */, in
   CHECK_EQ(mgmt_message_length(afields, countof(afields), &mdata, &mint, &mlong, &mstring, &mlong, &mlong),
            31 + 4 + 4 + 8 + sizeof("all fields") + 4 + 8 + 8);
 
-  mdata.ptr = NULL;
+  mdata.ptr = nullptr;
   mdata.len = 0;
   CHECK_EQ(mgmt_message_length(dfields, countof(dfields), &mdata), 4);
 }
diff --git a/plugins/authproxy/authproxy.cc b/plugins/authproxy/authproxy.cc
index b93c1c23c2c..ebeb77f6296 100644
--- a/plugins/authproxy/authproxy.cc
+++ b/plugins/authproxy/authproxy.cc
@@ -61,7 +61,7 @@ struct AuthOptions {
   AuthRequestTransform transform;
   bool force;
 
-  AuthOptions() : hostport(-1), transform(NULL), force(false) {}
+  AuthOptions() : hostport(-1), transform(nullptr), force(false) {}
   ~AuthOptions() {}
 };
 
@@ -102,8 +102,8 @@ StateContinue(AuthRequestContext *, void *)
 }
 
 // State table for sending the auth proxy response to the client.
-static const StateTransition StateTableSendResponse[] = {{TS_EVENT_HTTP_SEND_RESPONSE_HDR, StateAuthProxySendResponse, NULL},
-                                                         {TS_EVENT_NONE, NULL, NULL}};
+static const StateTransition StateTableSendResponse[] = {{TS_EVENT_HTTP_SEND_RESPONSE_HDR, StateAuthProxySendResponse, nullptr},
+                                                         {TS_EVENT_NONE, nullptr, nullptr}};
 
 // State table for reading the proxy response body content.
 static const StateTransition StateTableProxyReadContent[] = {
@@ -111,9 +111,9 @@ static const StateTransition StateTableProxyReadContent[] = {
   {TS_EVENT_VCONN_READ_COMPLETE, StateAuthProxyReadContent, StateTableProxyReadContent},
   {TS_EVENT_VCONN_EOS, StateAuthProxyCompleteContent, StateTableProxyReadContent},
   {TS_EVENT_HTTP_SEND_RESPONSE_HDR, StateContinue, StateTableSendResponse},
-  {TS_EVENT_ERROR, StateUnauthorized, NULL},
-  {TS_EVENT_IMMEDIATE, StateAuthorized, NULL},
-  {TS_EVENT_NONE, NULL, NULL}};
+  {TS_EVENT_ERROR, StateUnauthorized, nullptr},
+  {TS_EVENT_IMMEDIATE, StateAuthorized, nullptr},
+  {TS_EVENT_NONE, nullptr, nullptr}};
 
 // State table for reading the auth proxy response header.
 static const StateTransition StateTableProxyReadHeader[] = {
@@ -122,21 +122,21 @@ static const StateTransition StateTableProxyReadHeader[] = {
   {TS_EVENT_HTTP_READ_REQUEST_HDR, StateAuthProxyCompleteHeaders, StateTableProxyReadHeader},
   {TS_EVENT_HTTP_SEND_RESPONSE_HDR, StateContinue, StateTableSendResponse},
   {TS_EVENT_HTTP_CONTINUE, StateAuthProxyReadContent, StateTableProxyReadContent},
-  {TS_EVENT_VCONN_EOS, StateUnauthorized, NULL}, // XXX Should we check headers on EOS?
-  {TS_EVENT_ERROR, StateUnauthorized, NULL},
-  {TS_EVENT_IMMEDIATE, StateAuthorized, NULL},
-  {TS_EVENT_NONE, NULL, NULL}};
+  {TS_EVENT_VCONN_EOS, StateUnauthorized, nullptr}, // XXX Should we check headers on EOS?
+  {TS_EVENT_ERROR, StateUnauthorized, nullptr},
+  {TS_EVENT_IMMEDIATE, StateAuthorized, nullptr},
+  {TS_EVENT_NONE, nullptr, nullptr}};
 
 // State table for sending the request to the auth proxy.
 static const StateTransition StateTableProxyRequest[] = {
   {TS_EVENT_VCONN_WRITE_COMPLETE, StateAuthProxyWriteComplete, StateTableProxyReadHeader},
-  {TS_EVENT_ERROR, StateUnauthorized, NULL},
-  {TS_EVENT_NONE, NULL, NULL}};
+  {TS_EVENT_ERROR, StateUnauthorized, nullptr},
+  {TS_EVENT_NONE, nullptr, nullptr}};
 
 // Initial state table.
 static const StateTransition StateTableInit[] = {{TS_EVENT_HTTP_POST_REMAP, StateAuthProxyConnect, StateTableProxyRequest},
-                                                 {TS_EVENT_ERROR, StateUnauthorized, NULL},
-                                                 {TS_EVENT_NONE, NULL, NULL}};
+                                                 {TS_EVENT_ERROR, StateUnauthorized, nullptr},
+                                                 {TS_EVENT_NONE, nullptr, nullptr}};
 
 struct AuthRequestContext {
   TSHttpTxn txn;        // Original client transaction we are authorizing.
@@ -151,15 +151,15 @@ struct AuthRequestContext {
   const StateTransition *state;
 
   AuthRequestContext()
-    : txn(NULL),
-      cont(NULL),
-      vconn(NULL),
+    : txn(nullptr),
+      cont(nullptr),
+      vconn(nullptr),
       hparser(TSHttpParserCreate()),
       rheader(),
       iobuf(TS_IOBUFFER_SIZE_INDEX_4K),
-      method(NULL),
+      method(nullptr),
       read_body(true),
-      state(NULL)
+      state(nullptr)
   {
     this->cont = TSContCreate(dispatch, TSMutexCreate());
     TSContDataSet(this->cont, this);
@@ -167,7 +167,7 @@ struct AuthRequestContext {
 
   ~AuthRequestContext()
   {
-    TSContDataSet(this->cont, NULL);
+    TSContDataSet(this->cont, nullptr);
     TSContDestroy(this->cont);
     TSHttpParserDestroy(this->hparser);
     if (this->vconn) {
@@ -219,8 +219,8 @@ AuthRequestContext::dispatch(TSCont cont, TSEvent event, void *edata)
   }
 
   // If we don't have a handler, the state machine is borked.
-  TSReleaseAssert(s != NULL);
-  TSReleaseAssert(s->handler != NULL);
+  TSReleaseAssert(s != nullptr);
+  TSReleaseAssert(s->handler != nullptr);
 
   // Move to the next state. We have to set this *before* invoking the
   // handler because the handler itself can invoke the next handler.
@@ -234,7 +234,7 @@ AuthRequestContext::dispatch(TSCont cont, TSEvent event, void *edata)
     return TS_EVENT_NONE;
   }
   // If there are no more states, the state machine has terminated.
-  if (auth->state == NULL) {
+  if (auth->state == nullptr) {
     AuthRequestContext::destroy(auth);
     return TS_EVENT_NONE;
   }
@@ -270,7 +270,7 @@ AuthChainAuthorizationResponse(AuthRequestContext *auth)
 {
   if (auth->vconn) {
     TSVConnClose(auth->vconn);
-    auth->vconn = NULL;
+    auth->vconn = nullptr;
   }
 
   TSHttpTxnHookAdd(auth->txn, TS_HTTP_SEND_RESPONSE_HDR_HOOK, auth->cont);
@@ -408,7 +408,7 @@ StateAuthProxyConnect(AuthRequestContext *auth, void * /* edata ATS_UNUSED */)
   AuthLogDebug("client request %s a HEAD request", auth->method == TS_HTTP_METHOD_HEAD ? "is" : "is not");
 
   auth->vconn = TSHttpConnect(ip);
-  if (auth->vconn == NULL) {
+  if (auth->vconn == nullptr) {
     return TS_EVENT_ERROR;
   }
   // Transform the client request into an auth proxy request and write it
@@ -512,7 +512,7 @@ StateAuthProxyReadHeaders(AuthRequestContext *auth, void * /* edata ATS_UNUSED *
     TSParseResult result;
 
     ptr = TSIOBufferBlockReadStart(blk, auth->iobuf.reader, &nbytes);
-    if (ptr == NULL || nbytes == 0) {
+    if (ptr == nullptr || nbytes == 0) {
       continue;
     }
 
@@ -632,7 +632,7 @@ StateAuthorized(AuthRequestContext *auth, void *)
 static bool
 AuthRequestIsTagged(TSHttpTxn txn)
 {
-  return AuthTaggedRequestArg != -1 && TSHttpTxnArgGet(txn, AuthTaggedRequestArg) != NULL;
+  return AuthTaggedRequestArg != -1 && TSHttpTxnArgGet(txn, AuthTaggedRequestArg) != nullptr;
 }
 
 static int
@@ -662,7 +662,7 @@ AuthProxyGlobalHook(TSCont /* cont ATS_UNUSED */, TSEvent event, void *edata)
     }
     // Hook this request if we are in global authorization mode or if a
     // remap rule tagged it.
-    if (AuthGlobalOptions != NULL || AuthRequestIsTagged(txn)) {
+    if (AuthGlobalOptions != nullptr || AuthRequestIsTagged(txn)) {
       auth        = AuthRequestContext::allocate();
       auth->state = StateTableInit;
       auth->txn   = txn;
@@ -682,11 +682,11 @@ AuthParseOptions(int argc, const char **argv)
   // on some platforms (e.g. Solaris / Illumos). On sane platforms (e.g. linux), it'll get
   // automatically casted back to the const char*, as the struct is defined in .
   static const struct option longopt[] = {
-    {const_cast("auth-host"), required_argument, 0, 'h'},
-    {const_cast("auth-port"), required_argument, 0, 'p'},
-    {const_cast("auth-transform"), required_argument, 0, 't'},
-    {const_cast("force-cacheability"), no_argument, 0, 'c'},
-    {0, 0, 0, 0},
+    {const_cast("auth-host"), required_argument, nullptr, 'h'},
+    {const_cast("auth-port"), required_argument, nullptr, 'p'},
+    {const_cast("auth-transform"), required_argument, nullptr, 't'},
+    {const_cast("force-cacheability"), no_argument, nullptr, 'c'},
+    {nullptr, 0, nullptr, 0},
   };
 
   AuthOptions *options = AuthNew();
@@ -696,7 +696,7 @@ AuthParseOptions(int argc, const char **argv)
   for (;;) {
     int opt;
 
-    opt = getopt_long(argc, (char *const *)argv, "", longopt, NULL);
+    opt = getopt_long(argc, (char *const *)argv, "", longopt, nullptr);
     switch (opt) {
     case 'h':
       options->hostname = optarg;
@@ -750,7 +750,7 @@ TSPluginInit(int argc, const char *argv[])
 
   TSReleaseAssert(TSHttpArgIndexReserve("AuthProxy", "AuthProxy authorization tag", &AuthTaggedRequestArg) == TS_SUCCESS);
 
-  AuthOsDnsContinuation = TSContCreate(AuthProxyGlobalHook, NULL);
+  AuthOsDnsContinuation = TSContCreate(AuthProxyGlobalHook, nullptr);
   AuthGlobalOptions     = AuthParseOptions(argc, argv);
   AuthLogDebug("using authorization proxy at %s:%d", AuthGlobalOptions->hostname.c_str(), AuthGlobalOptions->hostport);
 
@@ -763,7 +763,7 @@ TSRemapInit(TSRemapInterface * /* api ATS_UNUSED */, char * /* err ATS_UNUSED */
 {
   TSReleaseAssert(TSHttpArgIndexReserve("AuthProxy", "AuthProxy authorization tag", &AuthTaggedRequestArg) == TS_SUCCESS);
 
-  AuthOsDnsContinuation = TSContCreate(AuthProxyGlobalHook, NULL);
+  AuthOsDnsContinuation = TSContCreate(AuthProxyGlobalHook, nullptr);
   return TS_SUCCESS;
 }
 
diff --git a/plugins/background_fetch/background_fetch.cc b/plugins/background_fetch/background_fetch.cc
index 937c84fa5a9..c80c79cb865 100644
--- a/plugins/background_fetch/background_fetch.cc
+++ b/plugins/background_fetch/background_fetch.cc
@@ -106,7 +106,7 @@ class BgFetchState
   }
 
 private:
-  BgFetchState() : _log(NULL), _lock(TSMutexCreate()) {}
+  BgFetchState() : _log(nullptr), _lock(TSMutexCreate()) {}
   BgFetchState(BgFetchState const &);   // Don't Implement
   void operator=(BgFetchState const &); // Don't implement
 
@@ -123,15 +123,15 @@ struct BgFetchData {
   BgFetchData()
     : hdr_loc(TS_NULL_MLOC),
       url_loc(TS_NULL_MLOC),
-      vc(NULL),
-      req_io_buf(NULL),
-      resp_io_buf(NULL),
-      req_io_buf_reader(NULL),
-      resp_io_buf_reader(NULL),
-      r_vio(NULL),
-      w_vio(NULL),
+      vc(nullptr),
+      req_io_buf(nullptr),
+      resp_io_buf(nullptr),
+      req_io_buf_reader(nullptr),
+      resp_io_buf_reader(nullptr),
+      r_vio(nullptr),
+      w_vio(nullptr),
       _bytes(0),
-      _cont(NULL)
+      _cont(nullptr)
   {
     mbuf = TSMBufferCreate();
     memset(&client_ip, 0, sizeof(client_ip));
@@ -147,7 +147,7 @@ struct BgFetchData {
     if (vc) {
       TSError("[%s] Destroyed BgFetchDATA while VC was alive", PLUGIN_NAME);
       TSVConnClose(vc);
-      vc = NULL;
+      vc = nullptr;
     }
 
     // If we got schedule, also clean that up
@@ -155,7 +155,7 @@ struct BgFetchData {
       releaseUrl();
 
       TSContDestroy(_cont);
-      _cont = NULL;
+      _cont = nullptr;
       TSIOBufferReaderFree(req_io_buf_reader);
       TSIOBufferDestroy(req_io_buf);
       TSIOBufferReaderFree(resp_io_buf_reader);
@@ -247,7 +247,7 @@ BgFetchData::initialize(TSMBuffer request, TSMLoc req_hdr, TSHttpTxn txnp)
       if (TS_SUCCESS == TSUrlClone(mbuf, request, p_url, &url_loc)) {
         TSMLoc c_url = TS_NULL_MLOC;
         int len;
-        char *url = NULL;
+        char *url = nullptr;
 
         // Get the cache key URL (for now), since this has better lookup behavior when using
         // e.g. the cachekey plugin.
@@ -293,7 +293,7 @@ static int cont_bg_fetch(TSCont contp, TSEvent event, void *edata);
 void
 BgFetchData::schedule()
 {
-  TSAssert(NULL == _cont);
+  TSAssert(nullptr == _cont);
 
   // Setup the continuation
   _cont = TSContCreate(cont_bg_fetch, TSMutexCreate());
@@ -381,8 +381,8 @@ cont_bg_fetch(TSCont contp, TSEvent event, void * /* edata ATS_UNUSED */)
     }
 
     // Setup the NetVC for background fetch
-    TSAssert(NULL == data->vc);
-    if ((data->vc = TSHttpConnect((sockaddr *)&data->client_ip)) != NULL) {
+    TSAssert(nullptr == data->vc);
+    if ((data->vc = TSHttpConnect((sockaddr *)&data->client_ip)) != nullptr) {
       TSHttpHdrPrint(data->mbuf, data->hdr_loc, data->req_io_buf);
       // We never send a body with the request. ToDo: Do we ever need to support that ?
       TSIOBufferWrite(data->req_io_buf, "\r\n", 2);
@@ -428,7 +428,7 @@ cont_bg_fetch(TSCont contp, TSEvent event, void * /* edata ATS_UNUSED */)
     data->log(event);
 
     // Close, release and cleanup
-    data->vc = NULL;
+    data->vc = nullptr;
     delete data;
     break;
 
@@ -457,7 +457,7 @@ cont_check_cacheable(TSCont contp, TSEvent /* event ATS_UNUSED */, void *edata)
     if (TS_SUCCESS == TSHttpTxnClientReqGet(txnp, &request, &req_hdr)) {
       // Temporarily change the response status to 200 OK, so we can reevaluate cacheability.
       TSHttpHdrStatusSet(response, resp_hdr, TS_HTTP_STATUS_OK);
-      bool cacheable = TSHttpTxnIsCacheable(txnp, NULL, response);
+      bool cacheable = TSHttpTxnIsCacheable(txnp, nullptr, response);
       TSHttpHdrStatusSet(response, resp_hdr, TS_HTTP_STATUS_PARTIAL_CONTENT);
 
       TSDebug(PLUGIN_NAME, "Testing: request / response is cacheable?");
@@ -503,7 +503,7 @@ cont_handle_response(TSCont contp, TSEvent event, void *edata)
   TSHttpTxn txnp        = static_cast(edata);
   BgFetchConfig *config = static_cast(TSContDataGet(contp));
 
-  if (NULL == config) {
+  if (nullptr == config) {
     // something seriously wrong..
     TSError("[%s] Can't get configurations", PLUGIN_NAME);
   } else {
@@ -521,7 +521,7 @@ cont_handle_response(TSCont contp, TSEvent event, void *edata)
           TSDebug(PLUGIN_NAME, "Testing: response is 206?");
           if (TS_HTTP_STATUS_PARTIAL_CONTENT == TSHttpHdrStatusGet(response, resp_hdr)) {
             // Everything looks good so far, add a TXN hook for SEND_RESPONSE_HDR
-            TSCont contp = TSContCreate(cont_check_cacheable, NULL);
+            TSCont contp = TSContCreate(cont_check_cacheable, nullptr);
 
             TSHttpTxnHookAdd(txnp, TS_HTTP_SEND_RESPONSE_HDR_HOOK, contp);
           }
@@ -551,9 +551,9 @@ void
 TSPluginInit(int argc, const char *argv[])
 {
   TSPluginRegistrationInfo info;
-  static const struct option longopt[] = {{const_cast("log"), required_argument, NULL, 'l'},
-                                          {const_cast("config"), required_argument, NULL, 'c'},
-                                          {NULL, no_argument, NULL, '\0'}};
+  static const struct option longopt[] = {{const_cast("log"), required_argument, nullptr, 'l'},
+                                          {const_cast("config"), required_argument, nullptr, 'c'},
+                                          {nullptr, no_argument, nullptr, '\0'}};
 
   info.plugin_name   = (char *)PLUGIN_NAME;
   info.vendor_name   = (char *)"Apache Software Foundation";
@@ -563,13 +563,13 @@ TSPluginInit(int argc, const char *argv[])
     TSError("[%s] Plugin registration failed.", PLUGIN_NAME);
   }
 
-  TSCont cont = TSContCreate(cont_handle_response, NULL);
+  TSCont cont = TSContCreate(cont_handle_response, nullptr);
 
   gConfig = new BgFetchConfig(cont);
   gConfig->acquire(); // Inc refcount, although this global config should never go out of scope
 
   while (true) {
-    int opt = getopt_long(argc, (char *const *)argv, "lc", longopt, NULL);
+    int opt = getopt_long(argc, (char *const *)argv, "lc", longopt, nullptr);
 
     switch (opt) {
     case 'l':
@@ -620,7 +620,7 @@ TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size)
 TSReturnCode
 TSRemapNewInstance(int argc, char *argv[], void **ih, char * /* errbuf */, int /* errbuf_size */)
 {
-  TSCont cont           = TSContCreate(cont_handle_response, NULL);
+  TSCont cont           = TSContCreate(cont_handle_response, nullptr);
   BgFetchConfig *config = new BgFetchConfig(cont);
 
   config->acquire(); // Inc refcount
@@ -650,7 +650,7 @@ TSRemapDeleteInstance(void *ih)
 TSRemapStatus
 TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo * /* rri */)
 {
-  if (NULL == ih) {
+  if (nullptr == ih) {
     return TSREMAP_NO_REMAP;
   }
 
diff --git a/plugins/background_fetch/configs.cc b/plugins/background_fetch/configs.cc
index 7b3fda6f57d..f6aaf11ceb2 100644
--- a/plugins/background_fetch/configs.cc
+++ b/plugins/background_fetch/configs.cc
@@ -31,7 +31,7 @@ BgFetchConfig::readConfig(const char *config_file)
   char file_path[4096];
   TSFile file;
 
-  if (NULL == config_file) {
+  if (nullptr == config_file) {
     TSError("[%s] invalid config file", PLUGIN_NAME);
     return false;
   }
@@ -39,25 +39,25 @@ BgFetchConfig::readConfig(const char *config_file)
   TSDebug(PLUGIN_NAME, "trying to open config file in this path: %s", config_file);
 
   file = TSfopen(config_file, "r");
-  if (NULL == file) {
+  if (nullptr == file) {
     TSDebug(PLUGIN_NAME, "Failed to open config file %s, trying rel path", config_file);
     snprintf(file_path, sizeof(file_path), "%s/%s", TSInstallDirGet(), config_file);
     file = TSfopen(file_path, "r");
-    if (NULL == file) {
+    if (nullptr == file) {
       TSError("[%s] invalid config file", PLUGIN_NAME);
       return false;
     }
   }
 
-  BgFetchRule *cur = NULL;
+  BgFetchRule *cur = nullptr;
   char buffer[8192];
 
   memset(buffer, 0, sizeof(buffer));
-  while (TSfgets(file, buffer, sizeof(buffer) - 1) != NULL) {
-    char *eol = 0;
+  while (TSfgets(file, buffer, sizeof(buffer) - 1) != nullptr) {
+    char *eol = nullptr;
 
     // make sure line was not bigger than buffer
-    if (NULL == (eol = strchr(buffer, '\n')) && NULL == (eol = strstr(buffer, "\r\n"))) {
+    if (nullptr == (eol = strchr(buffer, '\n')) && nullptr == (eol = strstr(buffer, "\r\n"))) {
       TSError("[%s] exclusion line too long, did not get a good line in cfg, skipping, line: %s", PLUGIN_NAME, buffer);
       memset(buffer, 0, sizeof(buffer));
       continue;
@@ -68,14 +68,14 @@ BgFetchConfig::readConfig(const char *config_file)
       continue;
     }
 
-    char *savePtr = NULL;
+    char *savePtr = nullptr;
     char *cfg     = strtok_r(buffer, "\n\r\n", &savePtr);
 
-    if (NULL != cfg) {
+    if (nullptr != cfg) {
       TSDebug(PLUGIN_NAME, "setting background_fetch exclusion criterion based on string: %s", cfg);
       char *cfg_type  = strtok_r(buffer, " ", &savePtr);
-      char *cfg_name  = NULL;
-      char *cfg_value = NULL;
+      char *cfg_name  = nullptr;
+      char *cfg_value = nullptr;
       bool exclude    = false;
 
       if (cfg_type) {
@@ -86,9 +86,9 @@ BgFetchConfig::readConfig(const char *config_file)
           memset(buffer, 0, sizeof(buffer));
           continue;
         }
-        cfg_name = strtok_r(NULL, " ", &savePtr);
+        cfg_name = strtok_r(nullptr, " ", &savePtr);
         if (cfg_name) {
-          cfg_value = strtok_r(NULL, " ", &savePtr);
+          cfg_value = strtok_r(nullptr, " ", &savePtr);
           if (cfg_value) {
             if (!strcmp(cfg_name, "Content-Length")) {
               if ((cfg_value[0] != '<') && (cfg_value[0] != '>')) {
@@ -99,7 +99,7 @@ BgFetchConfig::readConfig(const char *config_file)
             }
             BgFetchRule *r = new BgFetchRule(exclude, cfg_name, cfg_value);
 
-            if (NULL == cur) {
+            if (nullptr == cur) {
               _rules = r;
             } else {
               cur->chain(r);
diff --git a/plugins/background_fetch/headers.cc b/plugins/background_fetch/headers.cc
index 01ed9073ba1..1d99017f30d 100644
--- a/plugins/background_fetch/headers.cc
+++ b/plugins/background_fetch/headers.cc
@@ -71,7 +71,7 @@ set_header(TSMBuffer bufp, TSMLoc hdr_loc, const char *header, int len, const ch
       TSHandleMLocRelease(bufp, hdr_loc, field_loc);
     }
   } else {
-    TSMLoc tmp = NULL;
+    TSMLoc tmp = nullptr;
     bool first = true;
 
     while (field_loc) {
diff --git a/plugins/background_fetch/rules.cc b/plugins/background_fetch/rules.cc
index 9c5865dd148..8fcac32bf75 100644
--- a/plugins/background_fetch/rules.cc
+++ b/plugins/background_fetch/rules.cc
@@ -131,7 +131,7 @@ check_field_configured(TSHttpTxn txnp, const char *field_name, const char *cfg_v
           TSDebug(PLUGIN_NAME, "invalid field");
         } else {
           TSDebug(PLUGIN_NAME, "comparing with %s", cfg_val);
-          if (NULL != strstr(val_str, cfg_val)) {
+          if (nullptr != strstr(val_str, cfg_val)) {
             hdr_found = true;
           }
         }
@@ -163,7 +163,7 @@ BgFetchRule::bgFetchAllowed(TSHttpTxn txnp) const
   bool allow_bg_fetch = true;
 
   // We could do this recursively, but following the linked list is probably more efficient.
-  for (const BgFetchRule *r = this; NULL != r; r = r->_next) {
+  for (const BgFetchRule *r = this; nullptr != r; r = r->_next) {
     if (check_field_configured(txnp, r->_field, r->_value)) {
       TSDebug(PLUGIN_NAME, "found field match %s, exclude %d", r->_field, (int)r->_exclude);
       allow_bg_fetch = !r->_exclude;
diff --git a/plugins/conf_remap/conf_remap.cc b/plugins/conf_remap/conf_remap.cc
index ded375acb47..a2d0dbafea5 100644
--- a/plugins/conf_remap/conf_remap.cc
+++ b/plugins/conf_remap/conf_remap.cc
@@ -81,7 +81,7 @@ RemapConfigs::parse_inline(const char *arg)
 
   // Each token should be a status code then a URL, separated by '='.
   sep = strchr(arg, '=');
-  if (sep == NULL) {
+  if (sep == nullptr) {
     return false;
   }
 
@@ -95,11 +95,11 @@ RemapConfigs::parse_inline(const char *arg)
 
   switch (type) {
   case TS_RECORDDATATYPE_INT:
-    _items[_current]._data.rec_int = strtoll(value.c_str(), NULL, 10);
+    _items[_current]._data.rec_int = strtoll(value.c_str(), nullptr, 10);
     break;
   case TS_RECORDDATATYPE_STRING:
     if (strcmp(value.c_str(), "NULL") == 0) {
-      _items[_current]._data.rec_string = NULL;
+      _items[_current]._data.rec_string = nullptr;
       _items[_current]._data_len        = 0;
     } else {
       _items[_current]._data.rec_string = TSstrdup(value.c_str());
@@ -143,14 +143,14 @@ RemapConfigs::parse_file(const char *filename)
     path += filename;
   }
 
-  if (NULL == (file = TSfopen(path.c_str(), "r"))) {
+  if (nullptr == (file = TSfopen(path.c_str(), "r"))) {
     TSError("[%s] Could not open config file %s", PLUGIN_NAME, path.c_str());
     return false;
   }
 
   TSDebug(PLUGIN_NAME, "loading configuration file %s", path.c_str());
 
-  while (NULL != TSfgets(file, buf, sizeof(buf))) {
+  while (nullptr != TSfgets(file, buf, sizeof(buf))) {
     char *ln, *tok;
     char *s = buf;
 
@@ -171,14 +171,14 @@ RemapConfigs::parse_file(const char *filename)
     }
 
     // Find the configuration name
-    tok = strtok_r(NULL, " \t", &ln);
+    tok = strtok_r(nullptr, " \t", &ln);
     if (TSHttpTxnConfigFind(tok, -1, &name, &expected_type) != TS_SUCCESS) {
       TSError("[%s] File %s, line %d: no records.config name given", PLUGIN_NAME, path.c_str(), line_num);
       continue;
     }
 
     // Find the type (INT or STRING only)
-    tok = strtok_r(NULL, " \t", &ln);
+    tok = strtok_r(nullptr, " \t", &ln);
     if (TS_RECORDDATATYPE_NULL == (type = str_to_datatype(tok))) {
       TSError("[%s] file %s, line %d: only INT and STRING types supported", PLUGIN_NAME, path.c_str(), line_num);
       continue;
@@ -195,7 +195,7 @@ RemapConfigs::parse_file(const char *filename)
         ++ln;
       }
       if ('\0' == *ln) {
-        tok = NULL;
+        tok = nullptr;
       } else {
         tok = ln;
         while (*ln != '\0') {
@@ -209,7 +209,7 @@ RemapConfigs::parse_file(const char *filename)
         *ln = '\0';
       }
     } else {
-      tok = NULL;
+      tok = nullptr;
     }
     if (!tok) {
       TSError("[%s] file %s, line %d: the configuration must provide a value", PLUGIN_NAME, path.c_str(), line_num);
@@ -219,11 +219,11 @@ RemapConfigs::parse_file(const char *filename)
     // Now store the new config
     switch (type) {
     case TS_RECORDDATATYPE_INT:
-      _items[_current]._data.rec_int = strtoll(tok, NULL, 10);
+      _items[_current]._data.rec_int = strtoll(tok, nullptr, 10);
       break;
     case TS_RECORDDATATYPE_STRING:
       if (strcmp(tok, "NULL") == 0) {
-        _items[_current]._data.rec_string = NULL;
+        _items[_current]._data.rec_string = nullptr;
         _items[_current]._data_len        = 0;
       } else {
         _items[_current]._data.rec_string = TSstrdup(tok);
@@ -274,7 +274,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char * /* errbuf ATS_UNUSE
 
   RemapConfigs *conf = new (RemapConfigs);
   for (int i = 2; i < argc; ++i) {
-    if (strchr(argv[i], '=') != NULL) {
+    if (strchr(argv[i], '=') != nullptr) {
       // Parse as an inline key=value pair ...
       if (!conf->parse_inline(argv[i])) {
         goto fail;
@@ -315,7 +315,7 @@ TSRemapDeleteInstance(void *ih)
 TSRemapStatus
 TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo * /* rri ATS_UNUSED */)
 {
-  if (NULL != ih) {
+  if (nullptr != ih) {
     RemapConfigs *conf = static_cast(ih);
     TSHttpTxn txnp     = static_cast(rh);
 
diff --git a/plugins/esi/combo_handler.cc b/plugins/esi/combo_handler.cc
index 3636df13268..7ffa3611968 100644
--- a/plugins/esi/combo_handler.cc
+++ b/plugins/esi/combo_handler.cc
@@ -74,7 +74,7 @@ struct ClientRequest {
   StringList file_urls;
   bool gzip_accepted;
   string defaultBucket; // default Bucket will be set to HOST header
-  ClientRequest() : status(TS_HTTP_STATUS_OK), client_addr(NULL), gzip_accepted(false), defaultBucket("l"){};
+  ClientRequest() : status(TS_HTTP_STATUS_OK), client_addr(nullptr), gzip_accepted(false), defaultBucket("l"){};
 };
 
 struct InterceptData {
@@ -86,7 +86,7 @@ struct InterceptData {
     TSIOBuffer buffer;
     TSIOBufferReader reader;
 
-    IoHandle() : vio(0), buffer(0), reader(0){};
+    IoHandle() : vio(nullptr), buffer(nullptr), reader(nullptr){};
 
     ~IoHandle()
     {
@@ -115,15 +115,15 @@ struct InterceptData {
   string gzipped_data;
 
   InterceptData(TSCont cont)
-    : net_vc(0),
+    : net_vc(nullptr),
       contp(cont),
       input(),
       output(),
-      req_hdr_bufp(0),
-      req_hdr_loc(0),
+      req_hdr_bufp(nullptr),
+      req_hdr_loc(nullptr),
       req_hdr_parsed(false),
       initialized(false),
-      fetcher(0),
+      fetcher(nullptr),
       read_complete(false),
       write_complete(false)
   {
@@ -164,7 +164,7 @@ InterceptData::init(TSVConn vconn)
 void
 InterceptData::setupWrite()
 {
-  TSAssert(output.buffer == 0);
+  TSAssert(output.buffer == nullptr);
   output.buffer = TSIOBufferCreate();
   output.reader = TSIOBufferReaderAlloc(output.buffer);
   output.vio    = TSVConnWrite(net_vc, contp, output.reader, INT64_MAX);
@@ -243,9 +243,9 @@ TSPluginInit(int argc, const char *argv[])
     LOG_DEBUG("WhiteList: %s", HEADER_WHITELIST[i].c_str());
   }
 
-  TSReleaseAssert(pthread_key_create(&threadKey, NULL) == 0);
+  TSReleaseAssert(pthread_key_create(&threadKey, nullptr) == 0);
 
-  TSCont rrh_contp = TSContCreate(handleReadRequestHeader, NULL);
+  TSCont rrh_contp = TSContCreate(handleReadRequestHeader, nullptr);
   if (!rrh_contp) {
     LOG_ERROR("Could not create read request header continuation");
     return;
@@ -440,9 +440,9 @@ parseQueryParameters(const char *query, int query_len, ClientRequest &creq)
   int colon_pos       = -1;
   string file_url("http://localhost/");
   size_t file_base_url_size      = file_url.size();
-  const char *common_prefix      = 0;
+  const char *common_prefix      = nullptr;
   int common_prefix_size         = 0;
-  const char *common_prefix_path = 0;
+  const char *common_prefix_path = nullptr;
   int common_prefix_path_size    = 0;
 
   for (int i = 0; i <= query_len; ++i) {
@@ -686,7 +686,7 @@ readInterceptRequest(InterceptData &int_data)
     int64_t data_len;
     const char *data;
     TSIOBufferBlock block = TSIOBufferReaderStart(int_data.input.reader);
-    while (block != NULL) {
+    while (block != nullptr) {
       data               = TSIOBufferBlockReadStart(block, int_data.input.reader, &data_len);
       const char *endptr = data + data_len;
       if (TSHttpHdrParseReq(int_data.http_parser, int_data.req_hdr_bufp, int_data.req_hdr_loc, &data, endptr) == TS_PARSE_DONE) {
@@ -1048,7 +1048,7 @@ TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size)
 TSReturnCode
 TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_size)
 {
-  *ih = NULL;
+  *ih = nullptr;
 
   TSDebug(DEBUG_TAG, "%s Remap Instance for '%s' created", DEBUG_TAG, argv[0]);
   return TS_SUCCESS;
diff --git a/plugins/esi/esi.cc b/plugins/esi/esi.cc
index e1529003f53..e4cf93bb2e4 100644
--- a/plugins/esi/esi.cc
+++ b/plugins/esi/esi.cc
@@ -60,7 +60,7 @@ struct OptionInfo {
   bool first_byte_flush;
 };
 
-static HandlerManager *gHandlerManager = NULL;
+static HandlerManager *gHandlerManager = nullptr;
 static Utils::HeaderValueList gWhitelistCookies;
 
 #define DEBUG_TAG "plugin_esi"
@@ -127,18 +127,18 @@ struct ContData {
 
   ContData(TSCont contptr, TSHttpTxn tx)
     : curr_state(READING_ESI_DOC),
-      input_vio(NULL),
-      output_vio(NULL),
-      output_buffer(NULL),
-      output_reader(NULL),
-      esi_vars(NULL),
-      data_fetcher(NULL),
-      esi_proc(NULL),
-      esi_gzip(NULL),
-      esi_gunzip(NULL),
+      input_vio(nullptr),
+      output_vio(nullptr),
+      output_buffer(nullptr),
+      output_reader(nullptr),
+      esi_vars(nullptr),
+      data_fetcher(nullptr),
+      esi_proc(nullptr),
+      esi_gzip(nullptr),
+      esi_gunzip(nullptr),
       contp(contptr),
       txnp(tx),
-      request_url(NULL),
+      request_url(nullptr),
       input_type(DATA_TYPE_RAW_ESI),
       packed_node_list(""),
       gzipped_data(""),
@@ -192,7 +192,7 @@ createDebugTag(const char *prefix, TSCont contp, string &dest)
   return dest.c_str();
 }
 
-static bool checkHeaderValue(TSMBuffer bufp, TSMLoc hdr_loc, const char *name, int name_len, const char *exp_value = 0,
+static bool checkHeaderValue(TSMBuffer bufp, TSMLoc hdr_loc, const char *name, int name_len, const char *exp_value = nullptr,
                              int exp_value_len = 0, bool prefix = false); // forward decl
 
 static bool checkForCacheHeader(const char *name, int name_len, const char *value, int value_len, bool &cacheable);
@@ -328,12 +328,12 @@ ContData::getClientState()
         int n_values;
         n_values = TSMimeHdrFieldValuesCount(req_bufp, req_hdr_loc, field_loc);
         if (n_values && (n_values != TS_ERROR)) {
-          const char *value = NULL;
+          const char *value = nullptr;
           int value_len     = 0;
           if (n_values == 1) {
             value = TSMimeHdrFieldValueStringGet(req_bufp, req_hdr_loc, field_loc, 0, &value_len);
 
-            if (NULL != value || value_len) {
+            if (nullptr != value || value_len) {
               if (Utils::areEqual(name, name_len, TS_MIME_FIELD_ACCEPT_ENCODING, TS_MIME_LEN_ACCEPT_ENCODING) &&
                   Utils::areEqual(value, value_len, TS_HTTP_VALUE_GZIP, TS_HTTP_LEN_GZIP)) {
                 gzip_output = true;
@@ -342,7 +342,7 @@ ContData::getClientState()
           } else {
             for (int i = 0; i < n_values; ++i) {
               value = TSMimeHdrFieldValueStringGet(req_bufp, req_hdr_loc, field_loc, i, &value_len);
-              if (NULL != value || value_len) {
+              if (nullptr != value || value_len) {
                 if (Utils::areEqual(name, name_len, TS_MIME_FIELD_ACCEPT_ENCODING, TS_MIME_LEN_ACCEPT_ENCODING) &&
                     Utils::areEqual(value, value_len, TS_HTTP_VALUE_GZIP, TS_HTTP_LEN_GZIP)) {
                   gzip_output = true;
@@ -353,7 +353,7 @@ ContData::getClientState()
             value = TSMimeHdrFieldValueStringGet(req_bufp, req_hdr_loc, field_loc, -1, &value_len);
           }
 
-          if (value != NULL) {
+          if (value != nullptr) {
             HttpHeader header(name, name_len, value, value_len);
             data_fetcher->useHeader(header);
             esi_vars->populate(header);
@@ -407,7 +407,7 @@ ContData::fillPostHeader(TSMBuffer bufp, TSMLoc hdr_loc)
         int n_field_values = TSMimeHdrFieldValuesCount(bufp, hdr_loc, field_loc);
         for (int j = 0; j < n_field_values; ++j) {
           value = TSMimeHdrFieldValueStringGet(bufp, hdr_loc, field_loc, j, &value_len);
-          if (NULL == value || !value_len) {
+          if (nullptr == value || !value_len) {
             TSDebug(DEBUG_TAG, "[%s] Error while getting value #%d of header [%.*s]", __FUNCTION__, j, name_len, name);
           } else {
             if (Utils::areEqual(name, name_len, TS_MIME_FIELD_VARY, TS_MIME_LEN_VARY) &&
@@ -523,9 +523,9 @@ removeCacheKey(TSHttpTxn txnp)
 {
   TSMBuffer req_bufp;
   TSMLoc req_hdr_loc;
-  TSMLoc url_loc      = NULL;
-  TSCont contp        = NULL;
-  TSCacheKey cacheKey = NULL;
+  TSMLoc url_loc      = nullptr;
+  TSCont contp        = nullptr;
+  TSCacheKey cacheKey = nullptr;
   bool result         = false;
 
   if (TSHttpTxnClientReqGet(txnp, &req_bufp, &req_hdr_loc) != TS_SUCCESS) {
@@ -539,14 +539,14 @@ removeCacheKey(TSHttpTxn txnp)
       break;
     }
 
-    contp = TSContCreate(removeCacheHandler, NULL);
-    if (contp == NULL) {
+    contp = TSContCreate(removeCacheHandler, nullptr);
+    if (contp == nullptr) {
       TSError("[esi][%s] Could not create continuation", __FUNCTION__);
       break;
     }
 
     cacheKey = TSCacheKeyCreate();
-    if (cacheKey == NULL) {
+    if (cacheKey == nullptr) {
       TSError("[esi][%s] TSCacheKeyCreate fail", __FUNCTION__);
       break;
     }
@@ -561,17 +561,17 @@ removeCacheKey(TSHttpTxn txnp)
     TSError("[esi][%s] TSCacheRemoved", __FUNCTION__);
   } while (0);
 
-  if (cacheKey != NULL) {
+  if (cacheKey != nullptr) {
     TSCacheKeyDestroy(cacheKey);
   }
   if (!result) {
-    if (contp != NULL) {
+    if (contp != nullptr) {
       TSContDestroy(contp);
     }
   }
 
   TSHandleMLocRelease(req_bufp, req_hdr_loc, url_loc);
-  if (req_hdr_loc != NULL) {
+  if (req_hdr_loc != nullptr) {
     TSHandleMLocRelease(req_bufp, TS_NULL_MLOC, req_hdr_loc);
   }
 
@@ -674,7 +674,7 @@ transformData(TSCont contp)
         const char *data;
         TSIOBufferBlock block = TSIOBufferReaderStart(cont_data->input_reader);
         // Now start extraction
-        while (block != NULL) {
+        while (block != nullptr) {
           data = TSIOBufferBlockReadStart(block, cont_data->input_reader, &data_len);
           if (cont_data->input_type == DATA_TYPE_RAW_ESI) {
             cont_data->esi_proc->addParseData(data, data_len);
@@ -867,7 +867,7 @@ transformData(TSCont contp)
             TSError("[esi][%s] Error while finishing gzip", __FUNCTION__);
             return 0;
           } else {
-            if (TSVIOBufferGet(cont_data->output_vio) == NULL) {
+            if (TSVIOBufferGet(cont_data->output_vio) == nullptr) {
               TSError("[esi][%s] Error while writing bytes to downstream VC", __FUNCTION__);
               return 0;
             }
@@ -1036,7 +1036,7 @@ struct RespHdrModData {
 static void
 addMimeHeaderField(TSMBuffer bufp, TSMLoc hdr_loc, const char *name, int name_len, const char *value, int value_len)
 {
-  TSMLoc field_loc = (TSMLoc)NULL;
+  TSMLoc field_loc = (TSMLoc) nullptr;
   TSMimeHdrFieldCreate(bufp, hdr_loc, &field_loc);
   if (!field_loc) {
     TSError("[esi][%s] Error while creating mime field", __FUNCTION__);
@@ -1106,7 +1106,7 @@ modifyResponseHeader(TSCont contp, TSEvent event, void *edata)
           int n_field_values = TSMimeHdrFieldValuesCount(bufp, hdr_loc, field_loc);
           for (int j = 0; j < n_field_values; ++j) {
             value = TSMimeHdrFieldValueStringGet(bufp, hdr_loc, field_loc, j, &value_len);
-            if (NULL == value || !value_len) {
+            if (nullptr == value || !value_len) {
               TSDebug(DEBUG_TAG, "[%s] Error while getting value #%d of header [%.*s]", __FUNCTION__, j, name_len, name);
             } else {
               if (!mod_data->option_info->packed_node_support || mod_data->cache_txn) {
@@ -1176,7 +1176,7 @@ checkHeaderValue(TSMBuffer bufp, TSMLoc hdr_loc, const char *name, int name_len,
     int n_values = TSMimeHdrFieldValuesCount(bufp, hdr_loc, field_loc);
     for (int i = 0; i < n_values; ++i) {
       value = TSMimeHdrFieldValueStringGet(bufp, hdr_loc, field_loc, i, &value_len);
-      if (NULL != value && value_len) {
+      if (nullptr != value && value_len) {
         if (prefix) {
           if ((value_len >= exp_value_len) && (strncasecmp(value, exp_value, exp_value_len) == 0)) {
             retval = true;
@@ -1226,7 +1226,7 @@ maskOsCacheHeaders(TSHttpTxn txnp)
       n_field_values                = TSMimeHdrFieldValuesCount(bufp, hdr_loc, field_loc);
       for (int j = 0; j < n_field_values; ++j) {
         value = TSMimeHdrFieldValueStringGet(bufp, hdr_loc, field_loc, j, &value_len);
-        if (NULL == value || !value_len) {
+        if (nullptr == value || !value_len) {
           TSDebug(DEBUG_TAG, "[%s] Error while getting value #%d of header [%.*s]", __FUNCTION__, j, name_len, name);
         } else {
           is_cache_header = checkForCacheHeader(name, name_len, value, value_len, os_response_cacheable);
@@ -1275,7 +1275,7 @@ isTxnTransformable(TSHttpTxn txnp, bool is_cache_txn, bool *intercept_header, bo
   int method_len;
   const char *method;
   method = TSHttpHdrMethodGet(bufp, hdr_loc, &method_len);
-  if (method == NULL) {
+  if (method == nullptr) {
     TSError("[esi][%s] Couldn't get method", __FUNCTION__);
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     return false;
@@ -1415,7 +1415,7 @@ checkForCacheHeader(const char *name, int name_len, const char *value, int value
 static bool
 addSendResponseHeaderHook(TSHttpTxn txnp, const ContData *src_cont_data)
 {
-  TSCont contp = TSContCreate(modifyResponseHeader, NULL);
+  TSCont contp = TSContCreate(modifyResponseHeader, nullptr);
   if (!contp) {
     TSError("[esi][%s] Could not create continuation", __FUNCTION__);
     return false;
@@ -1434,8 +1434,8 @@ static bool
 addTransform(TSHttpTxn txnp, const bool processing_os_response, const bool intercept_header, const bool head_only,
              const struct OptionInfo *pOptionInfo)
 {
-  TSCont contp        = 0;
-  ContData *cont_data = 0;
+  TSCont contp        = nullptr;
+  ContData *cont_data = nullptr;
 
   contp = TSTransformCreate(transformHandler, txnp);
   if (!contp) {
@@ -1566,9 +1566,9 @@ loadHandlerConf(const char *file_name, Utils::KeyValueMap &handler_conf)
 {
   std::list conf_lines;
   TSFile conf_file = TSfopen(file_name, "r");
-  if (conf_file != NULL) {
+  if (conf_file != nullptr) {
     char buf[1024];
-    while (TSfgets(conf_file, buf, sizeof(buf) - 1) != NULL) {
+    while (TSfgets(conf_file, buf, sizeof(buf) - 1) != nullptr) {
       conf_lines.push_back(string(buf));
     }
     TSfclose(conf_file);
@@ -1582,15 +1582,15 @@ loadHandlerConf(const char *file_name, Utils::KeyValueMap &handler_conf)
 static int
 esiPluginInit(int argc, const char *argv[], struct OptionInfo *pOptionInfo)
 {
-  static TSStatSystem *statSystem = NULL;
+  static TSStatSystem *statSystem = nullptr;
 
-  if (statSystem == NULL) {
+  if (statSystem == nullptr) {
     statSystem = new TSStatSystem();
     Utils::init(&TSDebug, &TSError);
     Stats::init(statSystem);
   }
 
-  if (gHandlerManager == NULL) {
+  if (gHandlerManager == nullptr) {
     gHandlerManager = new HandlerManager(HANDLER_MGR_DEBUG_TAG, &TSDebug, &TSError);
   }
 
@@ -1599,12 +1599,12 @@ esiPluginInit(int argc, const char *argv[], struct OptionInfo *pOptionInfo)
   if (argc > 1) {
     int c;
     static const struct option longopts[] = {
-      {const_cast("packed-node-support"), no_argument, NULL, 'n'},
-      {const_cast("private-response"), no_argument, NULL, 'p'},
-      {const_cast("disable-gzip-output"), no_argument, NULL, 'z'},
-      {const_cast("first-byte-flush"), no_argument, NULL, 'b'},
-      {const_cast("handler-filename"), required_argument, NULL, 'f'},
-      {NULL, 0, NULL, 0},
+      {const_cast("packed-node-support"), no_argument, nullptr, 'n'},
+      {const_cast("private-response"), no_argument, nullptr, 'p'},
+      {const_cast("disable-gzip-output"), no_argument, nullptr, 'z'},
+      {const_cast("first-byte-flush"), no_argument, nullptr, 'b'},
+      {const_cast("handler-filename"), required_argument, nullptr, 'f'},
+      {nullptr, 0, nullptr, 0},
     };
 
     int longindex = 0;
@@ -1638,7 +1638,7 @@ esiPluginInit(int argc, const char *argv[], struct OptionInfo *pOptionInfo)
   bool bKeySet;
   if (threadKey == 0) {
     bKeySet = true;
-    if ((result = pthread_key_create(&threadKey, NULL)) != 0) {
+    if ((result = pthread_key_create(&threadKey, nullptr)) != 0) {
       TSError("[esi][%s] Could not create key", __FUNCTION__);
       TSDebug(DEBUG_TAG, "[%s] Could not create key", __FUNCTION__);
     }
@@ -1671,7 +1671,7 @@ TSPluginInit(int argc, const char *argv[])
   }
 
   struct OptionInfo *pOptionInfo = (struct OptionInfo *)TSmalloc(sizeof(struct OptionInfo));
-  if (pOptionInfo == NULL) {
+  if (pOptionInfo == nullptr) {
     TSError("[esi][%s] malloc %d bytes fail", __FUNCTION__, (int)sizeof(struct OptionInfo));
     return;
   }
@@ -1680,7 +1680,7 @@ TSPluginInit(int argc, const char *argv[])
     return;
   }
 
-  TSCont global_contp = TSContCreate(globalHookHandler, NULL);
+  TSCont global_contp = TSContCreate(globalHookHandler, nullptr);
   if (!global_contp) {
     TSError("[esi][%s] Could not create global continuation", __FUNCTION__);
     TSfree(pOptionInfo);
@@ -1733,10 +1733,10 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_s
   for (int i = 2; i < argc; i++) {
     new_argv[index++] = argv[i];
   }
-  new_argv[index] = NULL;
+  new_argv[index] = nullptr;
 
   struct OptionInfo *pOptionInfo = (struct OptionInfo *)TSmalloc(sizeof(struct OptionInfo));
-  if (pOptionInfo == NULL) {
+  if (pOptionInfo == nullptr) {
     snprintf(errbuf, errbuf_size, "malloc %d bytes fail", (int)sizeof(struct OptionInfo));
     TSError("[esi][%s] malloc %d bytes fail", __FUNCTION__, (int)sizeof(struct OptionInfo));
     return TS_ERROR;
@@ -1746,7 +1746,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_s
     TSfree(pOptionInfo);
     return TS_ERROR;
   }
-  TSCont contp = TSContCreate(globalHookHandler, NULL);
+  TSCont contp = TSContCreate(globalHookHandler, nullptr);
   TSContDataSet(contp, pOptionInfo);
   *ih = static_cast(contp);
 
@@ -1757,7 +1757,7 @@ void
 TSRemapDeleteInstance(void *ih)
 {
   TSCont contp = static_cast(ih);
-  if (contp != NULL) {
+  if (contp != nullptr) {
     TSContDestroy(contp);
   }
 }
@@ -1768,7 +1768,7 @@ TSRemapDeleteInstance(void *ih)
 TSRemapStatus
 TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo * /* rri ATS_UNUSED */)
 {
-  if (NULL != ih) {
+  if (nullptr != ih) {
     TSCont contp = static_cast(ih);
     TSHttpTxnHookAdd(txnp, TS_HTTP_READ_RESPONSE_HDR_HOOK, contp);
     TSHttpTxnHookAdd(txnp, TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK, contp);
diff --git a/plugins/esi/fetcher/HttpDataFetcherImpl.cc b/plugins/esi/fetcher/HttpDataFetcherImpl.cc
index 2b4872a7a7a..337b9a5ed18 100644
--- a/plugins/esi/fetcher/HttpDataFetcherImpl.cc
+++ b/plugins/esi/fetcher/HttpDataFetcherImpl.cc
@@ -39,10 +39,10 @@ HttpDataFetcherImpl::_release(RequestData &req_data)
   if (req_data.bufp) {
     if (req_data.hdr_loc) {
       TSHandleMLocRelease(req_data.bufp, TS_NULL_MLOC, req_data.hdr_loc);
-      req_data.hdr_loc = 0;
+      req_data.hdr_loc = nullptr;
     }
     TSMBufferDestroy(req_data.bufp);
-    req_data.bufp = 0;
+    req_data.bufp = nullptr;
   }
 }
 
@@ -81,7 +81,7 @@ HttpDataFetcherImpl::addFetchRequest(const string &url, FetchedDataProcessor *ca
     http_req = buff;
   } else {
     http_req = (char *)malloc(length + 1);
-    if (http_req == NULL) {
+    if (http_req == nullptr) {
       TSError("[HttpDataFetcherImpl][%s] malloc %d bytes fail", __FUNCTION__, length + 1);
       return false;
     }
@@ -226,7 +226,7 @@ HttpDataFetcherImpl::_checkHeaderValue(TSMBuffer bufp, TSMLoc hdr_loc, const cha
 
     for (int i = 0; i < n_values; ++i) {
       value = TSMimeHdrFieldValueStringGet(bufp, hdr_loc, field_loc, i, &value_len);
-      if (NULL != value && value_len) {
+      if (nullptr != value && value_len) {
         if (prefix) {
           if ((value_len >= exp_value_len) && (strncasecmp(value, exp_value, exp_value_len) == 0)) {
             retval = true;
diff --git a/plugins/esi/lib/DocNode.cc b/plugins/esi/lib/DocNode.cc
index 819c6575a26..6adb1a86d42 100644
--- a/plugins/esi/lib/DocNode.cc
+++ b/plugins/esi/lib/DocNode.cc
@@ -46,7 +46,7 @@ unpackString(const char *&packed_data, const char *&item, int32_t &item_len)
 {
   item_len = *(reinterpret_cast(packed_data));
   packed_data += sizeof(int32_t);
-  item = item_len ? packed_data : 0;
+  item = item_len ? packed_data : nullptr;
   packed_data += item_len;
 }
 
diff --git a/plugins/esi/lib/EsiGunzip.cc b/plugins/esi/lib/EsiGunzip.cc
index 8217e8ac21e..9ab41b81ebc 100644
--- a/plugins/esi/lib/EsiGunzip.cc
+++ b/plugins/esi/lib/EsiGunzip.cc
@@ -59,7 +59,7 @@ EsiGunzip::stream_decode(const char *data, int data_len, std::string &udata)
     _zstrm.zalloc   = Z_NULL;
     _zstrm.zfree    = Z_NULL;
     _zstrm.opaque   = Z_NULL;
-    _zstrm.next_in  = 0;
+    _zstrm.next_in  = nullptr;
     _zstrm.avail_in = 0;
 
     if (inflateInit2(&_zstrm, MAX_WBITS + 16) != Z_OK) {
diff --git a/plugins/esi/lib/EsiProcessor.cc b/plugins/esi/lib/EsiProcessor.cc
index 649b10f26f7..6cae15601f8 100644
--- a/plugins/esi/lib/EsiProcessor.cc
+++ b/plugins/esi/lib/EsiProcessor.cc
@@ -204,7 +204,7 @@ EsiProcessor::_getIncludeData(const DocNode &node, const char **content_ptr /* =
 
     if (url.value_len == 0) { // allow empty url
       if (content_ptr && content_len_ptr) {
-        *content_ptr     = NULL;
+        *content_ptr     = nullptr;
         *content_len_ptr = 0;
         return true;
       } else {
@@ -754,7 +754,7 @@ EsiProcessor::_preprocess(DocNodeList &node_list, int &n_prescanned_nodes)
       bool fetch = true;
       FailureData *threadData;
       /* FAILURE CACHE */
-      if ((threadData = static_cast(pthread_getspecific(threadKey))) == NULL) {
+      if ((threadData = static_cast(pthread_getspecific(threadKey))) == nullptr) {
         threadData = new FailureData();
         if (pthread_setspecific(threadKey, threadData)) {
           _errorLog("[%s] Unable to set the key", __FUNCTION__);
diff --git a/plugins/esi/lib/FailureInfo.cc b/plugins/esi/lib/FailureInfo.cc
index cfe6a199962..6249637ab81 100644
--- a/plugins/esi/lib/FailureInfo.cc
+++ b/plugins/esi/lib/FailureInfo.cc
@@ -31,7 +31,7 @@ void
 FailureInfo::registerSuccFail(bool isSuccess)
 {
   struct timeval currTime, result;
-  gettimeofday(&currTime, NULL);
+  gettimeofday(&currTime, nullptr);
   timersub(&currTime, &_start, &result);
 
   if ((result.tv_sec * 1000000 + result.tv_usec) > (WINDOW_SIZE * 1000)) {
@@ -50,7 +50,7 @@ FailureInfo::registerSuccFail(bool isSuccess)
       _debugLog(_debug_tag, "[%s] current average over window is %lf", __FUNCTION__, _avgOverWindow);
     }
 
-    gettimeofday(&_start, NULL);
+    gettimeofday(&_start, nullptr);
   }
 
   if (isSuccess) {
diff --git a/plugins/esi/lib/HandlerManager.cc b/plugins/esi/lib/HandlerManager.cc
index 219a93f2416..e23cafc90e8 100644
--- a/plugins/esi/lib/HandlerManager.cc
+++ b/plugins/esi/lib/HandlerManager.cc
@@ -74,7 +74,7 @@ HandlerManager::getHandler(Variables &esi_vars, Expression &esi_expr, HttpDataFe
   FunctionHandleMap::const_iterator iter = _id_to_function_map.find(id);
   if (iter == _id_to_function_map.end()) {
     _errorLog("[%s::%s] handler id [%s] does not map to any loaded object", CLASS_NAME, __FUNCTION__, id.c_str());
-    return 0;
+    return nullptr;
   }
   return (*(iter->second))(esi_vars, esi_expr, fetcher, id);
 }
diff --git a/plugins/esi/lib/Stats.cc b/plugins/esi/lib/Stats.cc
index be29d5ca952..632a534b726 100644
--- a/plugins/esi/lib/Stats.cc
+++ b/plugins/esi/lib/Stats.cc
@@ -34,7 +34,7 @@ namespace Stats
                                                   "esi.n_spcl_include_errs"};
 
   int g_stat_indices[Stats::MAX_STAT_ENUM] = {0};
-  StatSystem *g_system                     = 0;
+  StatSystem *g_system                     = nullptr;
 
   void
   init(StatSystem *system)
diff --git a/plugins/esi/lib/Utils.cc b/plugins/esi/lib/Utils.cc
index 601abc556f8..94bdfdb287b 100644
--- a/plugins/esi/lib/Utils.cc
+++ b/plugins/esi/lib/Utils.cc
@@ -27,8 +27,8 @@
 
 using namespace EsiLib;
 
-ComponentBase::Debug Utils::DEBUG_LOG(0);
-ComponentBase::Error Utils::ERROR_LOG(0);
+ComponentBase::Debug Utils::DEBUG_LOG(nullptr);
+ComponentBase::Error Utils::ERROR_LOG(nullptr);
 
 #define DEBUG_TAG "EsiUtils"
 
@@ -158,7 +158,7 @@ Utils::parseAttributes(const char *data, int data_len, AttributeList &attr_list,
     ;
   }
   attr.name  = data + i;
-  attr.value = 0;
+  attr.value = nullptr;
   for (; i <= data_len; ++i) {
     end_of_attribute = false;
     if (i == data_len) {
@@ -187,7 +187,7 @@ Utils::parseAttributes(const char *data, int data_len, AttributeList &attr_list,
         ;
       }
       attr.name     = data + i;
-      attr.value    = 0;
+      attr.value    = nullptr;
       inside_quotes = false;
     } else if (data[i] == '"') {
       if (!escape_on) {
diff --git a/plugins/esi/lib/Variables.cc b/plugins/esi/lib/Variables.cc
index 61bde4958b5..1730cf36ce5 100644
--- a/plugins/esi/lib/Variables.cc
+++ b/plugins/esi/lib/Variables.cc
@@ -269,7 +269,7 @@ Variables::_parseSubCookies()
   for (StringHash::const_iterator it_cookie = cookies.begin(); it_cookie != cookies.end(); ++it_cookie) {
     const std::string &name  = it_cookie->first;
     const std::string &value = it_cookie->second;
-    if (strchr(value.c_str(), '=') == NULL) {
+    if (strchr(value.c_str(), '=') == nullptr) {
       continue;
     }
 
diff --git a/plugins/esi/lib/gzip.cc b/plugins/esi/lib/gzip.cc
index 4ff776c3991..d89633c5fca 100644
--- a/plugins/esi/lib/gzip.cc
+++ b/plugins/esi/lib/gzip.cc
@@ -141,7 +141,7 @@ EsiLib::gunzip(const char *data, int data_len, BufferList &buf_list)
   zstrm.zalloc   = Z_NULL;
   zstrm.zfree    = Z_NULL;
   zstrm.opaque   = Z_NULL;
-  zstrm.next_in  = 0;
+  zstrm.next_in  = nullptr;
   zstrm.avail_in = 0;
   if (inflateInit2(&zstrm, -MAX_WBITS) != Z_OK) {
     Utils::ERROR_LOG("[%s] inflateInit2 failed!", __FUNCTION__);
diff --git a/plugins/esi/serverIntercept.cc b/plugins/esi/serverIntercept.cc
index d767a905de6..bdbe8bc8eaf 100644
--- a/plugins/esi/serverIntercept.cc
+++ b/plugins/esi/serverIntercept.cc
@@ -46,7 +46,7 @@ struct SContData {
     TSVIO vio;
     TSIOBuffer buffer;
     TSIOBufferReader reader;
-    IoHandle() : vio(0), buffer(0), reader(0){};
+    IoHandle() : vio(nullptr), buffer(nullptr), reader(nullptr){};
     ~IoHandle()
     {
       if (reader) {
@@ -70,14 +70,14 @@ struct SContData {
   bool initialized;
 
   SContData(TSCont cont)
-    : net_vc(0),
+    : net_vc(nullptr),
       contp(cont),
       input(),
       output(),
       body(""),
       req_content_len(0),
-      req_hdr_bufp(0),
-      req_hdr_loc(0),
+      req_hdr_bufp(nullptr),
+      req_hdr_loc(nullptr),
       req_hdr_parsed(false),
       initialized(false)
   {
@@ -127,7 +127,7 @@ SContData::init(TSVConn vconn)
 void
 SContData::setupWrite()
 {
-  TSAssert(output.buffer == 0);
+  TSAssert(output.buffer == nullptr);
   output.buffer = TSIOBufferCreate();
   output.reader = TSIOBufferReaderAlloc(output.buffer);
   output.vio    = TSVConnWrite(net_vc, contp, output.reader, INT_MAX);
@@ -149,7 +149,7 @@ handleRead(SContData *cont_data, bool &read_complete)
     int64_t data_len;
     const char *data;
     TSIOBufferBlock block = TSIOBufferReaderStart(cont_data->input.reader);
-    while (block != NULL) {
+    while (block != nullptr) {
       data = TSIOBufferBlockReadStart(block, cont_data->input.reader, &data_len);
       if (!cont_data->req_hdr_parsed) {
         const char *endptr = data + data_len;
diff --git a/plugins/esi/test/StubIncludeHandler.cc b/plugins/esi/test/StubIncludeHandler.cc
index 1083d7a292e..06ce32ee556 100644
--- a/plugins/esi/test/StubIncludeHandler.cc
+++ b/plugins/esi/test/StubIncludeHandler.cc
@@ -30,7 +30,7 @@ bool StubIncludeHandler::includeResult            = true;
 const char *const StubIncludeHandler::DATA_PREFIX = "Special data for include id ";
 const int StubIncludeHandler::DATA_PREFIX_SIZE    = strlen(StubIncludeHandler::DATA_PREFIX);
 
-const char *StubIncludeHandler::FOOTER = 0;
+const char *StubIncludeHandler::FOOTER = nullptr;
 int StubIncludeHandler::FOOTER_SIZE    = 0;
 
 int
diff --git a/plugins/esi/test/docnode_test.cc b/plugins/esi/test/docnode_test.cc
index b648d2f05aa..a497c819f32 100644
--- a/plugins/esi/test/docnode_test.cc
+++ b/plugins/esi/test/docnode_test.cc
@@ -153,7 +153,7 @@ pthread_key_t threadKey;
 int
 main()
 {
-  pthread_key_create(&threadKey, NULL);
+  pthread_key_create(&threadKey, nullptr);
   Utils::init(&Debug, &Error);
 
   {
@@ -174,7 +174,7 @@ main()
     checkNodeList1(node_list2);
 
     DocNodeList node_list3;
-    assert(node_list3.unpack(0, 90) == false);
+    assert(node_list3.unpack(nullptr, 90) == false);
     assert(node_list3.unpack(packed.data(), 3) == false);
     *(reinterpret_cast(&packed[0])) = -1;
     assert(node_list3.unpack(packed) == true);
diff --git a/plugins/esi/test/gzip_test.cc b/plugins/esi/test/gzip_test.cc
index b21537f2134..8dcf7ffc25c 100644
--- a/plugins/esi/test/gzip_test.cc
+++ b/plugins/esi/test/gzip_test.cc
@@ -41,7 +41,7 @@ pthread_key_t threadKey;
 int
 main()
 {
-  pthread_key_create(&threadKey, NULL);
+  pthread_key_create(&threadKey, nullptr);
   Utils::init(&Debug, &Error);
 
   {
diff --git a/plugins/esi/test/parser_test.cc b/plugins/esi/test/parser_test.cc
index b65faceb27f..22040f7cb00 100644
--- a/plugins/esi/test/parser_test.cc
+++ b/plugins/esi/test/parser_test.cc
@@ -51,7 +51,7 @@ pthread_key_t threadKey;
 int
 main()
 {
-  pthread_key_create(&threadKey, NULL);
+  pthread_key_create(&threadKey, nullptr);
   Utils::init(&Debug, &Error);
 
   {
@@ -215,7 +215,7 @@ main()
     ++list_iter;
     assert(list_iter->type == DocNode::TYPE_REMOVE);
     assert(list_iter->data_len == 0);
-    assert(list_iter->data == 0);
+    assert(list_iter->data == nullptr);
     assert((list_iter->child_nodes).size() == 0);
     ++list_iter;
     assert(list_iter->type == DocNode::TYPE_PRE);
@@ -239,7 +239,7 @@ main()
     ++list_iter;
     assert(list_iter->type == DocNode::TYPE_REMOVE);
     assert(list_iter->data_len == 0);
-    assert(list_iter->data == 0);
+    assert(list_iter->data == nullptr);
     ++list_iter;
     assert(list_iter->type == DocNode::TYPE_PRE);
     assert(list_iter->data_len == 5);
@@ -278,7 +278,7 @@ main()
     ++list_iter;
     assert(list_iter->type == DocNode::TYPE_REMOVE);
     assert(list_iter->data_len == 0);
-    assert(list_iter->data == 0);
+    assert(list_iter->data == nullptr);
     ++list_iter;
     assert(list_iter->type == DocNode::TYPE_PRE);
     assert(list_iter->data_len == 5);
@@ -306,7 +306,7 @@ main()
     ++list_iter;
     assert(list_iter->type == DocNode::TYPE_REMOVE);
     assert(list_iter->data_len == 0);
-    assert(list_iter->data == 0);
+    assert(list_iter->data == nullptr);
     ++list_iter;
     assert(list_iter->type == DocNode::TYPE_PRE);
     assert(list_iter->data_len == 4);
@@ -895,7 +895,7 @@ main()
                            "  ",
                            "",
-                           0};
+                           nullptr};
 
     DocNodeList node_list;
     for (int i = 0; lines[i]; ++i) {
diff --git a/plugins/esi/test/processor_test.cc b/plugins/esi/test/processor_test.cc
index c2675512110..b89c2b33497 100644
--- a/plugins/esi/test/processor_test.cc
+++ b/plugins/esi/test/processor_test.cc
@@ -48,7 +48,7 @@ main()
   Variables esi_vars("vars", &Debug, &Error, whitelistCookies);
   HandlerManager handler_mgr("handler_mgr", &Debug, &Error);
 
-  pthread_key_create(&threadKey, NULL);
+  pthread_key_create(&threadKey, nullptr);
   Utils::init(&Debug, &Error);
 
   {
@@ -1018,7 +1018,7 @@ main()
     assert(strncmp(output_data, "Special data for include id 2", output_data_len - StubIncludeHandler::FOOTER_SIZE) == 0);
     assert(strncmp(output_data + StubIncludeHandler::DATA_PREFIX_SIZE + 1, StubIncludeHandler::FOOTER,
                    StubIncludeHandler::FOOTER_SIZE) == 0);
-    StubIncludeHandler::FOOTER      = 0;
+    StubIncludeHandler::FOOTER      = nullptr;
     StubIncludeHandler::FOOTER_SIZE = 0;
   }
 
@@ -1041,7 +1041,7 @@ main()
 
     EsiProcessor esi_proc("processor", "parser", "expression", &Debug, &Error, data_fetcher, esi_vars, handler_mgr);
 
-    assert(esi_proc.usePackedNodeList(0, packedNodeList.size()) == EsiProcessor::UNPACK_FAILURE);
+    assert(esi_proc.usePackedNodeList(nullptr, packedNodeList.size()) == EsiProcessor::UNPACK_FAILURE);
   }
 
   {
diff --git a/plugins/esi/test/utils_test.cc b/plugins/esi/test/utils_test.cc
index 941251a4e8e..a35efd57974 100644
--- a/plugins/esi/test/utils_test.cc
+++ b/plugins/esi/test/utils_test.cc
@@ -53,56 +53,57 @@ pthread_key_t threadKey;
 int
 main()
 {
-  pthread_key_create(&threadKey, NULL);
+  pthread_key_create(&threadKey, nullptr);
   Utils::init(&Debug, &Error);
 
   AttributeList attr_list;
 
   string str1("pos=SKY spaceid=12123");
   Utils::parseAttributes(str1, attr_list);
-  const char *expected_strs1[] = {"pos", "SKY", "spaceid", "12123", 0};
+  const char *expected_strs1[] = {"pos", "SKY", "spaceid", "12123", nullptr};
   checkAttributes("test1", attr_list, expected_strs1);
 
   string str2("  pos=SKY	  spaceid=12123 ");
   Utils::parseAttributes(str2, attr_list);
-  const char *expected_strs2[] = {"pos", "SKY", "spaceid", "12123", 0};
+  const char *expected_strs2[] = {"pos", "SKY", "spaceid", "12123", nullptr};
   checkAttributes("test2", attr_list, expected_strs2);
 
   string str3("  pos=\"SKY\"	  spaceid=12123 ");
   Utils::parseAttributes(str3, attr_list);
-  const char *expected_strs3[] = {"pos", "SKY", "spaceid", "12123", 0};
+  const char *expected_strs3[] = {"pos", "SKY", "spaceid", "12123", nullptr};
   checkAttributes("test3", attr_list, expected_strs3);
 
   string str4("  pos=\" SKY BAR \"	  spaceid=12123 blah=\"foo");
   Utils::parseAttributes(str4, attr_list);
-  const char *expected_strs4[] = {"pos", " SKY BAR ", "spaceid", "12123", 0};
+  const char *expected_strs4[] = {"pos", " SKY BAR ", "spaceid", "12123", nullptr};
   checkAttributes("test4", attr_list, expected_strs4);
 
   string str5("a=\"b & xyz\"&c=d&e=f&g=h\"");
   Utils::parseAttributes(str5, attr_list, "&");
-  const char *expected_strs5[] = {"a", "b & xyz", "c", "d", "e", "f", 0};
+  const char *expected_strs5[] = {"a", "b & xyz", "c", "d", "e", "f", nullptr};
   checkAttributes("test5", attr_list, expected_strs5);
 
   string str6("abcd=&");
   Utils::parseAttributes(str6, attr_list, "&");
-  const char *expected_strs6[] = {0};
+  const char *expected_strs6[] = {nullptr};
   checkAttributes("test6", attr_list, expected_strs6);
 
   string str7("&& abcd=& key1=val1 &=val2&val3&&");
   Utils::parseAttributes(str7, attr_list, "&");
-  const char *expected_strs7[] = {"key1", "val1", 0};
+  const char *expected_strs7[] = {"key1", "val1", nullptr};
   checkAttributes("test7", attr_list, expected_strs7);
 
   const char *escaped_sequence = "{\\\"site-attribute\\\":\\\"content=no_expandable; ajax_cert_expandable\\\"}";
   string str8("pos=\"FPM1\" spaceid=96584352 extra_mime=\"");
   str8.append(escaped_sequence);
   str8.append("\" foo=bar a=\"b\"");
-  const char *expected_strs8[] = {"pos", "FPM1", "spaceid", "96584352", "extra_mime", escaped_sequence, "foo", "bar", "a", "b", 0};
+  const char *expected_strs8[] = {"pos", "FPM1", "spaceid", "96584352", "extra_mime", escaped_sequence,
+                                  "foo", "bar",  "a",       "b",        nullptr};
   Utils::parseAttributes(str8, attr_list);
   checkAttributes("test8", attr_list, expected_strs8);
 
   assert(Utils::unescape(escaped_sequence) == "{\"site-attribute\":\"content=no_expandable; ajax_cert_expandable\"}");
-  assert(Utils::unescape(0) == "");
+  assert(Utils::unescape(nullptr) == "");
   assert(Utils::unescape("\\", 0) == "");
   assert(Utils::unescape("\\hello\"", 3) == "he");
   assert(Utils::unescape("\\hello\"", -3) == "");
@@ -110,12 +111,12 @@ main()
 
   string str9("n1=v1; n2=v2;, n3=v3, ;n4=v4=extrav4");
   Utils::parseAttributes(str9, attr_list, ";,");
-  const char *expected_strs9[] = {"n1", "v1", "n2", "v2", "n3", "v3", "n4", "v4=extrav4", 0};
+  const char *expected_strs9[] = {"n1", "v1", "n2", "v2", "n3", "v3", "n4", "v4=extrav4", nullptr};
   checkAttributes("test9", attr_list, expected_strs9);
 
   string str10("hello=world&test=萌萌&a=b");
   Utils::parseAttributes(str10, attr_list, "&");
-  const char *expected_strs10[] = {"hello", "world", "test", "萌萌", "a", "b", 0};
+  const char *expected_strs10[] = {"hello", "world", "test", "萌萌", "a", "b", nullptr};
   checkAttributes("test10", attr_list, expected_strs10);
 
   cout << "Test 11 " << endl;
diff --git a/plugins/esi/test/vars_test.cc b/plugins/esi/test/vars_test.cc
index 69dce3e57b9..ba0ca8847ed 100644
--- a/plugins/esi/test/vars_test.cc
+++ b/plugins/esi/test/vars_test.cc
@@ -70,7 +70,7 @@ fakeDebug(const char *tag, const char *fmt, ...)
 int
 main()
 {
-  pthread_key_create(&threadKey, NULL);
+  pthread_key_create(&threadKey, nullptr);
   Utils::init(&Debug, &Error);
 
   {
@@ -94,7 +94,7 @@ main()
                              "en-gb , en-us ,  ,",
                              "Accept-Language",
                              "ka-in",
-                             0};
+                             nullptr};
 
     HttpHeaderList headers;
     addToHeaderList(strings, headers);
@@ -156,7 +156,7 @@ main()
     esi_vars.populate("a=b&c=d&e=f");
 
     Expression esi_expr("vars_test", &Debug, &Error, esi_vars);
-    assert(esi_expr.expand(0) == "");
+    assert(esi_expr.expand(nullptr) == "");
     assert(esi_expr.expand("") == "");
     assert(esi_expr.expand("blah") == "blah");
     assert(esi_expr.expand("blah$(HTTP_HOST") == "");
diff --git a/plugins/experimental/balancer/balancer.cc b/plugins/experimental/balancer/balancer.cc
index c8219d42d43..8f68ea2d6d8 100644
--- a/plugins/experimental/balancer/balancer.cc
+++ b/plugins/experimental/balancer/balancer.cc
@@ -40,12 +40,12 @@ MakeBalancerInstance(const char *opt)
   size_t len      = end ? std::distance(opt, end) : strlen(opt);
 
   if (len == lengthof("hash") && strncmp(opt, "hash", len) == 0) {
-    return MakeHashBalancer(end ? end + 1 : NULL);
+    return MakeHashBalancer(end ? end + 1 : nullptr);
   } else if (len == lengthof("roundrobin") && strncmp(opt, "roundrobin", len) == 0) {
-    return MakeRoundRobinBalancer(end ? end + 1 : NULL);
+    return MakeRoundRobinBalancer(end ? end + 1 : nullptr);
   } else {
     TSError("[balancer] Invalid balancing policy '%.*s'", (int)len, opt);
-    return NULL;
+    return nullptr;
   }
 }
 
@@ -73,7 +73,7 @@ MakeBalancerTarget(const char *strval)
     if (colon) {
       size_t len = std::distance(strval, colon);
 
-      target.port = strtol(colon + 1, NULL, 10);
+      target.port = strtol(colon + 1, nullptr, 10);
       target.name = std::string(strval, len);
     } else {
       target.port = 0;
@@ -102,10 +102,10 @@ TSReturnCode
 TSRemapNewInstance(int argc, char *argv[], void **instance, char *errbuf, int errbuf_size)
 {
   static const struct option longopt[] = {
-    {const_cast("policy"), required_argument, 0, 'p'}, {0, 0, 0, 0},
+    {const_cast("policy"), required_argument, nullptr, 'p'}, {nullptr, 0, nullptr, 0},
   };
 
-  BalancerInstance *balancer = NULL;
+  BalancerInstance *balancer = nullptr;
 
   // The first two arguments are the "from" and "to" URL string. We need to
   // skip them, but we also require that there be an option to masquerade as
@@ -116,7 +116,7 @@ TSRemapNewInstance(int argc, char *argv[], void **instance, char *errbuf, int er
   for (;;) {
     int opt;
 
-    opt = getopt_long(argc, (char *const *)argv, "", longopt, NULL);
+    opt = getopt_long(argc, (char *const *)argv, "", longopt, nullptr);
     switch (opt) {
     case 'p':
       if (!balancer) {
diff --git a/plugins/experimental/balancer/hash.cc b/plugins/experimental/balancer/hash.cc
index d6a32f6901d..1f9dc138bdb 100644
--- a/plugins/experimental/balancer/hash.cc
+++ b/plugins/experimental/balancer/hash.cc
@@ -116,7 +116,7 @@ void
 HashTxnKey(TSHttpTxn txn, TSRemapRequestInfo *rri, MD5_CTX *ctx)
 {
   TSMLoc url = TS_NULL_MLOC;
-  char *str  = NULL;
+  char *str  = nullptr;
   int len;
 
   if (TSUrlCreate(rri->requestBufp, &url) != TS_SUCCESS) {
@@ -207,7 +207,7 @@ MakeHashBalancer(const char *options)
   if (options) {
     hash->hash_parts.clear(); // clear the default hash type if we have options
     options = tmp = strdup(options);
-    while ((opt = strsep(&tmp, ",")) != NULL) {
+    while ((opt = strsep(&tmp, ",")) != nullptr) {
       if (strcmp(opt, "key") == 0) {
         hash->hash_parts.push_back(HashTxnKey);
       } else if (strcmp(opt, "url") == 0) {
diff --git a/plugins/experimental/balancer/roundrobin.cc b/plugins/experimental/balancer/roundrobin.cc
index 9ad5693a814..652964407e8 100644
--- a/plugins/experimental/balancer/roundrobin.cc
+++ b/plugins/experimental/balancer/roundrobin.cc
@@ -61,7 +61,7 @@ MakeRoundRobinBalancer(const char *options)
 
   if (options) {
     options = tmp = strdup(options);
-    while ((opt = strsep(&tmp, ",")) != NULL) {
+    while ((opt = strsep(&tmp, ",")) != nullptr) {
       TSError("[balancer] Ignoring invalid round robin field '%s'", opt);
     }
 
diff --git a/plugins/experimental/buffer_upload/buffer_upload.cc b/plugins/experimental/buffer_upload/buffer_upload.cc
index 5f939de07d4..f80977debc4 100644
--- a/plugins/experimental/buffer_upload/buffer_upload.cc
+++ b/plugins/experimental/buffer_upload/buffer_upload.cc
@@ -95,7 +95,7 @@ struct config_val_ul {
 
 static int upload_vc_count;
 
-static upload_config *uconfig = NULL;
+static upload_config *uconfig = nullptr;
 
 struct pvc_state_t {
   TSVConn p_vc;
@@ -166,10 +166,10 @@ write_buffer_to_disk(TSIOBufferReader reader, pvc_state *my_state, TSCont contp)
 
   // LOG_SET_FUNCTION_NAME("write_buffer_to_disk");
   block = TSIOBufferReaderStart(reader);
-  while (block != NULL) {
+  while (block != nullptr) {
     ptr  = TSIOBufferBlockReadStart(block, reader, &size);
     pBuf = (char *)TSmalloc(sizeof(char) * size);
-    if (pBuf == NULL) {
+    if (pBuf == nullptr) {
       LOG_ERROR_AND_RETURN("TSAIOWrite");
     }
     memcpy(pBuf, ptr, size);
@@ -191,19 +191,19 @@ call_httpconnect(TSCont contp, pvc_state *my_state)
   sockaddr const *client_ip = TSHttpTxnClientAddrGet(my_state->http_txnp);
 
   TSDebug(DEBUG_TAG, "call TSHttpConnect() ...");
-  if ((my_state->net_vc = TSHttpConnect(client_ip)) == NULL) {
+  if ((my_state->net_vc = TSHttpConnect(client_ip)) == nullptr) {
     LOG_ERROR_AND_RETURN("TSHttpConnect");
   }
   my_state->p_write_vio = TSVConnWrite(my_state->p_vc, contp, my_state->resp_reader, INT_MAX);
-  if (my_state->p_write_vio == NULL) {
+  if (my_state->p_write_vio == nullptr) {
     LOG_ERROR_AND_RETURN("TSVConnWrite");
   }
   my_state->n_read_vio = TSVConnRead(my_state->net_vc, contp, my_state->resp_buffer, INT_MAX);
-  if (my_state->n_read_vio == NULL) {
+  if (my_state->n_read_vio == nullptr) {
     LOG_ERROR_AND_RETURN("TSVConnRead");
   }
   my_state->n_write_vio = TSVConnWrite(my_state->net_vc, contp, my_state->req_reader, INT_MAX);
-  if (my_state->n_write_vio == NULL) {
+  if (my_state->n_write_vio == nullptr) {
     LOG_ERROR_AND_RETURN("TSVConnWrite");
   }
   return TS_SUCCESS;
@@ -214,23 +214,23 @@ pvc_cleanup(TSCont contp, pvc_state *my_state)
 {
   if (my_state->req_buffer) {
     TSIOBufferReaderFree(my_state->req_reader);
-    my_state->req_reader = NULL;
+    my_state->req_reader = nullptr;
     TSIOBufferDestroy(my_state->req_buffer);
-    my_state->req_buffer = NULL;
+    my_state->req_buffer = nullptr;
   }
 
   if (my_state->resp_buffer) {
     TSIOBufferReaderFree(my_state->resp_reader);
-    my_state->resp_reader = NULL;
+    my_state->resp_reader = nullptr;
     TSIOBufferDestroy(my_state->resp_buffer);
-    my_state->resp_buffer = NULL;
+    my_state->resp_buffer = nullptr;
   }
 
   if (my_state->req_hdr_buffer) {
     TSIOBufferReaderFree(my_state->req_hdr_reader);
-    my_state->req_hdr_reader = NULL;
+    my_state->req_hdr_reader = nullptr;
     TSIOBufferDestroy(my_state->req_hdr_buffer);
-    my_state->req_hdr_buffer = NULL;
+    my_state->req_hdr_buffer = nullptr;
   }
 
   if (uconfig->use_disk_buffer && my_state->fd != -1) {
@@ -240,7 +240,7 @@ pvc_cleanup(TSCont contp, pvc_state *my_state)
 
   if (my_state->chunk_buffer) {
     TSfree(my_state->chunk_buffer);
-    my_state->chunk_buffer = NULL;
+    my_state->chunk_buffer = nullptr;
   }
 
   TSfree(my_state);
@@ -278,14 +278,14 @@ pvc_process_accept(TSCont contp, int event, void *edata, pvc_state *my_state)
     my_state->resp_buffer = TSIOBufferCreate();
     my_state->resp_reader = TSIOBufferReaderAlloc(my_state->resp_buffer);
 
-    if ((my_state->req_buffer == NULL) || (my_state->req_reader == NULL) || (my_state->resp_buffer == NULL) ||
-        (my_state->resp_reader == NULL)) {
+    if ((my_state->req_buffer == nullptr) || (my_state->req_reader == nullptr) || (my_state->resp_buffer == nullptr) ||
+        (my_state->resp_reader == nullptr)) {
       LOG_ERROR("TSIOBufferCreate || TSIOBufferReaderAlloc");
       TSVConnClose(my_state->p_vc);
       pvc_cleanup(contp, my_state);
     } else {
       my_state->p_read_vio = TSVConnRead(my_state->p_vc, contp, my_state->req_buffer, INT_MAX);
-      if (my_state->p_read_vio == NULL) {
+      if (my_state->p_read_vio == nullptr) {
         LOG_ERROR("TSVConnRead");
       }
     }
@@ -380,7 +380,7 @@ pvc_process_p_read(TSCont contp, TSEvent event, pvc_state *my_state)
       LOG_ERROR("TSVIODoneGet");
     }
 
-    my_state->p_read_vio = NULL;
+    my_state->p_read_vio = nullptr;
 
     TSVConnShutdown(my_state->p_vc, 1, 0);
     // if client aborted the uploading in middle, need to cleanup the file from disk
@@ -422,7 +422,7 @@ pvc_process_n_write(TSCont contp, TSEvent event, pvc_state *my_state)
   case TS_EVENT_ERROR:
     if (my_state->p_read_vio) {
       TSVConnShutdown(my_state->p_vc, 1, 0);
-      my_state->p_read_vio = NULL;
+      my_state->p_read_vio = nullptr;
     }
   /* FALL THROUGH */
   case TS_EVENT_VCONN_WRITE_COMPLETE:
@@ -466,7 +466,7 @@ pvc_process_n_read(TSCont contp, TSEvent event, pvc_state *my_state)
       LOG_ERROR("TSVIODoneGet");
     }
 
-    my_state->n_read_vio = NULL;
+    my_state->n_read_vio = nullptr;
     TSVIONBytesSet(my_state->p_write_vio, ndone);
     TSVConnShutdown(my_state->net_vc, 1, 0);
 
@@ -507,7 +507,7 @@ pvc_process_p_write(TSCont contp, TSEvent event, pvc_state *my_state)
   case TS_EVENT_ERROR:
     if (my_state->n_read_vio) {
       TSVConnShutdown(my_state->net_vc, 1, 0);
-      my_state->n_read_vio = NULL;
+      my_state->n_read_vio = nullptr;
     }
   /* FALL THROUGH */
   case TS_EVENT_VCONN_WRITE_COMPLETE:
@@ -529,7 +529,7 @@ pvc_plugin(TSCont contp, TSEvent event, void *edata)
   pvc_state *my_state    = static_cast(TSContDataGet(contp));
   TSAIOCallback callback = static_cast(edata);
 
-  if (my_state == NULL) {
+  if (my_state == nullptr) {
     TSReleaseAssert(!"Unexpected: my_state is NULL");
     return 0;
   }
@@ -552,7 +552,7 @@ pvc_plugin(TSCont contp, TSEvent event, void *edata)
       // this TS_AIO_EVENT_DONE event is from TSAIOWrite()
       TSDebug(DEBUG_TAG, "aio write size: %d", size);
       my_state->size_written += size;
-      if (buf != NULL) {
+      if (buf != nullptr) {
         TSfree(buf);
       }
       if (my_state->size_written >= my_state->req_size) {
@@ -614,7 +614,7 @@ convert_url_func(TSMBuffer req_bufp, TSMLoc req_loc)
     //  TSHandleStringRelease(req_bufp, url_loc, str);
     str   = TSUrlPathGet(req_bufp, url_loc, &len);
     slash = strstr(str, "/");
-    if (slash == NULL) {
+    if (slash == nullptr) {
       // if (VALID_PTR(str))
       //  TSHandleStringRelease(req_bufp, url_loc, str);
       TSHandleMLocRelease(req_bufp, req_loc, url_loc);
@@ -625,7 +625,7 @@ convert_url_func(TSMBuffer req_bufp, TSMLoc req_loc)
     pathTmp[len] = '\0';
     TSDebug(DEBUG_TAG, "convert_url_func working on path: %s", pathTmp);
     colon = strstr(str, ":");
-    if (colon != NULL && colon < slash) {
+    if (colon != nullptr && colon < slash) {
       char *port_str = (char *)TSmalloc(sizeof(char) * (slash - colon));
       strncpy(port_str, colon + 1, slash - colon - 1);
       port_str[slash - colon - 1] = '\0';
@@ -645,7 +645,7 @@ convert_url_func(TSMBuffer req_bufp, TSMLoc req_loc)
     TSUrlHostSet(req_bufp, url_loc, str, colon - str);
     TSUrlPathSet(req_bufp, url_loc, slash + 1, len - (slash - str) - 1);
     if ((field_loc = TSMimeHdrFieldFind(req_bufp, req_loc, TS_MIME_FIELD_HOST, TS_MIME_LEN_HOST)) != TS_NULL_MLOC &&
-        field_loc != NULL) {
+        field_loc != nullptr) {
       TSMimeHdrFieldValueStringSet(req_bufp, req_loc, field_loc, 0, str, slash - str);
       TSHandleMLocRelease(req_bufp, req_loc, field_loc);
     }
@@ -717,7 +717,7 @@ attach_pvc_plugin(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata)
     // TSHandleStringRelease(req_bufp, req_loc, method);
 
     TSDebug(DEBUG_TAG, "Got POST req");
-    if (uconfig->url_list_file != NULL) {
+    if (uconfig->url_list_file != nullptr) {
       TSDebug(DEBUG_TAG, "url_list_file != NULL");
       // check against URL list
       if (TSHttpHdrUrlGet(req_bufp, req_loc, &url_loc) == TS_ERROR) {
@@ -753,7 +753,7 @@ attach_pvc_plugin(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata)
         TSDebug(DEBUG_TAG, "Adding host to request url: %s", replacement_host_str);
 
         const char *colon = strchr(replacement_host_str, ':');
-        if (colon != NULL && colon[1] != '\0') {
+        if (colon != nullptr && colon[1] != '\0') {
           int length         = 0;
           const char *scheme = TSUrlSchemeGet(req_bufp, url_loc, &length);
           int port_str_val   = atoi(colon + 1);
@@ -804,7 +804,7 @@ attach_pvc_plugin(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata)
     }
 
     field_loc = TSMimeHdrFieldFind(req_bufp, req_loc, TS_MIME_FIELD_CONTENT_LENGTH, TS_MIME_LEN_CONTENT_LENGTH);
-    if (field_loc == NULL) {
+    if (field_loc == nullptr) {
       TSHandleMLocRelease(req_bufp, TS_NULL_MLOC, req_loc);
       LOG_ERROR("TSMimeHdrFieldRetrieve");
       break;
@@ -837,20 +837,20 @@ attach_pvc_plugin(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata)
 
     my_state              = (pvc_state *)TSmalloc(sizeof(pvc_state));
     my_state->req_size    = content_length;
-    my_state->p_vc        = NULL;
-    my_state->p_read_vio  = NULL;
-    my_state->p_write_vio = NULL;
-
-    my_state->net_vc      = NULL;
-    my_state->n_read_vio  = NULL;
-    my_state->n_write_vio = NULL;
-
-    my_state->req_buffer    = NULL;
-    my_state->req_reader    = NULL;
-    my_state->resp_buffer   = NULL;
-    my_state->resp_reader   = NULL;
+    my_state->p_vc        = nullptr;
+    my_state->p_read_vio  = nullptr;
+    my_state->p_write_vio = nullptr;
+
+    my_state->net_vc      = nullptr;
+    my_state->n_read_vio  = nullptr;
+    my_state->n_write_vio = nullptr;
+
+    my_state->req_buffer    = nullptr;
+    my_state->req_reader    = nullptr;
+    my_state->resp_buffer   = nullptr;
+    my_state->resp_reader   = nullptr;
     my_state->fd            = -1;
-    my_state->disk_io_mutex = NULL;
+    my_state->disk_io_mutex = nullptr;
 
     my_state->http_txnp = txnp; // not in use now, may need in the future
 
@@ -935,7 +935,7 @@ create_directory()
   DIR *dir;
   struct dirent *d;
 
-  if (getcwd(cwd, 4096) == NULL) {
+  if (getcwd(cwd, 4096) == nullptr) {
     TSError("[buffer_upload] getcwd fails");
     return 0;
   }
@@ -963,7 +963,7 @@ create_directory()
       }
     }
     dir = opendir(".");
-    if (dir == NULL) {
+    if (dir == nullptr) {
       goto error_out;
     }
     while ((d = readdir(dir))) {
@@ -1005,24 +1005,24 @@ load_urls(char *filename)
   url_buf[uconfig->max_url_length] = '\0';
 
   for (i = 0; i < 2; i++) {
-    if ((file = TSfopen(filename, "r")) == NULL) {
+    if ((file = TSfopen(filename, "r")) == nullptr) {
       TSfree(url_buf);
       TSError("[buffer_upload] Fail to open %s", filename);
       return;
     }
     if (i == 0) { // first round
       uconfig->url_num = 0;
-      while (TSfgets(file, url_buf, uconfig->max_url_length) != NULL) {
+      while (TSfgets(file, url_buf, uconfig->max_url_length) != nullptr) {
         uconfig->url_num++;
       }
       uconfig->urls = (char **)TSmalloc(sizeof(char *) * uconfig->url_num);
     } else { // second round
       int idx = 0;
-      while (TSfgets(file, url_buf, uconfig->max_url_length) != NULL && idx < uconfig->url_num) {
-        if ((eol = strstr(url_buf, "\r\n")) != NULL) {
+      while (TSfgets(file, url_buf, uconfig->max_url_length) != nullptr && idx < uconfig->url_num) {
+        if ((eol = strstr(url_buf, "\r\n")) != nullptr) {
           /* To handle newlines on Windows */
           *eol = '\0';
-        } else if ((eol = strchr(url_buf, '\n')) != NULL) {
+        } else if ((eol = strchr(url_buf, '\n')) != nullptr) {
           *eol = '\0';
         } else {
           /* Not a valid line, skip it */
@@ -1042,12 +1042,12 @@ void
 parse_config_line(char *line, const struct config_val_ul *cv)
 {
   const char *delim = "\t\r\n ";
-  char *save        = NULL;
+  char *save        = nullptr;
   char *tok         = strtok_r(line, delim, &save);
 
   while (tok && cv->str) {
     if (!strcmp(tok, cv->str)) {
-      tok = strtok_r(NULL, delim, &save);
+      tok = strtok_r(nullptr, delim, &save);
       if (tok) {
         switch (cv->type) {
         case TYPE_INT: {
@@ -1131,11 +1131,11 @@ read_upload_config(const char *file_name)
   uconfig->convert_url     = false;
   uconfig->chunk_size      = 16 * 1024;
   uconfig->mem_buffer_size = 32 * 1024;
-  uconfig->url_list_file   = NULL;
+  uconfig->url_list_file   = nullptr;
   uconfig->max_url_length  = 4096;
   uconfig->url_num         = 0;
-  uconfig->urls            = NULL;
-  uconfig->base_dir        = NULL;
+  uconfig->urls            = nullptr;
+  uconfig->base_dir        = nullptr;
   uconfig->subdir_num      = 64;
   uconfig->thread_num      = 4;
 
@@ -1148,14 +1148,14 @@ read_upload_config(const char *file_name)
                                         {"base_dir", TYPE_STRING, &(uconfig->base_dir)},
                                         {"subdir_num", TYPE_UINT, &(uconfig->subdir_num)},
                                         {"thread_num", TYPE_UINT, &(uconfig->thread_num)},
-                                        {NULL, TYPE_LONG, NULL}};
+                                        {nullptr, TYPE_LONG, nullptr}};
   TSFile conf_file;
   conf_file = TSfopen(file_name, "r");
 
-  if (conf_file != NULL) {
+  if (conf_file != nullptr) {
     TSDebug(DEBUG_TAG, "opened config: %s", file_name);
     char buf[1024];
-    while (TSfgets(conf_file, buf, sizeof(buf) - 1) != NULL) {
+    while (TSfgets(conf_file, buf, sizeof(buf) - 1) != nullptr) {
       if (buf[0] != '#') {
         parse_config_line(buf, config_vals);
       }
@@ -1166,7 +1166,7 @@ read_upload_config(const char *file_name)
     // if fail to open config file, use the default config
   }
 
-  if (uconfig->base_dir == NULL) {
+  if (uconfig->base_dir == nullptr) {
     uconfig->base_dir = TSstrdup("/FOOBAR/var/buffer_upload_tmp");
   } else {
     // remove the "/" at the end.
@@ -1238,6 +1238,6 @@ TSPluginInit(int argc, const char *argv[])
   /* create the statistic variables */
   upload_vc_count = TSStatCreate("upload_vc.count", TS_RECORDDATATYPE_INT, TS_STAT_NON_PERSISTENT, TS_STAT_SYNC_SUM);
 
-  contp = TSContCreate(attach_pvc_plugin, NULL);
+  contp = TSContCreate(attach_pvc_plugin, nullptr);
   TSHttpHookAdd(TS_HTTP_PRE_REMAP_HOOK, contp);
 }
diff --git a/plugins/experimental/cache_promote/cache_promote.cc b/plugins/experimental/cache_promote/cache_promote.cc
index 176746133e4..83c7b217ba1 100644
--- a/plugins/experimental/cache_promote/cache_promote.cc
+++ b/plugins/experimental/cache_promote/cache_promote.cc
@@ -41,14 +41,14 @@ TSCont gNocacheCont;
 // Note that all options for all policies has to go here. Not particularly pretty...
 //
 static const struct option longopt[] = {
-  {const_cast("policy"), required_argument, NULL, 'p'},
+  {const_cast("policy"), required_argument, nullptr, 'p'},
   // This is for both Chance and LRU (optional) policy
-  {const_cast("sample"), required_argument, NULL, 's'},
+  {const_cast("sample"), required_argument, nullptr, 's'},
   // For the LRU policy
-  {const_cast("buckets"), required_argument, NULL, 'b'},
-  {const_cast("hits"), required_argument, NULL, 'h'},
+  {const_cast("buckets"), required_argument, nullptr, 'b'},
+  {const_cast("hits"), required_argument, nullptr, 'h'},
   // EOF
-  {NULL, no_argument, NULL, '\0'},
+  {nullptr, no_argument, nullptr, '\0'},
 };
 
 //////////////////////////////////////////////////////////////////////////////////////////////
@@ -61,13 +61,13 @@ class PromotionPolicy
   {
     // This doesn't have to be perfect, since this is just chance sampling.
     // coverity[dont_call]
-    srand48((long)time(NULL));
+    srand48((long)time(nullptr));
   }
 
   void
   setSample(char *s)
   {
-    _sample = strtof(s, NULL) / 100.0;
+    _sample = strtof(s, nullptr) / 100.0;
   }
 
   float
@@ -213,7 +213,7 @@ class LRUPolicy : public PromotionPolicy
   {
     switch (opt) {
     case 'b':
-      _buckets = static_cast(strtol(optarg, NULL, 10));
+      _buckets = static_cast(strtol(optarg, nullptr, 10));
       if (_buckets < MINIMUM_BUCKET_SIZE) {
         TSError("%s: Enforcing minimum LRU bucket size of %d", PLUGIN_NAME, MINIMUM_BUCKET_SIZE);
         TSDebug(PLUGIN_NAME, "Enforcing minimum bucket size of %d", MINIMUM_BUCKET_SIZE);
@@ -221,7 +221,7 @@ class LRUPolicy : public PromotionPolicy
       }
       break;
     case 'h':
-      _hits = static_cast(strtol(optarg, NULL, 10));
+      _hits = static_cast(strtol(optarg, nullptr, 10));
       break;
     default:
       // All other options are unsupported for this policy
@@ -230,7 +230,7 @@ class LRUPolicy : public PromotionPolicy
 
     // This doesn't have to be perfect, since this is just chance sampling.
     // coverity[dont_call]
-    srand48((long)time(NULL) ^ (long)getpid() ^ (long)getppid());
+    srand48((long)time(nullptr) ^ (long)getpid() ^ (long)getppid());
 
     return true;
   }
@@ -240,7 +240,7 @@ class LRUPolicy : public PromotionPolicy
   {
     LRUHash hash;
     LRUMap::iterator map_it;
-    char *url   = NULL;
+    char *url   = nullptr;
     int url_len = 0;
     bool ret    = false;
     TSMBuffer request;
@@ -339,7 +339,7 @@ class LRUPolicy : public PromotionPolicy
 class PromotionConfig
 {
 public:
-  PromotionConfig() : _policy(NULL) {}
+  PromotionConfig() : _policy(nullptr) {}
   ~PromotionConfig() { delete _policy; }
   PromotionPolicy *
   getPolicy() const
@@ -352,7 +352,7 @@ class PromotionConfig
   factory(int argc, char *argv[])
   {
     while (true) {
-      int opt = getopt_long(argc, (char *const *)argv, "psbh", longopt, NULL);
+      int opt = getopt_long(argc, (char *const *)argv, "psbh", longopt, nullptr);
 
       if (opt == -1) {
         break;
@@ -377,7 +377,7 @@ class PromotionConfig
             if (!_policy->parseOption(opt, optarg)) {
               TSError("[%s] The specified policy (%s) does not support the -%c option", PLUGIN_NAME, _policy->policyName(), opt);
               delete _policy;
-              _policy = NULL;
+              _policy = nullptr;
               return false;
             }
           }
@@ -479,7 +479,7 @@ TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size)
     return TS_ERROR;
   }
 
-  gNocacheCont = TSContCreate(cont_nocache_response, NULL);
+  gNocacheCont = TSContCreate(cont_nocache_response, nullptr);
 
   TSDebug(PLUGIN_NAME, "remap plugin is successfully initialized");
   return TS_SUCCESS; /* success */
@@ -493,7 +493,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char * /* errbuf */, int /
   --argc;
   ++argv;
   if (config->factory(argc, argv)) {
-    TSCont contp = TSContCreate(cont_handle_policy, NULL);
+    TSCont contp = TSContCreate(cont_handle_policy, nullptr);
 
     TSContDataSet(contp, static_cast(config));
     *ih = static_cast(contp);
@@ -521,7 +521,7 @@ TSRemapDeleteInstance(void *ih)
 TSRemapStatus
 TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo * /* ATS_UNUSED rri */)
 {
-  if (NULL == ih) {
+  if (nullptr == ih) {
     TSDebug(PLUGIN_NAME, "No promotion rules configured, this is probably a plugin bug");
   } else {
     TSCont contp = static_cast(ih);
diff --git a/plugins/experimental/cache_range_requests/cache_range_requests.cc b/plugins/experimental/cache_range_requests/cache_range_requests.cc
index a3f761e21f6..a11003f4917 100644
--- a/plugins/experimental/cache_range_requests/cache_range_requests.cc
+++ b/plugins/experimental/cache_range_requests/cache_range_requests.cc
@@ -80,8 +80,8 @@ range_header_check(TSHttpTxn txnp)
   int length, url_length;
   struct txndata *txn_state;
   TSMBuffer hdr_bufp;
-  TSMLoc req_hdrs = NULL;
-  TSMLoc loc      = NULL;
+  TSMLoc req_hdrs = nullptr;
+  TSMLoc loc      = nullptr;
   TSCont txn_contp;
 
   if (TS_SUCCESS == TSHttpTxnClientReqGet(txnp, &hdr_bufp, &req_hdrs)) {
@@ -91,7 +91,7 @@ range_header_check(TSHttpTxn txnp)
       if (!hdr_value || length <= 0) {
         DEBUG_LOG("Not a range request.");
       } else {
-        if (NULL == (txn_contp = TSContCreate((TSEventFunc)transaction_handler, NULL))) {
+        if (nullptr == (txn_contp = TSContCreate((TSEventFunc)transaction_handler, nullptr))) {
           ERROR_LOG("failed to create the transaction handler continuation.");
         } else {
           txn_state              = (struct txndata *)TSmalloc(sizeof(struct txndata));
@@ -102,7 +102,7 @@ range_header_check(TSHttpTxn txnp)
           req_url = TSHttpTxnEffectiveUrlStringGet(txnp, &url_length);
           snprintf(cache_key_url, 8192, "%s-%s", req_url, txn_state->range_value);
           DEBUG_LOG("Rewriting cache URL for %s to %s", req_url, cache_key_url);
-          if (req_url != NULL) {
+          if (req_url != nullptr) {
             TSfree(req_url);
           }
 
@@ -126,7 +126,7 @@ range_header_check(TSHttpTxn txnp)
     } else {
       DEBUG_LOG("no range request header.");
     }
-    TSHandleMLocRelease(hdr_bufp, req_hdrs, NULL);
+    TSHandleMLocRelease(hdr_bufp, req_hdrs, nullptr);
   } else {
     DEBUG_LOG("failed to retrieve the server request");
   }
@@ -140,16 +140,16 @@ static void
 handle_send_origin_request(TSCont contp, TSHttpTxn txnp, struct txndata *txn_state)
 {
   TSMBuffer hdr_bufp;
-  TSMLoc req_hdrs = NULL;
+  TSMLoc req_hdrs = nullptr;
 
-  if (TS_SUCCESS == TSHttpTxnServerReqGet(txnp, &hdr_bufp, &req_hdrs) && txn_state->range_value != NULL) {
+  if (TS_SUCCESS == TSHttpTxnServerReqGet(txnp, &hdr_bufp, &req_hdrs) && txn_state->range_value != nullptr) {
     if (set_header(hdr_bufp, req_hdrs, TS_MIME_FIELD_RANGE, TS_MIME_LEN_RANGE, txn_state->range_value,
                    strlen(txn_state->range_value))) {
       DEBUG_LOG("Added range header: %s", txn_state->range_value);
       TSHttpTxnHookAdd(txnp, TS_HTTP_READ_RESPONSE_HDR_HOOK, contp);
     }
   }
-  TSHandleMLocRelease(hdr_bufp, req_hdrs, NULL);
+  TSHandleMLocRelease(hdr_bufp, req_hdrs, nullptr);
 }
 
 /**
@@ -163,14 +163,14 @@ handle_client_send_response(TSHttpTxn txnp, struct txndata *txn_state)
   char *p;
   int length;
   TSMBuffer response, hdr_bufp;
-  TSMLoc resp_hdr, req_hdrs = NULL;
+  TSMLoc resp_hdr, req_hdrs = nullptr;
 
   TSReturnCode result = TSHttpTxnClientRespGet(txnp, &response, &resp_hdr);
   DEBUG_LOG("result: %d", result);
   if (TS_SUCCESS == result) {
     TSHttpStatus status = TSHttpHdrStatusGet(response, resp_hdr);
     // a cached result will have a TS_HTTP_OK with a 'Partial Content' reason
-    if ((p = (char *)TSHttpHdrReasonGet(response, resp_hdr, &length)) != NULL) {
+    if ((p = (char *)TSHttpHdrReasonGet(response, resp_hdr, &length)) != nullptr) {
       if ((length == 15) && (0 == strncasecmp(p, "Partial Content", length))) {
         partial_content_reason = true;
       }
@@ -183,7 +183,7 @@ handle_client_send_response(TSHttpTxn txnp, struct txndata *txn_state)
     }
   }
   // add the range request header back in so that range requests may be logged.
-  if (TS_SUCCESS == TSHttpTxnClientReqGet(txnp, &hdr_bufp, &req_hdrs) && txn_state->range_value != NULL) {
+  if (TS_SUCCESS == TSHttpTxnClientReqGet(txnp, &hdr_bufp, &req_hdrs) && txn_state->range_value != nullptr) {
     if (set_header(hdr_bufp, req_hdrs, TS_MIME_FIELD_RANGE, TS_MIME_LEN_RANGE, txn_state->range_value,
                    strlen(txn_state->range_value))) {
       DEBUG_LOG("added range header: %s", txn_state->range_value);
@@ -193,8 +193,8 @@ handle_client_send_response(TSHttpTxn txnp, struct txndata *txn_state)
   } else {
     DEBUG_LOG("failed to get Request Headers");
   }
-  TSHandleMLocRelease(response, resp_hdr, NULL);
-  TSHandleMLocRelease(hdr_bufp, req_hdrs, NULL);
+  TSHandleMLocRelease(response, resp_hdr, nullptr);
+  TSHandleMLocRelease(hdr_bufp, req_hdrs, nullptr);
 }
 
 /**
@@ -215,7 +215,7 @@ handle_server_read_response(TSHttpTxn txnp, struct txndata *txn_state)
       DEBUG_LOG("Got TS_HTTP_STATUS_PARTIAL_CONTENT.");
       TSHttpHdrStatusSet(response, resp_hdr, TS_HTTP_STATUS_OK);
       DEBUG_LOG("Set response header to TS_HTTP_STATUS_OK.");
-      bool cacheable = TSHttpTxnIsCacheable(txnp, NULL, response);
+      bool cacheable = TSHttpTxnIsCacheable(txnp, nullptr, response);
       DEBUG_LOG("range is cacheable: %d", cacheable);
     } else if (TS_HTTP_STATUS_OK == status) {
       DEBUG_LOG("The origin does not support range requests, attempting to disable cache write.");
@@ -226,7 +226,7 @@ handle_server_read_response(TSHttpTxn txnp, struct txndata *txn_state)
       }
     }
   }
-  TSHandleMLocRelease(response, resp_hdr, NULL);
+  TSHandleMLocRelease(response, resp_hdr, nullptr);
 }
 
 /**
@@ -281,7 +281,7 @@ set_header(TSMBuffer bufp, TSMLoc hdr_loc, const char *header, int len, const ch
       TSHandleMLocRelease(bufp, hdr_loc, field_loc);
     }
   } else {
-    TSMLoc tmp = NULL;
+    TSMLoc tmp = nullptr;
     bool first = true;
 
     while (field_loc) {
@@ -370,7 +370,7 @@ TSPluginInit(int argc, const char *argv[])
     return;
   }
 
-  if (NULL == (txnp_cont = TSContCreate((TSEventFunc)handle_read_request_header, NULL))) {
+  if (nullptr == (txnp_cont = TSContCreate((TSEventFunc)handle_read_request_header, nullptr))) {
     ERROR_LOG("failed to create the transaction continuation handler.");
     return;
   } else {
@@ -398,10 +398,10 @@ transaction_handler(TSCont contp, TSEvent event, void *edata)
     handle_client_send_response(txnp, txn_state);
     break;
   case TS_EVENT_HTTP_TXN_CLOSE:
-    if (txn_state != NULL && txn_state->range_value != NULL) {
+    if (txn_state != nullptr && txn_state->range_value != nullptr) {
       TSfree(txn_state->range_value);
     }
-    if (txn_state != NULL) {
+    if (txn_state != nullptr) {
       TSfree(txn_state);
     }
     TSContDestroy(contp);
diff --git a/plugins/experimental/cachekey/cachekey.cc b/plugins/experimental/cachekey/cachekey.cc
index 5bb030e2b36..71af4a16e9f 100644
--- a/plugins/experimental/cachekey/cachekey.cc
+++ b/plugins/experimental/cachekey/cachekey.cc
@@ -235,7 +235,7 @@ getUri(TSMBuffer buf, TSMLoc url)
   String uri;
   int uriLen;
   const char *uriPtr = TSUrlStringGet(buf, url, &uriLen);
-  if (NULL != uriPtr && 0 != uriLen) {
+  if (nullptr != uriPtr && 0 != uriLen) {
     uri.assign(uriPtr, uriLen);
     TSfree((void *)uriPtr);
   } else {
@@ -268,7 +268,7 @@ CacheKey::appendPrefix(const String &prefix, Pattern &prefixCapture, Pattern &pr
 
   int hostLen;
   const char *hostPtr = TSUrlHostGet(_buf, _url, &hostLen);
-  if (NULL != hostPtr && 0 != hostLen) {
+  if (nullptr != hostPtr && 0 != hostLen) {
     host.assign(hostPtr, hostLen);
   } else {
     CacheKeyError("failed to get host");
@@ -330,7 +330,7 @@ CacheKey::appendPath(Pattern &pathCapture, Pattern &pathCaptureUri)
 
   int pathLen;
   const char *pathPtr = TSUrlPathGet(_buf, _url, &pathLen);
-  if (NULL != pathPtr && 0 != pathLen) {
+  if (nullptr != pathPtr && 0 != pathLen) {
     path.assign(pathPtr, pathLen);
   }
 
@@ -399,7 +399,7 @@ CacheKey::appendHeaders(const ConfigHeaders &config)
 
       for (int i = 0; i < count; ++i) {
         value = TSMimeHdrFieldValueStringGet(_buf, _hdrs, field, i, &vlen);
-        if (value == NULL || vlen == 0) {
+        if (value == nullptr || vlen == 0) {
           CacheKeyDebug("missing value %d for header %s", i, name_s.c_str());
           continue;
         }
@@ -448,7 +448,7 @@ CacheKey::appendCookies(const ConfigCookies &config)
       int len;
 
       value = TSMimeHdrFieldValueStringGet(_buf, _hdrs, field, i, &len);
-      if (value == NULL || len == 0) {
+      if (value == nullptr || len == 0) {
         continue;
       }
 
@@ -494,7 +494,7 @@ CacheKey::appendQuery(const ConfigQuery &config)
   int length;
 
   query = TSUrlHttpQueryGet(_buf, _url, &length);
-  if (query == NULL || length == 0) {
+  if (query == nullptr || length == 0) {
     return;
   }
 
diff --git a/plugins/experimental/cachekey/configs.cc b/plugins/experimental/cachekey/configs.cc
index 122b6557a34..b5fb65a191b 100644
--- a/plugins/experimental/cachekey/configs.cc
+++ b/plugins/experimental/cachekey/configs.cc
@@ -62,7 +62,7 @@ static void
 setPattern(MultiPattern &multiPattern, const char *arg)
 {
   Pattern *p = new Pattern();
-  if (NULL != p && p->init(arg)) {
+  if (nullptr != p && p->init(arg)) {
     multiPattern.add(p);
   } else {
     delete p;
@@ -266,7 +266,7 @@ Configs::loadClassifiers(const String &args, bool blacklist)
   } else {
     multiPattern = new MultiPattern(classname);
   }
-  if (NULL == multiPattern) {
+  if (nullptr == multiPattern) {
     CacheKeyError("failed to allocate classifier '%s'", classname.c_str());
     return false;
   }
@@ -291,7 +291,7 @@ Configs::loadClassifiers(const String &args, bool blacklist)
 
     p = new Pattern();
 
-    if (NULL != p && p->init(regex)) {
+    if (nullptr != p && p->init(regex)) {
       if (blacklist) {
         CacheKeyDebug("Added pattern '%s' to black list '%s'", regex.c_str(), classname.c_str());
         multiPattern->add(p);
@@ -325,23 +325,23 @@ bool
 Configs::init(int argc, char *argv[])
 {
   static const struct option longopt[] = {
-    {const_cast("exclude-params"), optional_argument, 0, 'a'},
-    {const_cast("include-params"), optional_argument, 0, 'b'},
-    {const_cast("include-match-params"), optional_argument, 0, 'c'},
-    {const_cast("exclude-match-params"), optional_argument, 0, 'd'},
-    {const_cast("sort-params"), optional_argument, 0, 'e'},
-    {const_cast("remove-all-params"), optional_argument, 0, 'f'},
-    {const_cast("include-headers"), optional_argument, 0, 'g'},
-    {const_cast("include-cookies"), optional_argument, 0, 'h'},
-    {const_cast("ua-capture"), optional_argument, 0, 'i'},
-    {const_cast("ua-whitelist"), optional_argument, 0, 'j'},
-    {const_cast("ua-blacklist"), optional_argument, 0, 'k'},
-    {const_cast("static-prefix"), optional_argument, 0, 'l'},
-    {const_cast("capture-prefix"), optional_argument, 0, 'm'},
-    {const_cast("capture-prefix-uri"), optional_argument, 0, 'n'},
-    {const_cast("capture-path"), optional_argument, 0, 'o'},
-    {const_cast("capture-path-uri"), optional_argument, 0, 'p'},
-    {0, 0, 0, 0},
+    {const_cast("exclude-params"), optional_argument, nullptr, 'a'},
+    {const_cast("include-params"), optional_argument, nullptr, 'b'},
+    {const_cast("include-match-params"), optional_argument, nullptr, 'c'},
+    {const_cast("exclude-match-params"), optional_argument, nullptr, 'd'},
+    {const_cast("sort-params"), optional_argument, nullptr, 'e'},
+    {const_cast("remove-all-params"), optional_argument, nullptr, 'f'},
+    {const_cast("include-headers"), optional_argument, nullptr, 'g'},
+    {const_cast("include-cookies"), optional_argument, nullptr, 'h'},
+    {const_cast("ua-capture"), optional_argument, nullptr, 'i'},
+    {const_cast("ua-whitelist"), optional_argument, nullptr, 'j'},
+    {const_cast("ua-blacklist"), optional_argument, nullptr, 'k'},
+    {const_cast("static-prefix"), optional_argument, nullptr, 'l'},
+    {const_cast("capture-prefix"), optional_argument, nullptr, 'm'},
+    {const_cast("capture-prefix-uri"), optional_argument, nullptr, 'n'},
+    {const_cast("capture-path"), optional_argument, nullptr, 'o'},
+    {const_cast("capture-path-uri"), optional_argument, nullptr, 'p'},
+    {nullptr, 0, nullptr, 0},
   };
 
   bool status = true;
@@ -352,7 +352,7 @@ Configs::init(int argc, char *argv[])
 
   for (;;) {
     int opt;
-    opt = getopt_long(argc, (char *const *)argv, "", longopt, NULL);
+    opt = getopt_long(argc, (char *const *)argv, "", longopt, nullptr);
 
     if (opt == -1) {
       break;
diff --git a/plugins/experimental/cachekey/pattern.cc b/plugins/experimental/cachekey/pattern.cc
index 8923a6e9567..abe41dd9168 100644
--- a/plugins/experimental/cachekey/pattern.cc
+++ b/plugins/experimental/cachekey/pattern.cc
@@ -38,7 +38,7 @@ replaceString(String &str, const String &from, const String &to)
   }
 }
 
-Pattern::Pattern() : _re(NULL), _extra(NULL), _pattern(""), _replacement(""), _tokenCount(0)
+Pattern::Pattern() : _re(nullptr), _extra(nullptr), _pattern(""), _replacement(""), _tokenCount(0)
 {
 }
 
@@ -131,7 +131,7 @@ Pattern::init(const String &config)
 bool
 Pattern::empty() const
 {
-  return _pattern.empty() || NULL == _re;
+  return _pattern.empty() || nullptr == _re;
 }
 
 /**
@@ -142,12 +142,12 @@ Pattern::pcreFree()
 {
   if (_re) {
     pcre_free(_re);
-    _re = NULL;
+    _re = nullptr;
   }
 
   if (_extra) {
     pcre_free(_extra);
-    _extra = NULL;
+    _extra = nullptr;
   }
 }
 
@@ -213,7 +213,7 @@ Pattern::match(const String &subject)
     return false;
   }
 
-  matchCount = pcre_exec(_re, _extra, subject.c_str(), subject.length(), 0, PCRE_NOTEMPTY, NULL, 0);
+  matchCount = pcre_exec(_re, _extra, subject.c_str(), subject.length(), 0, PCRE_NOTEMPTY, nullptr, 0);
   if (matchCount < 0) {
     if (matchCount != PCRE_ERROR_NOMATCH)
       CacheKeyError("matching error %d", matchCount);
@@ -240,7 +240,7 @@ Pattern::capture(const String &subject, StringVector &result)
     return false;
   }
 
-  matchCount = pcre_exec(_re, NULL, subject.c_str(), subject.length(), 0, PCRE_NOTEMPTY, ovector, OVECOUNT);
+  matchCount = pcre_exec(_re, nullptr, subject.c_str(), subject.length(), 0, PCRE_NOTEMPTY, ovector, OVECOUNT);
   if (matchCount < 0) {
     if (matchCount != PCRE_ERROR_NOMATCH)
       CacheKeyError("matching error %d", matchCount);
@@ -278,7 +278,7 @@ Pattern::replace(const String &subject, String &result)
     return false;
   }
 
-  matchCount = pcre_exec(_re, NULL, subject.c_str(), subject.length(), 0, PCRE_NOTEMPTY, ovector, OVECOUNT);
+  matchCount = pcre_exec(_re, nullptr, subject.c_str(), subject.length(), 0, PCRE_NOTEMPTY, ovector, OVECOUNT);
   if (matchCount < 0) {
     if (matchCount != PCRE_ERROR_NOMATCH)
       CacheKeyError("matching error %d", matchCount);
@@ -333,9 +333,9 @@ Pattern::compile()
                      0,                /* options */
                      &errPtr,          /* for error message */
                      &errOffset,       /* for error offset */
-                     NULL);            /* use default character tables */
+                     nullptr);         /* use default character tables */
 
-  if (NULL == _re) {
+  if (nullptr == _re) {
     CacheKeyError("compile of regex '%s' at char %d: %s", _pattern.c_str(), errOffset, errPtr);
 
     return false;
@@ -343,11 +343,11 @@ Pattern::compile()
 
   _extra = pcre_study(_re, 0, &errPtr);
 
-  if ((NULL == _extra) && (NULL != errPtr) && (0 != *errPtr)) {
+  if ((nullptr == _extra) && (nullptr != errPtr) && (0 != *errPtr)) {
     CacheKeyError("failed to study regex '%s': %s", _pattern.c_str(), errPtr);
 
     pcre_free(_re);
-    _re = NULL;
+    _re = nullptr;
     return false;
   }
 
@@ -431,7 +431,7 @@ bool
 MultiPattern::match(const String &subject) const
 {
   for (std::vector::const_iterator p = this->_list.begin(); p != this->_list.end(); ++p) {
-    if (NULL != (*p) && (*p)->match(subject)) {
+    if (nullptr != (*p) && (*p)->match(subject)) {
       return true;
     }
   }
diff --git a/plugins/experimental/cachekey/plugin.cc b/plugins/experimental/cachekey/plugin.cc
index e86fa5c33a7..23782644181 100644
--- a/plugins/experimental/cachekey/plugin.cc
+++ b/plugins/experimental/cachekey/plugin.cc
@@ -54,11 +54,11 @@ TSReturnCode
 TSRemapNewInstance(int argc, char *argv[], void **instance, char *errBuf, int errBufSize)
 {
   Configs *config = new Configs();
-  if (NULL != config && config->init(argc, argv)) {
+  if (nullptr != config && config->init(argc, argv)) {
     *instance = config;
   } else {
     CacheKeyError("failed to initialize the " PLUGIN_NAME " plugin");
-    *instance = NULL;
+    *instance = nullptr;
     delete config;
     return TS_ERROR;
   }
@@ -90,7 +90,7 @@ TSRemapDoRemap(void *instance, TSHttpTxn txn, TSRemapRequestInfo *rri)
 {
   Configs *config = (Configs *)instance;
 
-  if (NULL != config) {
+  if (nullptr != config) {
     /* Initial cache key facility from the requested URL. */
     CacheKey cachekey(txn, rri->requestBufp, rri->requestUrl, rri->requestHdrp);
 
diff --git a/plugins/experimental/collapsed_connection/collapsed_connection.cc b/plugins/experimental/collapsed_connection/collapsed_connection.cc
index 8dcc21c9345..e8e1eb74e06 100644
--- a/plugins/experimental/collapsed_connection/collapsed_connection.cc
+++ b/plugins/experimental/collapsed_connection/collapsed_connection.cc
@@ -130,9 +130,9 @@ initConfig(const char *fn)
   CcPluginConfig *config    = static_cast(TSmalloc(sizeof(CcPluginConfig)));
 
   // Default config
-  if (NULL == plugin_data || NULL == plugin_data->global_config) {
+  if (nullptr == plugin_data || nullptr == plugin_data->global_config) {
     config->enabled                = true;
-    config->required_header        = NULL;
+    config->required_header        = nullptr;
     config->insert_lock_retry_time = DEFAULT_INSERT_LOCK_RETRY_TIME;
     config->max_lock_retry_timeout = DEFAULT_MAX_LOCK_RETRY_TIMEOUT;
     config->keep_pass_record_time  = DEFAULT_KEEP_PASS_RECORD_TIME;
@@ -147,7 +147,7 @@ initConfig(const char *fn)
     config->keep_pass_record_time  = global_config->keep_pass_record_time;
   }
 
-  if (NULL != fn) {
+  if (nullptr != fn) {
     if (1 == strlen(fn)) {
       if (0 == strcmp("0", fn)) {
         config->enabled = false;
@@ -163,10 +163,10 @@ initConfig(const char *fn)
       CcConfigKey name;
       TSRecordDataType type, expected_type;
 
-      if (NULL == (file = TSfopen(fn, "r"))) {
+      if (nullptr == (file = TSfopen(fn, "r"))) {
         TSError("[collapsed_connection] Could not open config file %s", fn);
       } else {
-        while (NULL != TSfgets(file, buf, sizeof(buf))) {
+        while (nullptr != TSfgets(file, buf, sizeof(buf))) {
           char *ln, *tok;
           char *s = buf;
 
@@ -186,13 +186,13 @@ initConfig(const char *fn)
             continue;
           }
           // Find the configuration name
-          tok = strtok_r(NULL, " \t", &ln);
+          tok = strtok_r(nullptr, " \t", &ln);
           if (CcHttpTxnConfigFind(tok, -1, &name, &expected_type) != TS_SUCCESS) {
             TSError("[collapsed_connection] File %s, line %d: no records.config name given", fn, line_num);
             continue;
           }
           // Find the type (INT or STRING only)
-          tok = strtok_r(NULL, " \t", &ln);
+          tok = strtok_r(nullptr, " \t", &ln);
           if (TS_RECORDDATATYPE_NULL == (type = str_to_datatype(tok))) {
             TSError("[collapsed_connection] File %s, line %d: only INT and STRING types supported", fn, line_num);
             continue;
@@ -208,7 +208,7 @@ initConfig(const char *fn)
               ++ln;
             }
             if ('\0' == *ln) {
-              tok = NULL;
+              tok = nullptr;
             } else {
               tok = ln;
               while (*ln != '\0') {
@@ -222,7 +222,7 @@ initConfig(const char *fn)
               *ln = '\0';
             }
           } else {
-            tok = NULL;
+            tok = nullptr;
           }
           if (!tok) {
             TSError("[collapsed_connection] File %s, line %d: the configuration must provide a value", fn, line_num);
@@ -231,26 +231,26 @@ initConfig(const char *fn)
           // Now store the new config
           switch (name) {
           case CcRequiredHeader:
-            if (NULL != config->required_header) {
+            if (nullptr != config->required_header) {
               TSfree(config->required_header);
             }
             if (4 == strlen(tok) && 0 == strcmp(tok, "NULL")) {
-              config->required_header = NULL;
+              config->required_header = nullptr;
             } else {
               config->required_header = TSstrdup(tok);
             }
             break;
           case CcEnabled:
-            config->enabled = strtoll(tok, NULL, 10);
+            config->enabled = strtoll(tok, nullptr, 10);
             break;
           case CcInsertLockRetryTime:
-            config->insert_lock_retry_time = strtoll(tok, NULL, 10);
+            config->insert_lock_retry_time = strtoll(tok, nullptr, 10);
             break;
           case CcMaxLockRetryTimeout:
-            config->max_lock_retry_timeout = strtoll(tok, NULL, 10);
+            config->max_lock_retry_timeout = strtoll(tok, nullptr, 10);
             break;
           case CcKeepPassRecordTime:
-            config->keep_pass_record_time = strtoll(tok, NULL, 10);
+            config->keep_pass_record_time = strtoll(tok, nullptr, 10);
             break;
           default:
             break;
@@ -542,7 +542,7 @@ getCacheUrlHashKey(TSHttpTxn txnp, TSMBuffer bufp, TSMLoc /* hdr_loc ATS_UNUSED
 {
   TSMLoc url_loc = TS_NULL_MLOC;
   int url_len;
-  char *url         = NULL;
+  char *url         = nullptr;
   uint32_t hash_key = 0;
 
   if (TS_SUCCESS != TSUrlCreate(bufp, &url_loc)) {
@@ -583,12 +583,12 @@ isResponseCacheable(TSMBuffer bufp, TSMLoc hdr_loc)
   bool found_expire = false;
   TSMLoc field_loc  = TS_NULL_MLOC;
 
-  if (0 != (field_loc = TSMimeHdrFieldFind(bufp, hdr_loc, TS_MIME_FIELD_EXPIRES, TS_MIME_LEN_EXPIRES))) {
+  if (nullptr != (field_loc = TSMimeHdrFieldFind(bufp, hdr_loc, TS_MIME_FIELD_EXPIRES, TS_MIME_LEN_EXPIRES))) {
     found_expire = true;
     TSHandleMLocRelease(bufp, hdr_loc, field_loc);
   }
 
-  if (0 != (field_loc = TSMimeHdrFieldFind(bufp, hdr_loc, TS_MIME_FIELD_CACHE_CONTROL, TS_MIME_LEN_CACHE_CONTROL))) {
+  if (nullptr != (field_loc = TSMimeHdrFieldFind(bufp, hdr_loc, TS_MIME_FIELD_CACHE_CONTROL, TS_MIME_LEN_CACHE_CONTROL))) {
     int field_cnt = TSMimeHdrFieldValuesCount(bufp, hdr_loc, field_loc);
 
     for (int i = 0; i < field_cnt; i++) {
@@ -631,9 +631,9 @@ retryCacheUrlLock(TSCont contp, TSEvent /* event ATS_UNUSED */, void * /* edata
 {
   TryLockData *data = reinterpret_cast(TSContDataGet(contp));
   TSDebug(PLUGIN_NAME, "[%" PRIu64 "] event = %d retry", data->txn_data->seq_id, data->event);
-  collapsedConnectionMainHandler(NULL, data->event, data->txn_data->txnp);
+  collapsedConnectionMainHandler(nullptr, data->event, data->txn_data->txnp);
   TSfree(data);
-  TSContDataSet(contp, NULL);
+  TSContDataSet(contp, nullptr);
   TSContDestroy(contp);
 
   return 0;
@@ -651,7 +651,7 @@ retryCacheUrlLock(TSCont contp, TSEvent /* event ATS_UNUSED */, void * /* edata
 static void
 addMutexRetry(CcTxnData *txn_data, TSEvent event, TSHRTime timeout)
 {
-  TSCont contp      = TSContCreate(retryCacheUrlLock, NULL);
+  TSCont contp      = TSContCreate(retryCacheUrlLock, nullptr);
   TryLockData *data = static_cast(TSmalloc(sizeof(TryLockData)));
 
   data->event    = event;
@@ -675,15 +675,15 @@ static CcTxnData *
 getCcTxnData(TSHttpTxn txnp, bool create, bool remap)
 {
   CcPluginData *plugin_data = getCcPlugin();
-  CcTxnData *txn_data       = NULL;
+  CcTxnData *txn_data       = nullptr;
 
   txn_data = reinterpret_cast(TSHttpTxnArgGet(txnp, plugin_data->txn_slot));
-  if (NULL == txn_data && true == create) {
+  if (nullptr == txn_data && true == create) {
     txn_data            = static_cast(TSmalloc(sizeof(CcTxnData)));
     txn_data->config    = plugin_data->global_config;
     txn_data->seq_id    = plugin_data->seq_id++;
     txn_data->txnp      = txnp;
-    txn_data->contp     = NULL;
+    txn_data->contp     = nullptr;
     txn_data->hash_key  = 0;
     txn_data->cc_state  = CC_NONE;
     txn_data->wait_time = 0;
@@ -712,11 +712,11 @@ freeCcTxnData(CcTxnData *txn_data)
   CcPluginData *plugin_data = getCcPlugin();
 
   if (txn_data->contp) {
-    TSContDataSet(txn_data->contp, NULL);
+    TSContDataSet(txn_data->contp, nullptr);
     TSContDestroy(txn_data->contp);
   }
   if (txn_data->txnp) {
-    TSHttpTxnArgSet(txn_data->txnp, plugin_data->txn_slot, NULL);
+    TSHttpTxnArgSet(txn_data->txnp, plugin_data->txn_slot, nullptr);
     TSHttpTxnReenable(txn_data->txnp, TS_EVENT_HTTP_CONTINUE);
   }
   TSDebug(PLUGIN_NAME, "[%" PRIu64 "] txn_data released", txn_data->seq_id);
@@ -739,10 +739,10 @@ lookupAndTryLockCacheUrl(CcTxnData *txn_data, TSEvent event)
 
   if (0 == txn_data->hash_key) {
     // New request, check is GET method and gen hash_key
-    TSMBuffer bufp = (TSMBuffer)NULL;
+    TSMBuffer bufp = (TSMBuffer) nullptr;
     TSMLoc hdr_loc = TS_NULL_MLOC;
     int method_len;
-    const char *method = NULL;
+    const char *method = nullptr;
 
     if (TS_SUCCESS != TSHttpTxnClientReqGet(txn_data->txnp, &bufp, &hdr_loc)) {
       TSDebug(PLUGIN_NAME, "unable to get client request");
@@ -794,7 +794,7 @@ lookupAndTryLockCacheUrl(CcTxnData *txn_data, TSEvent event)
   } else if (CC_INSERT == ret) {
     if (!txn_data->contp) {
       // txn contp is already created from remap, but only global contp for global hook
-      txn_data->contp = TSContCreate(collapsedConnectionMainHandler, NULL);
+      txn_data->contp = TSContCreate(collapsedConnectionMainHandler, nullptr);
     }
     txn_data->cc_state = ret;
     TSHttpTxnHookAdd(txn_data->txnp, TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK, txn_data->contp);
@@ -821,7 +821,7 @@ lookupAndTryLockCacheUrl(CcTxnData *txn_data, TSEvent event)
 static TSReturnCode
 testResponseCacheable(CcTxnData *txn_data)
 {
-  TSMBuffer bufp = (TSMBuffer)NULL;
+  TSMBuffer bufp = (TSMBuffer) nullptr;
   TSMLoc hdr_loc = TS_NULL_MLOC;
   TSHttpStatus resp_status;
 
@@ -909,7 +909,7 @@ collapsedConnectionMainHandler(TSCont /* contp ATS_UNUSED */, TSEvent event, voi
   TSHttpTxn txnp      = reinterpret_cast(edata);
   CcTxnData *txn_data = getCcTxnData(txnp, TS_EVENT_HTTP_POST_REMAP == event, false);
 
-  if (NULL != txn_data) {
+  if (nullptr != txn_data) {
     TSDebug(PLUGIN_NAME, "[%" PRIu64 "], event = %d, txn_data-> hash_key = %u, cc_state = %d", txn_data->seq_id, event,
             txn_data->hash_key, txn_data->cc_state);
 
@@ -938,7 +938,7 @@ collapsedConnectionMainHandler(TSCont /* contp ATS_UNUSED */, TSEvent event, voi
     case TS_EVENT_HTTP_TXN_CLOSE:
       if (CC_DONE == txn_data->cc_state) {
         freeCcTxnData(txn_data);
-        txn_data = NULL;
+        txn_data = nullptr;
         TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);
       } else if (CC_PASS == txn_data->cc_state || CC_PASSED == txn_data->cc_state) {
         // keep pass sentinel for config->keep_pass_record_time
@@ -947,7 +947,7 @@ collapsedConnectionMainHandler(TSCont /* contp ATS_UNUSED */, TSEvent event, voi
             addMutexRetry(txn_data, event, 0);
           } else {
             freeCcTxnData(txn_data);
-            txn_data = NULL;
+            txn_data = nullptr;
           }
         } else {
           txn_data->cc_state = CC_REMOVE;
@@ -983,16 +983,16 @@ collapsedConnectionMainHandler(TSCont /* contp ATS_UNUSED */, TSEvent event, voi
 static CcPluginData *
 getCcPlugin()
 {
-  static CcPluginData *data = NULL;
+  static CcPluginData *data = nullptr;
 
-  if (NULL == data) {
+  if (nullptr == data) {
     TSMgmtInt read_while_writer = 0;
     data                        = static_cast(TSmalloc(sizeof(CcPluginData)));
     data->mutex                 = TSMutexCreate();
     data->active_hash_map       = new UintMap();
     data->keep_pass_list        = new UsecList();
     data->seq_id                = 0;
-    data->global_config         = NULL;
+    data->global_config         = nullptr;
     TSHttpArgIndexReserve(PLUGIN_NAME, "reserve txn_data slot", &(data->txn_slot));
 
     if (TS_SUCCESS == TSMgmtIntGet("proxy.config.cache.enable_read_while_writer", &read_while_writer) && read_while_writer > 0) {
@@ -1056,7 +1056,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *, int)
   if (argc > 2) {
     *ih = static_cast(initConfig(argv[2]));
   } else {
-    *ih = static_cast(initConfig(NULL));
+    *ih = static_cast(initConfig(nullptr));
   }
 
   return TS_SUCCESS;
@@ -1067,7 +1067,7 @@ TSRemapDeleteInstance(void *ih)
 {
   CcPluginConfig *config = static_cast(ih);
 
-  if (NULL != config->required_header) {
+  if (nullptr != config->required_header) {
     TSfree(config->required_header);
   }
 
@@ -1088,14 +1088,14 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo * /* rri ATS_UNUSED */
 
   if (!plugin_data->global_config || !plugin_data->global_config->enabled) {
     if (txn_data->config->enabled) {
-      TSCont contp = TSContCreate(collapsedConnectionMainHandler, NULL);
+      TSCont contp = TSContCreate(collapsedConnectionMainHandler, nullptr);
       TSHttpTxnHookAdd(txnp, TS_HTTP_POST_REMAP_HOOK, contp);
 
       txn_data->contp = contp;
       TSHttpTxnArgSet(txnp, plugin_data->txn_slot, txn_data);
     } else {
       // global & remap were both disabled
-      txn_data->txnp = NULL;
+      txn_data->txnp = nullptr;
       freeCcTxnData(txn_data);
     }
   } else {
@@ -1114,7 +1114,7 @@ TSPluginInit(int argc, const char *argv[])
 {
   TSPluginRegistrationInfo info;
   TSMgmtInt http_cache = 0;
-  TSCont contp         = NULL;
+  TSCont contp         = nullptr;
 
   info.plugin_name   = const_cast(PLUGIN_NAME);
   info.vendor_name   = const_cast(PLUGIN_VENDOR);
@@ -1130,7 +1130,7 @@ TSPluginInit(int argc, const char *argv[])
     return;
   }
 
-  if (!(contp = TSContCreate(collapsedConnectionMainHandler, NULL))) {
+  if (!(contp = TSContCreate(collapsedConnectionMainHandler, nullptr))) {
     TSError("[collapsed_connection] Could not create continuation");
     return;
   }
@@ -1139,7 +1139,7 @@ TSPluginInit(int argc, const char *argv[])
   if (argc > 1) {
     plugin_data->global_config = initConfig(argv[1]);
   } else {
-    plugin_data->global_config = initConfig(NULL);
+    plugin_data->global_config = initConfig(nullptr);
   }
 
   if (plugin_data->global_config->enabled) {
diff --git a/plugins/experimental/custom_redirect/custom_redirect.cc b/plugins/experimental/custom_redirect/custom_redirect.cc
index de69afa05de..0ebf5f8d0ce 100644
--- a/plugins/experimental/custom_redirect/custom_redirect.cc
+++ b/plugins/experimental/custom_redirect/custom_redirect.cc
@@ -34,7 +34,7 @@
 #include 
 #include 
 
-static char *redirect_url_header   = NULL;
+static char *redirect_url_header   = nullptr;
 static int redirect_url_header_len = 0;
 static int return_code             = TS_HTTP_STATUS_NONE;
 
@@ -155,6 +155,6 @@ TSPluginInit(int argc, const char *argv[])
     TSError("[custom_redirect] Plugin registration failed.");
   }
   TSError("[custom_redirect] Plugin registered successfully.");
-  TSCont mainCont = TSContCreate(plugin_main_handler, NULL);
+  TSCont mainCont = TSContCreate(plugin_main_handler, nullptr);
   TSHttpHookAdd(TS_HTTP_READ_RESPONSE_HDR_HOOK, mainCont);
 }
diff --git a/plugins/experimental/epic/epic.cc b/plugins/experimental/epic/epic.cc
index aeb0af3f7a9..fd397345f98 100644
--- a/plugins/experimental/epic/epic.cc
+++ b/plugins/experimental/epic/epic.cc
@@ -250,7 +250,7 @@ epic_name_is_valid(const char *name)
   // In practice the only metrics we have that are not OK are the
   // proxy.process.cache.frags_per_doc.3+ set. Let's just check for
   // that rather than regexing everything all the time.
-  return strchr(name, '+') == NULL;
+  return strchr(name, '+') == nullptr;
 }
 
 static void
@@ -260,8 +260,8 @@ epic_write_stats(TSRecordType /* rtype */, void *edata, int /* registered */, co
   epic_sample_context *sample = (epic_sample_context *)edata;
   const char *etype;
 
-  TSReleaseAssert(sample != NULL);
-  TSReleaseAssert(sample->sample_fp != NULL);
+  TSReleaseAssert(sample != nullptr);
+  TSReleaseAssert(sample->sample_fp != nullptr);
 
   if (!epic_name_is_valid(name)) {
     return;
@@ -323,10 +323,10 @@ epic_flush_stats(TSCont /* contp */, TSEvent /* event */, void * /* edata */)
   char path[MAXPATHLEN];
   epic_sample_context sample;
 
-  TSReleaseAssert(epic_prefix != NULL);
+  TSReleaseAssert(epic_prefix != nullptr);
   TSReleaseAssert(*epic_prefix != '\0');
 
-  sample.sample_time = time(NULL);
+  sample.sample_time = time(nullptr);
   debug("%s/trafficserver.%lld.%llu", epic_prefix, (long long)sample.sample_time, (unsigned long long)getpid());
   if (gethostname(sample.sample_host, sizeof(sample.sample_host)) == -1) {
     error("gethostname() failed: %s", strerror(errno));
@@ -339,7 +339,7 @@ epic_flush_stats(TSCont /* contp */, TSEvent /* event */, void * /* edata */)
   // XXX track the file size and preallocate ...
 
   sample.sample_fp = fopen(path, "w");
-  if (sample.sample_fp == NULL) {
+  if (sample.sample_fp == nullptr) {
     error("failed to create %s: %s", path, strerror(errno));
     return 0;
   }
@@ -357,9 +357,9 @@ void
 TSPluginInit(int argc, const char *argv[])
 {
   static const struct option longopts[] = {
-    {const_cast("directory"), required_argument, NULL, 'd'},
-    {const_cast("period"), required_argument, NULL, 'p'},
-    {NULL, 0, NULL, 0},
+    {const_cast("directory"), required_argument, nullptr, 'd'},
+    {const_cast("period"), required_argument, nullptr, 'p'},
+    {nullptr, 0, nullptr, 0},
   };
 
   TSPluginRegistrationInfo info;
@@ -376,7 +376,7 @@ TSPluginInit(int argc, const char *argv[])
   epic_prefix = TSstrdup("/usr/local/epic/cache/eapi");
 
   for (;;) {
-    int opt = getopt_long(argc, (char *const *)argv, "p:d:", longopts, NULL);
+    int opt = getopt_long(argc, (char *const *)argv, "p:d:", longopts, nullptr);
 
     if (opt == -1) {
       break; /* done */
diff --git a/plugins/experimental/escalate/escalate.cc b/plugins/experimental/escalate/escalate.cc
index 1885dc2eed3..142de29f85c 100644
--- a/plugins/experimental/escalate/escalate.cc
+++ b/plugins/experimental/escalate/escalate.cc
@@ -53,7 +53,7 @@ struct EscalationState {
 
   EscalationState() : use_pristine(false)
   {
-    cont = TSContCreate(EscalateResponse, NULL);
+    cont = TSContCreate(EscalateResponse, nullptr);
     TSContDataSet(cont, this);
   }
 
@@ -68,7 +68,7 @@ struct EscalationState {
 char *
 MakeEscalateUrl(TSMBuffer mbuf, TSMLoc url, const char *host, size_t host_len, int &url_len)
 {
-  char *url_str = NULL;
+  char *url_str = nullptr;
 
   // Update the request URL with the new Host to try.
   TSUrlHostSet(mbuf, url, host, host_len);
@@ -90,7 +90,7 @@ EscalateResponse(TSCont cont, TSEvent event, void *edata)
   TSMBuffer mbuf;
   TSMLoc hdrp, url;
   TSHttpStatus status;
-  char *url_str = NULL;
+  char *url_str = nullptr;
   int url_len, tries;
 
   TSAssert(event == TS_EVENT_HTTP_READ_RESPONSE_HDR);
@@ -171,7 +171,7 @@ TSRemapNewInstance(int argc, char *argv[], void **instance, char *errbuf, int er
     } else {
       // Each token should be a status code then a URL, separated by ':'.
       sep = strchr(argv[i], ':');
-      if (sep == NULL) {
+      if (sep == nullptr) {
         snprintf(errbuf, errbuf_size, "malformed status:target config: %s", argv[i]);
         goto fail;
       }
@@ -191,8 +191,8 @@ TSRemapNewInstance(int argc, char *argv[], void **instance, char *errbuf, int er
         TSDebug(PLUGIN_NAME, "Creating Redirect rule with Host = %s", sep);
       }
 
-      for (token = strtok_r(argv[i], ",", &save); token; token = strtok_r(NULL, ",", &save)) {
-        unsigned status = strtol(token, NULL, 10);
+      for (token = strtok_r(argv[i], ",", &save); token; token = strtok_r(nullptr, ",", &save)) {
+        unsigned status = strtol(token, nullptr, 10);
 
         if (status < 100 || status > 599) {
           snprintf(errbuf, errbuf_size, "invalid status code: %.*s", (int)std::distance(argv[i], sep), argv[i]);
diff --git a/plugins/experimental/geoip_acl/acl.cc b/plugins/experimental/geoip_acl/acl.cc
index 77b69821215..17dcbad14e2 100644
--- a/plugins/experimental/geoip_acl/acl.cc
+++ b/plugins/experimental/geoip_acl/acl.cc
@@ -174,11 +174,11 @@ RegexAcl::compile(const std::string &str, const char *filename, int lineno)
   int erroffset;
 
   _regex_s = str;
-  _rex     = pcre_compile(_regex_s.c_str(), 0, &error, &erroffset, NULL);
+  _rex     = pcre_compile(_regex_s.c_str(), 0, &error, &erroffset, nullptr);
 
-  if (NULL != _rex) {
+  if (nullptr != _rex) {
     _extra = pcre_study(_rex, 0, &error);
-    if ((NULL == _extra) && error && (*error != 0)) {
+    if ((nullptr == _extra) && error && (*error != 0)) {
       TSError("[%s] Failed to study regular expression in %s:line %d at offset %d: %s", PLUGIN_NAME, filename, lineno, erroffset,
               error);
       return false;
@@ -194,7 +194,7 @@ RegexAcl::compile(const std::string &str, const char *filename, int lineno)
 void
 RegexAcl::append(RegexAcl *ra)
 {
-  if (NULL == _next) {
+  if (nullptr == _next) {
     _next = ra;
   } else {
     RegexAcl *cur = _next;
@@ -230,14 +230,14 @@ CountryAcl::read_regex(const char *fn, int &tokens)
   f.open(fn, std::ios::in);
   if (f.is_open()) {
     std::string line;
-    RegexAcl *acl = NULL;
+    RegexAcl *acl = nullptr;
 
     while (!f.eof()) {
       getline(f, line);
       ++lineno;
       acl = new RegexAcl(new CountryAcl());
       if (acl->parse_line(fn, line, lineno, tokens)) {
-        if (NULL == _regexes) {
+        if (nullptr == _regexes) {
           _regexes = acl;
         } else {
           _regexes->append(acl);
@@ -263,7 +263,7 @@ CountryAcl::eval(TSRemapRequestInfo *rri, TSHttpTxn txnp) const
   // If there are regex rules, they take priority first. If a regex matches, we will
   // honor it's eval() rule. If no regexes matches, fall back on the default (which is
   // "allow" if nothing else is specified).
-  if (NULL != _regexes) {
+  if (nullptr != _regexes) {
     RegexAcl *acl = _regexes;
     int path_len;
     const char *path = TSUrlPathGet(rri->requestBufp, rri->requestUrl, &path_len);
diff --git a/plugins/experimental/geoip_acl/geoip_acl.cc b/plugins/experimental/geoip_acl/geoip_acl.cc
index 1e5788e91b2..6c17343a9a1 100644
--- a/plugins/experimental/geoip_acl/geoip_acl.cc
+++ b/plugins/experimental/geoip_acl/geoip_acl.cc
@@ -60,7 +60,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char * /* errbuf */, int /
     TSError("[%s] Unable to create remap instance, need more parameters", PLUGIN_NAME);
     return TS_ERROR;
   } else {
-    Acl *a = NULL;
+    Acl *a = nullptr;
 
     // ToDo: Should do better processing here, to make it easier to deal with
     // rules other then country codes.
@@ -99,7 +99,7 @@ TSRemapDeleteInstance(void *ih)
 TSRemapStatus
 TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri)
 {
-  if (NULL == ih) {
+  if (nullptr == ih) {
     TSDebug(PLUGIN_NAME, "No ACLs configured, this is probably a plugin bug");
   } else {
     Acl *a = static_cast(ih);
diff --git a/plugins/experimental/header_freq/header_freq.cc b/plugins/experimental/header_freq/header_freq.cc
index 3f478bbb513..f8520fbebc6 100644
--- a/plugins/experimental/header_freq/header_freq.cc
+++ b/plugins/experimental/header_freq/header_freq.cc
@@ -222,7 +222,7 @@ TSPluginInit(int argc, const char *argv[])
   }
 
   TSCont contp = TSContCreate(handle_hook, TSMutexCreate());
-  if (contp == NULL) {
+  if (contp == nullptr) {
     // Continuation initialization failed. Unrecoverable, report and exit.
     TSError("[%s](%s) could not create continuation", PLUGIN_NAME, __FUNCTION__);
     abort();
diff --git a/plugins/experimental/header_normalize/header_normalize.cc b/plugins/experimental/header_normalize/header_normalize.cc
index 75755bf742c..5af6fbf8e30 100644
--- a/plugins/experimental/header_normalize/header_normalize.cc
+++ b/plugins/experimental/header_normalize/header_normalize.cc
@@ -191,7 +191,7 @@ read_request_hook(TSCont /* contp */, TSEvent /* event */, void *edata)
     TSDebug(PLUGIN_NAME, "*** Camel Casing %u hdrs in the request", n_mime_headers);
 
     for (int i = 0; i < n_mime_headers; ++i) {
-      if (hdr == NULL) {
+      if (hdr == nullptr) {
         break;
       }
       next_hdr = TSMimeHdrFieldNext(hdr_bufp, req_hdrs, hdr);
@@ -249,7 +249,7 @@ TSPluginInit(int /* argc */, const char * /* argv[] */)
   TSDebug(PLUGIN_NAME, "initializing plugin");
   TSCont contp;
   buildHdrMap();
-  contp = TSContCreate(read_request_hook, NULL);
+  contp = TSContCreate(read_request_hook, nullptr);
   TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, contp);
 }
 
@@ -259,6 +259,6 @@ TSPluginInit(int /* argc */, const char * /* argv[] */)
 TSRemapStatus
 TSRemapDoRemap(void * /* ih */, TSHttpTxn rh, TSRemapRequestInfo * /* rri */)
 {
-  read_request_hook(NULL, TS_EVENT_HTTP_READ_REQUEST_HDR, rh);
+  read_request_hook(nullptr, TS_EVENT_HTTP_READ_REQUEST_HDR, rh);
   return TSREMAP_DID_REMAP;
 }
diff --git a/plugins/experimental/hipes/hipes.cc b/plugins/experimental/hipes/hipes.cc
index ced867cf295..b1a0516b17f 100644
--- a/plugins/experimental/hipes/hipes.cc
+++ b/plugins/experimental/hipes/hipes.cc
@@ -104,7 +104,7 @@ unescapify(const char *src, char *dst, int len)
       subStr[0] = *(++cur);
       subStr[1] = *(++cur);
       len -= 2;
-      *dst = (char)strtol(subStr, (char **)NULL, 16);
+      *dst = (char)strtol(subStr, (char **)nullptr, 16);
     } else {
       *dst = *cur;
     }
@@ -186,7 +186,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char * /* errbuf ATS_UNUSE
 
   *ih = (void *)ri;
 
-  if (ri == NULL) {
+  if (ri == nullptr) {
     TSError("[hipes] Unable to create remap instance");
     return TS_ERROR;
   }
@@ -269,7 +269,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri)
   char redirect_url[MAX_REDIRECT_URL];
   int redirect_url_size;
 
-  if (NULL == h_conf) {
+  if (nullptr == h_conf) {
     TSDebug(PLUGIN_NAME, "Falling back to default URL on URL remap without rules");
     return TSREMAP_NO_REMAP;
   }
@@ -362,7 +362,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri)
     if (pos) {
       ++pos;
       if ((new_query_size - (pos - new_query)) < 10) { // redirect=n
-        pos = NULL;
+        pos = nullptr;
       } else {
         if ((*pos == 'r') && (!strncmp(pos, "redirect=", 9))) {
           redirect_flag = *(pos + 9) - '0';
@@ -370,7 +370,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri)
             redirect_flag = h_conf->default_redirect_flag;
           }
           TSDebug(PLUGIN_NAME, "Found _redirect flag in URL: %d", redirect_flag);
-          pos = NULL;
+          pos = nullptr;
         }
       }
     }
diff --git a/plugins/experimental/inliner/ats-inliner.cc b/plugins/experimental/inliner/ats-inliner.cc
index a5d9c393c2b..164e174c0b1 100644
--- a/plugins/experimental/inliner/ats-inliner.cc
+++ b/plugins/experimental/inliner/ats-inliner.cc
@@ -44,8 +44,8 @@ struct MyData {
   MyData(const TSIOBufferReader r, const TSVConn v)
     : handler(r, ats::io::IOSink::Create(TSTransformOutputVConnGet(v), TSContMutexGet(v), timeout))
   {
-    assert(r != NULL);
-    assert(v != NULL);
+    assert(r != nullptr);
+    assert(v != nullptr);
   }
 };
 
@@ -58,7 +58,7 @@ handle_transform(const TSCont c)
 
   if (!TSVIOBufferGet(vio)) {
     TSVConnShutdown(c, 1, 0);
-    TSContDataSet(c, NULL);
+    TSContDataSet(c, nullptr);
     delete data;
     return;
   }
@@ -89,7 +89,7 @@ handle_transform(const TSCont c)
   } else {
     TSContCall(TSVIOContGet(vio), TS_EVENT_VCONN_WRITE_COMPLETE, vio);
     TSVConnShutdown(c, 1, 0);
-    TSContDataSet(c, NULL);
+    TSContDataSet(c, nullptr);
     delete data;
   }
 }
@@ -100,8 +100,8 @@ inliner_transform(TSCont c, TSEvent e, void *)
   if (TSVConnClosedGet(c)) {
     TSDebug(PLUGIN_TAG, "connection closed");
     MyData *const data = static_cast(TSContDataGet(c));
-    if (data != NULL) {
-      TSContDataSet(c, NULL);
+    if (data != nullptr) {
+      TSContDataSet(c, nullptr);
       data->handler.abort();
       delete data;
     }
@@ -110,7 +110,7 @@ inliner_transform(TSCont c, TSEvent e, void *)
     switch (e) {
     case TS_EVENT_ERROR: {
       const TSVIO vio = TSVConnWriteVIOGet(c);
-      assert(vio != NULL);
+      assert(vio != nullptr);
       TSContCall(TSVIOContGet(vio), TS_EVENT_ERROR, vio);
     } break;
 
@@ -134,8 +134,8 @@ transformable(TSHttpTxn txnp)
   TSMBuffer buffer;
   TSMLoc location;
   CHECK(TSHttpTxnServerRespGet(txnp, &buffer, &location));
-  assert(buffer != NULL);
-  assert(location != NULL);
+  assert(buffer != nullptr);
+  assert(location != nullptr);
 
   returnValue = TSHttpHdrStatusGet(buffer, location) == TS_HTTP_STATUS_OK;
 
@@ -147,7 +147,7 @@ transformable(TSHttpTxn txnp)
       int length                = 0;
       const char *const content = TSMimeHdrFieldValueStringGet(buffer, location, field, 0, &length);
 
-      if (content != NULL && length > 0) {
+      if (content != nullptr && length > 0) {
         returnValue = strncasecmp(content, "text/html", 9) == 0;
       }
 
@@ -164,9 +164,9 @@ transformable(TSHttpTxn txnp)
 void
 transform_add(const TSHttpTxn t)
 {
-  assert(t != NULL);
+  assert(t != nullptr);
   const TSVConn vconnection = TSTransformCreate(inliner_transform, t);
-  assert(vconnection != NULL);
+  assert(vconnection != nullptr);
   TSHttpTxnHookAdd(t, TS_HTTP_RESPONSE_TRANSFORM_HOOK, vconnection);
 }
 
@@ -174,7 +174,7 @@ int
 transform_plugin(TSCont, TSEvent e, void *d)
 {
   assert(TS_EVENT_HTTP_READ_RESPONSE_HDR == e);
-  assert(d != NULL);
+  assert(d != nullptr);
 
   const TSHttpTxn transaction = static_cast(d);
 
@@ -209,7 +209,7 @@ TSPluginInit(int, const char **)
     goto error;
   }
 
-  TSHttpHookAdd(TS_HTTP_READ_RESPONSE_HDR_HOOK, TSContCreate(transform_plugin, NULL));
+  TSHttpHookAdd(TS_HTTP_READ_RESPONSE_HDR_HOOK, TSContCreate(transform_plugin, nullptr));
   return;
 
 error:
diff --git a/plugins/experimental/inliner/cache.cc b/plugins/experimental/inliner/cache.cc
index 9ed69a0db87..cb6ad6f815b 100644
--- a/plugins/experimental/inliner/cache.cc
+++ b/plugins/experimental/inliner/cache.cc
@@ -34,8 +34,8 @@ namespace cache
   write(const std::string &k, std::string &&s)
   {
     Key key(k);
-    TSCont continuation = TSContCreate(Write::handle, NULL);
-    assert(continuation != NULL);
+    TSCont continuation = TSContCreate(Write::handle, nullptr);
+    assert(continuation != nullptr);
     TSContDataSet(continuation, new Write(std::move(s)));
     TSCacheWrite(continuation, key.key());
   }
@@ -43,28 +43,28 @@ namespace cache
   int
   Write::handle(TSCont c, TSEvent e, void *v)
   {
-    assert(c != NULL);
+    assert(c != nullptr);
     Write *const self = static_cast(TSContDataGet(c));
-    assert(self != NULL);
+    assert(self != nullptr);
     switch (e) {
     case TS_EVENT_CACHE_OPEN_WRITE:
-      assert(v != NULL);
+      assert(v != nullptr);
       self->vconnection_ = static_cast(v);
-      assert(self->out_ == NULL);
+      assert(self->out_ == nullptr);
       self->out_ = io::IO::write(self->vconnection_, c, self->content_.size());
       break;
     case TS_EVENT_CACHE_OPEN_WRITE_FAILED:
       TSDebug(PLUGIN_TAG, "write failed");
       delete self;
-      TSContDataSet(c, NULL);
+      TSContDataSet(c, nullptr);
       TSContDestroy(c);
       break;
     case TS_EVENT_VCONN_WRITE_COMPLETE:
       TSDebug(PLUGIN_TAG, "write completed");
-      assert(self->vconnection_ != NULL);
+      assert(self->vconnection_ != nullptr);
       TSVConnClose(self->vconnection_);
       delete self;
-      TSContDataSet(c, NULL);
+      TSContDataSet(c, nullptr);
       TSContDestroy(c);
       break;
     case TS_EVENT_VCONN_WRITE_READY:
diff --git a/plugins/experimental/inliner/chunk-decoder.cc b/plugins/experimental/inliner/chunk-decoder.cc
index 8d72ff88804..0a458ce5408 100644
--- a/plugins/experimental/inliner/chunk-decoder.cc
+++ b/plugins/experimental/inliner/chunk-decoder.cc
@@ -66,7 +66,7 @@ ChunkDecoder::parseSizeCharacter(const char a)
 int
 ChunkDecoder::parseSize(const char *p, const int64_t s)
 {
-  assert(p != NULL);
+  assert(p != nullptr);
   int length = 0;
   while (state_ != State::kData && *p != '\0' && length < s) {
     assert(state_ < State::kUpperBound); // VALID RANGE
@@ -120,7 +120,7 @@ ChunkDecoder::isSizeState(void) const
 int
 ChunkDecoder::decode(const TSIOBufferReader &r)
 {
-  assert(r != NULL);
+  assert(r != nullptr);
 
   if (state_ == State::kEnd) {
     return 0;
@@ -138,9 +138,9 @@ ChunkDecoder::decode(const TSIOBufferReader &r)
   TSIOBufferBlock block = TSIOBufferReaderStart(r);
 
   if (isSizeState()) {
-    while (block != NULL && size_ == 0) {
+    while (block != nullptr && size_ == 0) {
       const char *p = TSIOBufferBlockReadStart(block, r, &size);
-      assert(p != NULL);
+      assert(p != nullptr);
       const int i = parseSize(p, size);
       size -= i;
       TSIOBufferReaderConsume(r, i);
@@ -157,9 +157,9 @@ ChunkDecoder::decode(const TSIOBufferReader &r)
 
   int length = 0;
 
-  while (block != NULL && state_ == State::kData) {
+  while (block != nullptr && state_ == State::kData) {
     const char *p = TSIOBufferBlockReadStart(block, r, &size);
-    if (p != NULL) {
+    if (p != nullptr) {
       if (size > size_) {
         length += size_;
         size_  = 0;
diff --git a/plugins/experimental/inliner/fetcher.cc b/plugins/experimental/inliner/fetcher.cc
index b1e7553551a..644c0bc82e7 100644
--- a/plugins/experimental/inliner/fetcher.cc
+++ b/plugins/experimental/inliner/fetcher.cc
@@ -47,10 +47,10 @@ namespace ats
 void
 HttpParser::destroyParser(void)
 {
-  if (parser_ != NULL) {
+  if (parser_ != nullptr) {
     TSHttpParserClear(parser_);
     TSHttpParserDestroy(parser_);
-    parser_ = NULL;
+    parser_ = nullptr;
   }
 }
 
@@ -61,7 +61,7 @@ HttpParser::parse(io::IO &io)
     return true;
   }
   TSIOBufferBlock block = TSIOBufferReaderStart(io.reader);
-  while (block != NULL) {
+  while (block != nullptr) {
     int64_t size            = 0;
     const char *const begin = TSIOBufferBlockReadStart(block, io.reader, &size);
     const char *iterator    = begin;
@@ -71,7 +71,7 @@ HttpParser::parse(io::IO &io)
 
     if (parsed_) {
       TSDebug(PLUGIN_TAG, "HttpParser: response parsing is complete (%u response status code)", statusCode());
-      assert(parser_ != NULL);
+      assert(parser_ != nullptr);
       destroyParser();
       return true;
     }
diff --git a/plugins/experimental/inliner/inliner-handler.cc b/plugins/experimental/inliner/inliner-handler.cc
index 866730e62a7..dbebdf310f6 100644
--- a/plugins/experimental/inliner/inliner-handler.cc
+++ b/plugins/experimental/inliner/inliner-handler.cc
@@ -40,7 +40,7 @@ namespace inliner
     assert(sink_->data_);
     assert(sink2_);
     assert(sink2_->data_);
-    assert(reader_ != NULL);
+    assert(reader_ != nullptr);
     *sink_ << "