From 166f6206f42d1c1d6fa97d7e0315d99134252d9c Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Fri, 11 Jul 2008 21:07:32 +0000 Subject: [PATCH] Fix for possible NULL return value for setlocale() (Zarafa). --- src/platforms/posix/posixHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/posix/posixHandler.cpp b/src/platforms/posix/posixHandler.cpp index e88f70f9..d1b782f7 100644 --- a/src/platforms/posix/posixHandler.cpp +++ b/src/platforms/posix/posixHandler.cpp @@ -113,9 +113,9 @@ const vmime::datetime posixHandler::getCurrentLocalTime() const const vmime::charset posixHandler::getLocaleCharset() const { - vmime::string prevLocale(::setlocale(LC_ALL, "")); + const char* prevLocale = ::setlocale(LC_ALL, ""); vmime::charset ch(::nl_langinfo(CODESET)); - ::setlocale(LC_ALL, prevLocale.c_str()); + ::setlocale(LC_ALL, prevLocale); return (ch); }