Skip to content
Snippets Groups Projects
Commit 11a0f77d authored by deuce's avatar deuce
Browse files

Fix use of uninitialized tv value.

parent 3ae6e9f3
Branches
Tags
No related merge requests found
...@@ -86,7 +86,8 @@ xpDateTime_t xpDateTime_now(void) ...@@ -86,7 +86,8 @@ xpDateTime_t xpDateTime_now(void)
struct timeval tv; struct timeval tv;
time_t t; time_t t;
t=time(NULL); gettimeofday(&tv, NULL);
t=tv.tv_sec;
localtime_r(&t,&tm); localtime_r(&t,&tm);
return xpDateTime_create(1900+tm.tm_year,1+tm.tm_mon,tm.tm_mday return xpDateTime_create(1900+tm.tm_year,1+tm.tm_mon,tm.tm_mday
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment