Author: hhinnant
Date: Thu Aug 2 13:44:17 2012
New Revision: 161196
URL: http://llvm.org/viewvc/llvm-project?rev=161196&view=rev
Log:
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.
Modified:
libcxx/trunk/src/locale.cpp
Modified: libcxx/trunk/src/locale.cpp
URL:
http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/locale.cpp?rev=161196&r1=161195&r2=161196&view=diff
==============================================================================
--- libcxx/trunk/src/locale.cpp (original)
+++ libcxx/trunk/src/locale.cpp Thu Aug 2 13:44:17 2012
@@ -4864,7 +4864,7 @@
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)
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits