summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2005-08-09 03:21:15 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2005-08-09 03:21:15 +0000
commit7d22d3cdc9c0a03158f550c35a6a26417869ee92 (patch)
tree5ac18a9d2b0406c6ee4e3200303d8b2f1ed54fcf /lib
parentbfc44efb91ffebb386f5e96829215a47bc9ebc13 (diff)
Do not ignore return value of localsub() in localtime_r()
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/time/localtime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/time/localtime.c b/lib/libc/time/localtime.c
index 4de725bbac4..5245de78bbe 100644
--- a/lib/libc/time/localtime.c
+++ b/lib/libc/time/localtime.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: localtime.c,v 1.27 2005/08/08 08:05:38 espie Exp $ */
+/* $OpenBSD: localtime.c,v 1.28 2005/08/09 03:21:14 millert Exp $ */
/*
** This file is in the public domain, so clarified as of
** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
@@ -1171,7 +1171,7 @@ struct tm *p_tm;
{
_THREAD_PRIVATE_MUTEX_LOCK(lcl);
tzset_basic();
- localsub(timep, 0L, p_tm);
+ p_tm = localsub(timep, 0L, p_tm);
_THREAD_PRIVATE_MUTEX_UNLOCK(lcl);
return p_tm;
}