diff options
| author | Ed Tanous <ed.tanous@intel.com> | 2019-10-24 11:12:47 -0700 |
|---|---|---|
| committer | James Feist <james.feist@linux.intel.com> | 2019-11-11 20:33:48 +0000 |
| commit | 99131cd04bfc4a187e7a8d63803cb8911e64a08e (patch) | |
| tree | c85b64c16b541561965f014d6e850279da04d3db /http | |
| parent | a9cbc9cd3c957996831d731ad50c69f920ab065b (diff) | |
| download | bmcweb-99131cd04bfc4a187e7a8d63803cb8911e64a08e.tar.gz bmcweb-99131cd04bfc4a187e7a8d63803cb8911e64a08e.zip | |
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
Diffstat (limited to 'http')
| -rw-r--r-- | http/http_server.h | 2 | ||||
| -rw-r--r-- | http/logging.h | 2 | ||||
| -rw-r--r-- | http/query_string.h | 8 |
3 files changed, 6 insertions, 6 deletions
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 @@ class Server 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 @@ class logger { 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 @@ inline size_t qsParse(char* qs, char* qs_kv[], size_t qs_kv_size) 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 @@ inline char* qsK2v(const char* key, char* const* qs_kv, int qs_kv_size, } #endif // _qsSORTING - return NULL; + return nullptr; } inline char* qsScanvalue(const char* key, const char* qs, char* val, @@ -265,7 +265,7 @@ inline char* qsScanvalue(const char* key, const char* qs, char* val, 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 @@ inline char* qsScanvalue(const char* key, const char* qs, char* val, if (qs[0] == '\0') { - return NULL; + return nullptr; } qs += strcspn(qs, "=&#"); |

