Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: src/base/platform/platform-cygwin.cc

Issue 1369673003: [presubmit] Enable runtime/threadsafe_fn linter checking. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/base/platform/platform-aix.cc ('k') | src/base/platform/platform-freebsd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/platform/platform-cygwin.cc
diff --git a/src/base/platform/platform-cygwin.cc b/src/base/platform/platform-cygwin.cc
index e09fc683956ed481f5eaf3feeaf0744155a2cf4d..18f151ac293383e0516ed6078ac1dbfbf79bc9b0 100644
--- a/src/base/platform/platform-cygwin.cc
+++ b/src/base/platform/platform-cygwin.cc
@@ -29,7 +29,7 @@ namespace base {
const char* OS::LocalTimezone(double time, TimezoneCache* cache) {
if (std::isnan(time)) return "";
time_t tv = static_cast<time_t>(std::floor(time/msPerSecond));
- struct tm* t = localtime(&tv);
+ struct tm* t = localtime(&tv); // NOLINT(runtime/threadsafe_fn)
if (NULL == t) return "";
return tzname[0]; // The location of the timezone string on Cygwin.
}
@@ -39,7 +39,7 @@ double OS::LocalTimeOffset(TimezoneCache* cache) {
// On Cygwin, struct tm does not contain a tm_gmtoff field.
time_t utc = time(NULL);
DCHECK(utc != -1);
- struct tm* loc = localtime(&utc);
+ struct tm* loc = localtime(&utc); // NOLINT(runtime/threadsafe_fn)
DCHECK(loc != NULL);
// time - localtime includes any daylight savings offset, so subtract it.
return static_cast<double>((mktime(loc) - utc) * msPerSecond -
« no previous file with comments | « src/base/platform/platform-aix.cc ('k') | src/base/platform/platform-freebsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698