aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2017-07-16 18:16:48 +0200
committervincent-michael <vincent_michael@gmx.de>2017-07-16 21:14:22 +0200
commitfc6b488620282620eada92a6615643cdc9c5411f (patch)
tree09148ffe2578ac9d9e15088ca34caaec43a4df6a /src/server/scripts/Commands
parent74e4f73fcb7a2e14e9b2500f1630180defb0cfe9 (diff)
Core/Misc: Fix static analysis issues
# Conflicts: # src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp # src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp # src/server/game/Entities/Unit/Unit.cpp # src/server/scripts/Commands/cs_ban.cpp # src/server/scripts/Commands/cs_disable.cpp
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_ban.cpp3
-rw-r--r--src/server/scripts/Commands/cs_disable.cpp6
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 b108da82756..206718be889 100644
--- a/src/server/scripts/Commands/cs_ban.cpp
+++ b/src/server/scripts/Commands/cs_ban.cpp
@@ -576,8 +576,7 @@ public:
static bool HandleBanListIPCommand(ChatHandler* handler, char const* args)
{
- PreparedStatement* stmt = NULL;
- 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 919bd93d5c8..55c92db5a82 100644
--- a/src/server/scripts/Commands/cs_disable.cpp
+++ b/src/server/scripts/Commands/cs_disable.cpp
@@ -188,8 +188,7 @@ public:
break;
}
- PreparedStatement* stmt = NULL;
- 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);
@@ -314,8 +313,7 @@ public:
break;
}
- PreparedStatement* stmt = NULL;
- 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);