summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_misc.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2018-03-06 20:24:07 +0300
committerKirill Volinsky <mataes2007@gmail.com>2018-03-07 12:54:58 +0300
commitbebafc42ab6199e86d4c2c901fac8d091bfffef0 (patch)
treef3961879845e89688c6628dccf1a3c9cd3ebb9b3 /protocols/MSN/src/msn_misc.cpp
parent7e9fef8a6ff35c63f9217fcc618d77f660e45245 (diff)
some fixes
Diffstat (limited to 'protocols/MSN/src/msn_misc.cpp')
-rw-r--r--protocols/MSN/src/msn_misc.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index dc509db31b..78ec94f5dd 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -1025,13 +1025,11 @@ char* TWinErrorCode::getText()
if (mErrorText == nullptr)
return nullptr;
- int tBytes = 0;
mErrorText = (char*)mir_alloc(256);
- if (tBytes == 0)
- tBytes = FormatMessageA(
- FORMAT_MESSAGE_FROM_SYSTEM, nullptr,
- mErrorCode, LANG_NEUTRAL, mErrorText, 256, nullptr);
+ int tBytes = FormatMessageA(
+ FORMAT_MESSAGE_FROM_SYSTEM, nullptr,
+ mErrorCode, LANG_NEUTRAL, mErrorText, 256, nullptr);
if (tBytes == 0)
tBytes = mir_snprintf(mErrorText, 256, "unknown Windows error code %d", mErrorCode);