summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-02-07 03:56:01 +0100
committerHaru <haru@dotalux.com>2018-02-10 01:23:15 +0100
commitba28b56a6b3180c7d13c196ecb44fddd3d63a4f6 (patch)
treef049fca67c4490950a86de3d3675384b3f142f57 /src/map/atcommand.c
parent6f85e399942facc69555d078c82588f95b198711 (diff)
downloadhercules-ba28b56a6b3180c7d13c196ecb44fddd3d63a4f6.tar.gz
hercules-ba28b56a6b3180c7d13c196ecb44fddd3d63a4f6.tar.bz2
hercules-ba28b56a6b3180c7d13c196ecb44fddd3d63a4f6.tar.xz
hercules-ba28b56a6b3180c7d13c196ecb44fddd3d63a4f6.zip
Fix some minor issues in the clan system, as reported by coverity
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 29e8bf4f8..6b7606cb4 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -9545,9 +9545,6 @@ ACMD(claninfo)
for (i = 0; i < VECTOR_LENGTH(c->allies); i++) {
struct clan_relationship *ally = &VECTOR_INDEX(c->allies, i);
- if (ally == NULL)
- continue;
-
safesnprintf(atcmd_output, sizeof(atcmd_output), "- - Ally #%d (Id: %d): %s", i + 1, ally->clan_id, ally->constant);
clif->messagecolor_self(fd, COLOR_DEFAULT, atcmd_output);
count++;
@@ -9559,14 +9556,11 @@ ACMD(claninfo)
safesnprintf(atcmd_output, sizeof(atcmd_output), "- Antagonists: %d", VECTOR_LENGTH(c->antagonists));
clif->messagecolor_self(fd, COLOR_DEFAULT, atcmd_output);
-
+
count = 0;
for (i = 0; i < VECTOR_LENGTH(c->antagonists); i++) {
struct clan_relationship *antagonist = &VECTOR_INDEX(c->antagonists, i);
- if (antagonist == NULL)
- continue;
-
safesnprintf(atcmd_output, sizeof(atcmd_output), "- - Antagonist #%d (Id: %d): %s", i + 1, antagonist->clan_id, antagonist->constant);
clif->messagecolor_self(fd, COLOR_DEFAULT, atcmd_output);
count++;
@@ -9575,7 +9569,7 @@ ACMD(claninfo)
if (count == 0) {
clif->messagecolor_self(fd, COLOR_DEFAULT, "- - No Antagonists Found!");
}
-
+
clif->messagecolor_self(fd, COLOR_DEFAULT, "============================");
}
dbi_destroy(iter);