summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_misc.cpp
diff options
context:
space:
mode:
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);