git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8348
91ce42f0-d328-0410-95d8-
f526ca767f89
const char *berrno::bstrerror()
{
+ *m_buf = 0;
#ifdef HAVE_WIN32
if (m_berrno & b_errno_win32) {
format_win32_message();
{
#ifdef HAVE_WIN32
LPVOID msg;
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetLastError(),
{
m_berrno = errno;
m_buf = get_pool_memory(pool);
+ *m_buf = 0;
errno = m_berrno;
}