summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qdatetime.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 7dd9060..6674717 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -1848,8 +1848,7 @@ QTime QTime::currentTime()
#else
time_t ltime; // no millisecond resolution
::time(&ltime);
- tm *t = 0;
- localtime(&ltime);
+ const tm *const t = localtime(&ltime);
ct.mds = MSECS_PER_HOUR * t->tm_hour + MSECS_PER_MIN * t->tm_min + 1000 * t->tm_sec;
#endif
return ct;