summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2017-02-15 15:32:29 +0000
committerEd Maste <emaste@FreeBSD.org>2017-02-15 15:32:29 +0000
commit26ab9a178caaa405f466d98743ed7f11e2d81509 (patch)
tree08e429761840532549c03aeed280c8a782dc1f48
parent783b367605365687ea865468579ce9a41e451d17 (diff)
downloadsrc-test2-26ab9a178caaa405f466d98743ed7f11e2d81509.tar.gz
src-test2-26ab9a178caaa405f466d98743ed7f11e2d81509.zip
Notes
-rw-r--r--contrib/tzcode/stdtime/localtime.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/tzcode/stdtime/localtime.c b/contrib/tzcode/stdtime/localtime.c
index ad9508240b97..632a8d4a89ba 100644
--- a/contrib/tzcode/stdtime/localtime.c
+++ b/contrib/tzcode/stdtime/localtime.c
@@ -1453,14 +1453,13 @@ localtime(const time_t *const timep)
}
_RWLOCK_RDLOCK(&lcl_rwlock);
tzset_basic(1);
- localsub(timep, 0L, p_tm);
+ p_tm = localsub(timep, 0L, p_tm);
_RWLOCK_UNLOCK(&lcl_rwlock);
- return(p_tm);
} else {
tzset_basic(0);
- localsub(timep, 0L, &tm);
- return(&tm);
+ p_tm = localsub(timep, 0L, &tm);
}
+ return(p_tm);
}
/*
@@ -1472,7 +1471,7 @@ localtime_r(const time_t *const timep, struct tm *tmp)
{
_RWLOCK_RDLOCK(&lcl_rwlock);
tzset_basic(1);
- localsub(timep, 0L, tmp);
+ tmp = localsub(timep, 0L, tmp);
_RWLOCK_UNLOCK(&lcl_rwlock);
return tmp;
}