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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@161196 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant 2012-08-02 18:44:17 +00:00
parent 069bdd52c1
commit cd99236231

View File

@ -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)