Replace all uses of NULL with nullptr
This was an automatic change made by clang-tidy. It moves all uses of
NULL to nullptr, which are equivalent, but nullptr is prefered.
Tested: Code compiles.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I9526599b222693c9723a69934b599c7a5b5d1fbf
diff --git a/http/http_server.h b/http/http_server.h
index 82ba9d0..df42214 100644
--- a/http/http_server.h
+++ b/http/http_server.h
@@ -95,7 +95,7 @@
void updateDateStr()
{
- time_t lastTimeT = time(0);
+ time_t lastTimeT = time(nullptr);
tm myTm{};
gmtime_r(&lastTimeT, &myTm);
diff --git a/http/logging.h b/http/logging.h
index a608f1f..eb04cc1 100644
--- a/http/logging.h
+++ b/http/logging.h
@@ -27,7 +27,7 @@
{
std::string date;
date.resize(32, '\0');
- time_t t = time(0);
+ time_t t = time(nullptr);
tm myTm{};
diff --git a/http/query_string.h b/http/query_string.h
index 959eb68..10753ac 100644
--- a/http/query_string.h
+++ b/http/query_string.h
@@ -138,7 +138,7 @@
for (i = 0; i < qs_kv_size; i++)
{
- qs_kv[i] = NULL;
+ qs_kv[i] = nullptr;
}
// find the beginning of the k/v substrings or the fragment
@@ -255,7 +255,7 @@
}
#endif // _qsSORTING
- return NULL;
+ return nullptr;
}
inline char* qsScanvalue(const char* key, const char* qs, char* val,
@@ -265,7 +265,7 @@
const char* tmp;
// find the beginning of the k/v substrings
- if ((tmp = strchr(qs, '?')) != NULL)
+ if ((tmp = strchr(qs, '?')) != nullptr)
{
qs = tmp + 1;
}
@@ -282,7 +282,7 @@
if (qs[0] == '\0')
{
- return NULL;
+ return nullptr;
}
qs += strcspn(qs, "=&#");