summaryrefslogtreecommitdiffstats
path: root/libcxx/src
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-08-02 18:44:17 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-08-02 18:44:17 +0000
commit0cbea7fa904d457f2cb2799904f0a190fe12fe82 (patch)
treee7588ee16b17b63c26e491f44f12506d43fa7a3f /libcxx/src
parentfb2f0a5e01f59b708fdffd614c659e2e035d9da0 (diff)
downloadbcm5719-llvm-0cbea7fa904d457f2cb2799904f0a190fe12fe82.tar.gz
bcm5719-llvm-0cbea7fa904d457f2cb2799904f0a190fe12fe82.zip
Andrew Morrow: The attached patch updates the initialization of the 'struct tm' in
__time_get_storage<char> to match the initialization behavior in __time_get_storage<wchar>. Without the initialization, valgrind reports errors in the subsequent calls to strftime_l. llvm-svn: 161196
Diffstat (limited to 'libcxx/src')
-rw-r--r--libcxx/src/locale.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 854fd239cfa..542c0d7a20f 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -4864,7 +4864,7 @@ template <>
void
__time_get_storage<char>::init(const ctype<char>& ct)
{
- tm t;
+ tm t = {0};
char buf[100];
// __weeks_
for (int i = 0; i < 7; ++i)
OpenPOWER on IntegriCloud