From 1cabf97fe8d9431efd4322ad0f608a15f40a2373 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 5 Nov 2009 16:00:34 -0600 Subject: [PATCH] Use localtime_r instead of localtime --- src/voicecall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/voicecall.c b/src/voicecall.c index 3c7ca5c..ee903f1 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -158,8 +158,9 @@ static const char *phone_and_clip_to_string(const struct ofono_phone_number *n, static const char *time_to_str(const time_t *t) { static char buf[128]; + struct tm tm; - strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", localtime(t)); + strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", localtime_r(t, &tm)); buf[127] = '\0'; return buf; -- 2.7.4