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
This commit is contained in:
Nay
2012-08-30 22:44:03 +01:00
parent 5f1977cb1d
commit abbb896cfb
16 changed files with 70 additions and 93 deletions

View File

@@ -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;