From 41de1ce748d969a65bbefc6987c98d4e0a5010a3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Sep 2014 19:09:07 +0000 Subject: merge #2 git-svn-id: http://svn.miranda-ng.org/main/trunk@10527 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/utils.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'protocols/WhatsApp/src/utils.cpp') diff --git a/protocols/WhatsApp/src/utils.cpp b/protocols/WhatsApp/src/utils.cpp index 35d3ceb3a6..0aa95f1a16 100644 --- a/protocols/WhatsApp/src/utils.cpp +++ b/protocols/WhatsApp/src/utils.cpp @@ -1,25 +1,25 @@ #include "common.h" std::string getLastErrorMsg() -{ - // Retrieve the system error message for the last-error code - - LPVOID lpMsgBuf; - DWORD dw = WSAGetLastError(); - - FormatMessageA( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - dw, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPSTR) &lpMsgBuf, - 0, NULL ); - - std::string ret((LPSTR) lpMsgBuf); - LocalFree(lpMsgBuf); - return ret; +{ + // Retrieve the system error message for the last-error code + + LPVOID lpMsgBuf; + DWORD dw = WSAGetLastError(); + + FormatMessageA( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + dw, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR)&lpMsgBuf, + 0, NULL); + + std::string ret((LPSTR)lpMsgBuf); + LocalFree(lpMsgBuf); + return ret; } BYTE* utils::md5string(const BYTE *data, int size, BYTE *digest) -- cgit v1.2.3