mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-21 03:23:04 -05:00
Avoid possible compiler warning in os_gmtime()
Use time_t instead of os_time_t variable with the gmtime() call to avoid possible compiler warnings. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
ef992bbd3b
commit
d5cbee412c
@ -73,8 +73,9 @@ int os_mktime(int year, int month, int day, int hour, int min, int sec,
|
|||||||
int os_gmtime(os_time_t t, struct os_tm *tm)
|
int os_gmtime(os_time_t t, struct os_tm *tm)
|
||||||
{
|
{
|
||||||
struct tm *tm2;
|
struct tm *tm2;
|
||||||
|
time_t t2 = t;
|
||||||
|
|
||||||
tm2 = gmtime(&t);
|
tm2 = gmtime(&t2);
|
||||||
if (tm2 == NULL)
|
if (tm2 == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
tm->sec = tm2->tm_sec;
|
tm->sec = tm2->tm_sec;
|
||||||
|
@ -109,8 +109,9 @@ int os_mktime(int year, int month, int day, int hour, int min, int sec,
|
|||||||
int os_gmtime(os_time_t t, struct os_tm *tm)
|
int os_gmtime(os_time_t t, struct os_tm *tm)
|
||||||
{
|
{
|
||||||
struct tm *tm2;
|
struct tm *tm2;
|
||||||
|
time_t t2 = t;
|
||||||
|
|
||||||
tm2 = gmtime(&t);
|
tm2 = gmtime(&t2);
|
||||||
if (tm2 == NULL)
|
if (tm2 == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
tm->sec = tm2->tm_sec;
|
tm->sec = tm2->tm_sec;
|
||||||
|
@ -96,8 +96,9 @@ int os_mktime(int year, int month, int day, int hour, int min, int sec,
|
|||||||
int os_gmtime(os_time_t t, struct os_tm *tm)
|
int os_gmtime(os_time_t t, struct os_tm *tm)
|
||||||
{
|
{
|
||||||
struct tm *tm2;
|
struct tm *tm2;
|
||||||
|
time_t t2 = t;
|
||||||
|
|
||||||
tm2 = gmtime(&t);
|
tm2 = gmtime(&t2);
|
||||||
if (tm2 == NULL)
|
if (tm2 == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
tm->sec = tm2->tm_sec;
|
tm->sec = tm2->tm_sec;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user