summaryrefslogtreecommitdiff
path: root/src/mongo/util/net/sock.cpp
diff options
context:
space:
mode:
authorA. Jesse Jiryu Davis <jesse@mongodb.com>2019-06-14 16:42:10 -0400
committerA. Jesse Jiryu Davis <jesse@mongodb.com>2019-06-14 19:23:18 -0400
commit47b380f03e8898f4706ff01fa2be64dfb72e0dba (patch)
treefb3508758c9abd0e297afee43ac847bf5aebcbbb /src/mongo/util/net/sock.cpp
parentb3c26131f6ab3f919beca658341e737de5d45683 (diff)
downloadmongo-47b380f03e8898f4706ff01fa2be64dfb72e0dba.tar.gz
SERVER-41071 Replace NULL and 0 with nullptr
Diffstat (limited to 'src/mongo/util/net/sock.cpp')
-rw-r--r--src/mongo/util/net/sock.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/util/net/sock.cpp b/src/mongo/util/net/sock.cpp
index 6d7b2d1e8f7..bb616b4452e 100644
--- a/src/mongo/util/net/sock.cpp
+++ b/src/mongo/util/net/sock.cpp
@@ -190,7 +190,7 @@ Socket::Socket(int fd, const SockAddr& remote)
: _fd(fd),
_remote(remote),
_timeout(0),
- _lastValidityCheckAtSecs(time(0)),
+ _lastValidityCheckAtSecs(time(nullptr)),
_logLevel(logger::LogSeverity::Log()) {
_init();
if (fd >= 0) {
@@ -201,7 +201,7 @@ Socket::Socket(int fd, const SockAddr& remote)
Socket::Socket(double timeout, logger::LogSeverity ll) : _logLevel(ll) {
_fd = INVALID_SOCKET;
_timeout = timeout;
- _lastValidityCheckAtSecs = time(0);
+ _lastValidityCheckAtSecs = time(nullptr);
_init();
}
@@ -214,7 +214,7 @@ void Socket::_init() {
_bytesIn = 0;
_awaitingHandshake = true;
#ifdef MONGO_CONFIG_SSL
- _sslManager = 0;
+ _sslManager = nullptr;
#endif
}
@@ -612,7 +612,7 @@ bool Socket::isStillConnected() {
if (!isPollSupported())
return true; // nothing we can do
- time_t now = time(0);
+ time_t now = time(nullptr);
time_t idleTimeSecs = now - _lastValidityCheckAtSecs;
// Only check once every 5 secs