commit 345e93043664429f4f7c13f7a3be5e8e5c1d0e48
Author: Ján Kupec
Date: Sun Jan 25 17:08:41 2009 +0100
fixed uninitialized variables
---
zypp/Date.cc | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/zypp/Date.cc b/zypp/Date.cc
index 367ce34..a890b25 100644
--- a/zypp/Date.cc
+++ b/zypp/Date.cc
@@ -34,8 +34,9 @@ namespace zypp
{ str::strtonum( seconds_r, _date ); }
Date::Date( const std::string & date_str, const std::string & format )
+ : _date(0)
{
- struct tm tm;
+ struct tm tm = {0};
std::string thisLocale = adjustLocale();
char * res = ::strptime( date_str.c_str(), format.c_str(), &tm );
@@ -112,9 +113,7 @@ namespace zypp
static void restoreLocale(const std::string & locale)
{
if ( ! locale.empty() )
- {
::setlocale( LC_TIME, locale.c_str() );
- }
}
/////////////////////////////////////////////////////////////////
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org