aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-11-20 12:19:28 +0200
committerJouni Malinen <j@w1.fi>2011-11-20 12:19:28 +0200
commitd5cbee412c004a63c3f1b21d56a9e6c344847a5a (patch)
treeef36337453495da7b6037fde8db236d2a5bbc08d /src/utils
parentef992bbd3b044eeea68c6677ff878cb1d2ed29c1 (diff)
downloadexternal_wpa_supplicant_8_ti-d5cbee412c004a63c3f1b21d56a9e6c344847a5a.zip
external_wpa_supplicant_8_ti-d5cbee412c004a63c3f1b21d56a9e6c344847a5a.tar.gz
external_wpa_supplicant_8_ti-d5cbee412c004a63c3f1b21d56a9e6c344847a5a.tar.bz2
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>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/os_internal.c3
-rw-r--r--src/utils/os_unix.c3
-rw-r--r--src/utils/os_win32.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/src/utils/os_internal.c b/src/utils/os_internal.c
index 925aff5..8024a30 100644
--- a/src/utils/os_internal.c
+++ b/src/utils/os_internal.c
@@ -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)
{
struct tm *tm2;
+ time_t t2 = t;
- tm2 = gmtime(&t);
+ tm2 = gmtime(&t2);
if (tm2 == NULL)
return -1;
tm->sec = tm2->tm_sec;
diff --git a/src/utils/os_unix.c b/src/utils/os_unix.c
index cadcb8d..9b16b33 100644
--- a/src/utils/os_unix.c
+++ b/src/utils/os_unix.c
@@ -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)
{
struct tm *tm2;
+ time_t t2 = t;
- tm2 = gmtime(&t);
+ tm2 = gmtime(&t2);
if (tm2 == NULL)
return -1;
tm->sec = tm2->tm_sec;
diff --git a/src/utils/os_win32.c b/src/utils/os_win32.c
index c93be30..51bd545 100644
--- a/src/utils/os_win32.c
+++ b/src/utils/os_win32.c
@@ -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)
{
struct tm *tm2;
+ time_t t2 = t;
- tm2 = gmtime(&t);
+ tm2 = gmtime(&t2);
if (tm2 == NULL)
return -1;
tm->sec = tm2->tm_sec;