From 042ca733d309f48d2987a81151cbf3c59b73e562 Mon Sep 17 00:00:00 2001 From: bryner Date: Mon, 20 Nov 2006 20:58:10 +0000 Subject: Use the reentrant versions of strtok() and gmtime() (#79) r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@69 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/processor/minidump.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/processor/minidump.cc') diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc index 9232b3bd..d557d0bc 100644 --- a/src/processor/minidump.cc +++ b/src/processor/minidump.cc @@ -2304,10 +2304,10 @@ void Minidump::Print() { printf(" stream_count = %d\n", header_.stream_count); printf(" stream_directory_rva = 0x%x\n", header_.stream_directory_rva); printf(" checksum = 0x%x\n", header_.checksum); - struct tm* timestruct = - gmtime(reinterpret_cast(&header_.time_date_stamp)); + struct tm timestruct; + gmtime_r(reinterpret_cast(&header_.time_date_stamp), ×truct); char timestr[20]; - strftime(timestr, 20, "%Y-%m-%d %H:%M:%S", timestruct); + strftime(timestr, 20, "%Y-%m-%d %H:%M:%S", ×truct); printf(" time_date_stamp = 0x%x %s\n", header_.time_date_stamp, timestr); printf(" flags = 0x%llx\n", header_.flags); -- cgit v1.2.1