diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-04-02 16:13:23 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-06-24 13:42:54 +0200 |
commit | 139f0e8a4b81fe3dcd9476ec5ee16ea5e74af901 (patch) | |
tree | 8d06ede9e14516516a44c5ed710058003088eec2 /common/rfb/Logger_file.cxx | |
parent | 45198e5235f4b724277665b242cf855a0ff4518b (diff) | |
download | tigervnc-139f0e8a4b81fe3dcd9476ec5ee16ea5e74af901.tar.gz tigervnc-139f0e8a4b81fe3dcd9476ec5ee16ea5e74af901.zip |
Use nullptr in all C++ code
It's more readable than 0, and a bit safer than NULL, so let's try to
follow modern norms.
Diffstat (limited to 'common/rfb/Logger_file.cxx')
-rw-r--r-- | common/rfb/Logger_file.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/rfb/Logger_file.cxx b/common/rfb/Logger_file.cxx index 099a3501..eabe420a 100644 --- a/common/rfb/Logger_file.cxx +++ b/common/rfb/Logger_file.cxx @@ -33,7 +33,7 @@ using namespace rfb; Logger_File::Logger_File(const char* loggerName) - : Logger(loggerName), indent(13), width(79), m_file(0), + : Logger(loggerName), indent(13), width(79), m_file(nullptr), m_lastLogTime(0) { m_filename[0] = '\0'; @@ -65,7 +65,7 @@ void Logger_File::write(int /*level*/, const char *logname, const char *message) if (!m_file) return; } - time_t current = time(0); + time_t current = time(nullptr); if (current != m_lastLogTime) { m_lastLogTime = current; fprintf(m_file, "\n%s", ctime(&m_lastLogTime)); @@ -115,7 +115,7 @@ void Logger_File::closeFile() { if (m_file) { fclose(m_file); - m_file = 0; + m_file = nullptr; } } |