diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-04-17 13:29:10 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-04-17 13:29:10 +0000 |
commit | 21401a36c10c0b5d0da3d1bb310bcacad2ea85b6 (patch) | |
tree | 165270ade6d81a4896e485085b3bd49496faad68 | |
parent | 4a12014aa012c1b43fa00c5e8c10e248b8ccc817 (diff) |
OPENSSL_gmtime() is not a gmtime() wrapper. It is a gmtime_r().
Always trying to confuse people...
ok guenther
-rw-r--r-- | lib/libcrypto/o_time.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/lib/libcrypto/o_time.c b/lib/libcrypto/o_time.c index 44f7ba3b8c5..83028356b91 100644 --- a/lib/libcrypto/o_time.c +++ b/lib/libcrypto/o_time.c @@ -63,24 +63,10 @@ #include <string.h> #include "o_time.h" -struct tm -*OPENSSL_gmtime(const time_t *timer, struct tm *result) { - struct tm *ts = NULL; - -#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_OS2) && (!defined(OPENSSL_SYS_VMS) || defined(gmtime_r)) && !defined(OPENSSL_SYS_MACOSX) && !defined(OPENSSL_SYS_SUNOS) - /* should return &data, but doesn't on some systems, - so we don't even look at the return value */ - gmtime_r(timer, result); - ts = result; -#else - ts = gmtime(timer); - if (ts == NULL) - return NULL; - - memcpy(result, ts, sizeof(struct tm)); - ts = result; -#endif - return ts; +struct tm * +OPENSSL_gmtime(const time_t *timer, struct tm *result) +{ + return gmtime_r(timer, result); } /* Take a tm structure and add an offset to it. This avoids any OS issues |