diff options
| author | jackpoz <giacomopoz@gmail.com> | 2017-07-16 18:16:48 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2017-07-16 18:20:29 +0200 |
| commit | 9cf4dd7345b7f05db834fd48a9f0a135f1884d70 (patch) | |
| tree | 55067acd31a0cdd14d23f040a3ac77dd6fbd4f00 /src/server/scripts | |
| parent | f44956b051030f57378489b8c82517919d59955e (diff) | |
Core/Misc: Fix static analysis issues
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_ban.cpp | 3 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_disable.cpp | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp index 5c390a34e11..137620123a6 100644 --- a/src/server/scripts/Commands/cs_ban.cpp +++ b/src/server/scripts/Commands/cs_ban.cpp @@ -587,8 +587,7 @@ public: static bool HandleBanListIPCommand(ChatHandler* handler, char const* args) { - PreparedStatement* stmt = nullptr; - stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_EXPIRED_IP_BANS); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_EXPIRED_IP_BANS); LoginDatabase.Execute(stmt); char* filterStr = strtok((char*)args, " "); diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp index bc80d3d6fd0..b8d1116574d 100644 --- a/src/server/scripts/Commands/cs_disable.cpp +++ b/src/server/scripts/Commands/cs_disable.cpp @@ -187,8 +187,7 @@ public: break; } - PreparedStatement* stmt = nullptr; - stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_DISABLES); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_DISABLES); stmt->setUInt32(0, entry); stmt->setUInt8(1, disableType); PreparedQueryResult result = WorldDatabase.Query(stmt); @@ -313,8 +312,7 @@ public: break; } - PreparedStatement* stmt = nullptr; - stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_DISABLES); + PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_DISABLES); stmt->setUInt32(0, entry); stmt->setUInt8(1, disableType); PreparedQueryResult result = WorldDatabase.Query(stmt); |
