summaryrefslogtreecommitdiff
path: root/src/char/int_mail.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-01-20 04:36:08 +0100
committerHaru <haru@dotalux.com>2015-01-20 04:41:33 +0100
commit4ae2b9b72dd4fce3d7a7778222d1c39abbb564a4 (patch)
treedab9d12a6a4b95a37598e27e6e86d6047360d61b /src/char/int_mail.c
parent03709c136ad300be631adfd38dc36c2433bda718 (diff)
downloadhercules-4ae2b9b72dd4fce3d7a7778222d1c39abbb564a4.tar.gz
hercules-4ae2b9b72dd4fce3d7a7778222d1c39abbb564a4.tar.bz2
hercules-4ae2b9b72dd4fce3d7a7778222d1c39abbb564a4.tar.xz
hercules-4ae2b9b72dd4fce3d7a7778222d1c39abbb564a4.zip
Minor fixes and tweaks suggested by cppcheck
- Variable scopes reduced - Parenthesized ambiguous expressions - Removed or added NULL checks where (un)necessary - Corrected format strings - Fixed typos potentially leading to bugs Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char/int_mail.c')
-rw-r--r--src/char/int_mail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/char/int_mail.c b/src/char/int_mail.c
index 0e5043e14..79d20cbd1 100644
--- a/src/char/int_mail.c
+++ b/src/char/int_mail.c
@@ -27,7 +27,6 @@ static int inter_mail_fromsql(int char_id, struct mail_data* md)
{
int i, j;
struct mail_message *msg;
- struct item *item;
char *data;
StringBuf buf;
@@ -53,6 +52,7 @@ static int inter_mail_fromsql(int char_id, struct mail_data* md)
for (i = 0; i < MAIL_MAX_INBOX && SQL_SUCCESS == SQL->NextRow(inter->sql_handle); ++i )
{
msg = &md->msg[i];
+ struct item *item;
SQL->GetData(inter->sql_handle, 0, &data, NULL); msg->id = atoi(data);
SQL->GetData(inter->sql_handle, 1, &data, NULL); safestrncpy(msg->send_name, data, NAME_LENGTH);
SQL->GetData(inter->sql_handle, 2, &data, NULL); msg->send_id = atoi(data);