summaryrefslogtreecommitdiff
path: root/lib/keychain.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-03-05 11:42:12 -0500
committerMark Stapp <mjs@voltanet.io>2020-03-05 13:26:16 -0500
commita2700b5071e53a78be2f8098765dcca58c2b6ee5 (patch)
treee32654991ac297bd3917401ae429ee54da385e5e /lib/keychain.c
parent1e273766cb352792d53fb712487726517ae850b7 (diff)
*: use gmtime_r, localtime_r exclusively
Stop using gmtime() or localtime() everywhere. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'lib/keychain.c')
-rw-r--r--lib/keychain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/keychain.c b/lib/keychain.c
index fc9f0f9cfa..ea512a2699 100644
--- a/lib/keychain.c
+++ b/lib/keychain.c
@@ -967,12 +967,12 @@ static struct cmd_node keychain_key_node = {KEYCHAIN_KEY_NODE,
static int keychain_strftime(char *buf, int bufsiz, time_t *time)
{
- struct tm *tm;
+ struct tm tm;
size_t len;
- tm = localtime(time);
+ localtime_r(time, &tm);
- len = strftime(buf, bufsiz, "%T %b %d %Y", tm);
+ len = strftime(buf, bufsiz, "%T %b %d %Y", &tm);
return len;
}