diff options
author | Nay <dnpd.dd@gmail.com> | 2012-08-30 22:44:03 +0100 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2012-08-30 22:44:03 +0100 |
commit | abbb896cfb73017cf1c313d597984a9ce0a9dcab (patch) | |
tree | 58cd6165976448c3cdec18c4e4c6381c6bfba936 /src/server/authserver/Server/AuthSocket.cpp | |
parent | 5f1977cb1d690d2e60a1f5355244ec472e014278 (diff) |
Core: Fix many "errors"/warnings and coding style (2)
Scripts; also reverted a change to AuthSocket
Errors were found using Cppcheck, open-source static analysis tool
Diffstat (limited to 'src/server/authserver/Server/AuthSocket.cpp')
-rwxr-xr-x | src/server/authserver/Server/AuthSocket.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp index ee3a9677130..d55d2cf02b3 100755 --- a/src/server/authserver/Server/AuthSocket.cpp +++ b/src/server/authserver/Server/AuthSocket.cpp @@ -869,7 +869,7 @@ bool AuthSocket::_HandleRealmList() flag &= ~REALM_FLAG_SPECIFYBUILD; std::string name = i->first; - if (buildInfo && (_expversion & PRE_BC_EXP_FLAG && flag & REALM_FLAG_SPECIFYBUILD)) + if (_expversion & PRE_BC_EXP_FLAG && flag & REALM_FLAG_SPECIFYBUILD) { std::ostringstream ss; ss << name << " (" << buildInfo->MajorVersion << '.' << buildInfo->MinorVersion << '.' << buildInfo->BugfixVersion << ')'; @@ -902,15 +902,10 @@ bool AuthSocket::_HandleRealmList() if (_expversion & POST_BC_EXP_FLAG && flag & REALM_FLAG_SPECIFYBUILD) { - if (buildInfo) - { - pkt << uint8(buildInfo->MajorVersion); - pkt << uint8(buildInfo->MinorVersion); - pkt << uint8(buildInfo->BugfixVersion); - pkt << uint16(buildInfo->Build); - } - else - pkt << uint8(0) << uint8(0) << uint8(0) << uint16(0); + pkt << uint8(buildInfo->MajorVersion); + pkt << uint8(buildInfo->MinorVersion); + pkt << uint8(buildInfo->BugfixVersion); + pkt << uint16(buildInfo->Build); } ++RealmListSize; |