]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed 64-bit portability bug in time_string function (Thomas Habets).
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Wed, 25 Apr 2007 23:23:27 +0000 (23:23 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Wed, 25 Apr 2007 23:23:27 +0000 (23:23 +0000)
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1880 e7ae566f-a301-0410-adde-c780ea21d3b5

otime.c

diff --git a/otime.c b/otime.c
index 690fe27867c00b4098e7e316eebf30c9c71277ec..d21b08be2d6b44221bdafc78bfadb66d0b2b2706 100644 (file)
--- a/otime.c
+++ b/otime.c
@@ -130,7 +130,8 @@ time_string (time_t t, int usec, bool show_usec, struct gc_arena *gc)
     }
 
   mutex_lock_static (L_CTIME);
-  buf_printf (&out, "%s", ctime ((const time_t *)&tv.tv_sec));
+  t = tv.tv_sec;
+  buf_printf (&out, "%s", ctime(&t));
   mutex_unlock_static (L_CTIME);
   buf_rmtail (&out, '\n');