From 648f813f8c89e6e7d0ed5bda2c2149bee2babb09 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 22 Jul 2022 18:33:38 +0100 Subject: Switch from NULL to nullptr. --- src/inspircd.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index ddad6cfc7..f7b08baab 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -62,7 +62,7 @@ # include #endif -InspIRCd* ServerInstance = NULL; +InspIRCd* ServerInstance = nullptr; /** Separate from the other casemap tables so that code *can* still exclusively rely on RFC casemapping * if it must. @@ -154,7 +154,7 @@ namespace if (!SetGroup.empty()) { errno = 0; - if (setgroups(0, NULL) == -1) + if (setgroups(0, nullptr) == -1) { ServerInstance->Logs.Normal("STARTUP", "setgroups() failed (wtf?): %s", strerror(errno)); InspIRCd::QuickExit(EXIT_STATUS_CONFIG); @@ -199,7 +199,7 @@ namespace { #ifdef _WIN32 TCHAR configPath[MAX_PATH + 1]; - if (GetFullPathName(path, MAX_PATH, configPath, NULL) > 0) + if (GetFullPathName(path, MAX_PATH, configPath, nullptr) > 0) return configPath; #else char configPath[PATH_MAX + 1]; @@ -523,7 +523,7 @@ InspIRCd::InspIRCd(int argc, char** argv) * a separate thread */ this->Config->Read(); - this->Config->Apply(NULL, ""); + this->Config->Apply(nullptr, ""); try { @@ -636,11 +636,11 @@ void InspIRCd::UpdateTime() SYSTEMTIME st; GetSystemTime(&st); - TIME.tv_sec = time(NULL); + TIME.tv_sec = time(nullptr); TIME.tv_nsec = st.wMilliseconds; #else struct timeval tv; - gettimeofday(&tv, NULL); + gettimeofday(&tv, nullptr); TIME.tv_sec = tv.tv_sec; TIME.tv_nsec = tv.tv_usec * 1000; -- cgit v1.3.1-10-gc9f91