Linting: Recommend os_* instead of POSIX functions.

This commit is contained in:
Florian Walch
2015-01-10 22:25:37 +01:00
parent a684cc175a
commit 470b87e377
2 changed files with 27 additions and 16 deletions

View File

@@ -80,11 +80,11 @@ struct tm *os_localtime_r(const time_t *restrict clock,
{
#ifdef UNIX
// POSIX provides localtime_r() as a thread-safe version of localtime().
return localtime_r(clock, result);
return localtime_r(clock, result); // NOLINT(runtime/threadsafe_fn)
#else
// Windows version of localtime() is thread-safe.
// See http://msdn.microsoft.com/en-us/library/bf12f0hc%28VS.80%29.aspx
struct tm *local_time = localtime(clock); // NOLINT
struct tm *local_time = localtime(clock); // NOLINT(runtime/threadsafe_fn)
if (!local_time) {
return NULL;
}