Description: This patch fixes the
DF180802-00044
issue.
Change-Id: I0eb1ea1c6da97923993a9a5a6d99b67b2c5e6bde
Signed-off-by: Milind Murhekar <m.murhekar@samsung.com>
time_t stc_time_get_day_start(time_t now)
{
- struct tm *curr;
+ struct tm curr;
+ struct tm *res;
- curr = localtime(&now);
+ res = localtime_r(&now, &curr);
- curr->tm_sec = 0;
- curr->tm_min = 0;
- curr->tm_hour = 0;
+ curr.tm_sec = 0;
+ curr.tm_min = 0;
+ curr.tm_hour = 0;
- return mktime(curr);
+ return mktime(&curr);
}
time_t stc_time_get_week_start(time_t now)