summaryrefslogtreecommitdiff
path: root/src/char/int_mail.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-01-12 20:11:21 +0100
committerHaru <haru@dotalux.com>2015-01-12 20:46:31 +0100
commit6a5636ddf61e4fca9d258c11ebead182564f234f (patch)
treee6ba32523f8ba10400cb350ba366586101fdc388 /src/char/int_mail.c
parent60da9eab8463052d9196dae774aa91251f06db66 (diff)
downloadhercules-6a5636ddf61e4fca9d258c11ebead182564f234f.tar.gz
hercules-6a5636ddf61e4fca9d258c11ebead182564f234f.tar.bz2
hercules-6a5636ddf61e4fca9d258c11ebead182564f234f.tar.xz
hercules-6a5636ddf61e4fca9d258c11ebead182564f234f.zip
Fixed some -Wformat-security warnings
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char/int_mail.c')
-rw-r--r--src/char/int_mail.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/char/int_mail.c b/src/char/int_mail.c
index 2c0a85f33..0e5043e14 100644
--- a/src/char/int_mail.c
+++ b/src/char/int_mail.c
@@ -45,7 +45,7 @@ static int inter_mail_fromsql(int char_id, struct mail_data* md)
StrBuf->Printf(&buf, " FROM `%s` WHERE `dest_id`='%d' AND `status` < 3 ORDER BY `id` LIMIT %d",
mail_db, char_id, MAIL_MAX_INBOX + 1);
- if( SQL_ERROR == SQL->Query(inter->sql_handle, StrBuf->Value(&buf)) )
+ if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf)))
Sql_ShowDebug(inter->sql_handle);
StrBuf->Destroy(&buf);
@@ -160,16 +160,13 @@ static bool inter_mail_loadmessage(int mail_id, struct mail_message* msg)
StrBuf->Printf(&buf, ",`card%d`", j);
StrBuf->Printf(&buf, " FROM `%s` WHERE `id` = '%d'", mail_db, mail_id);
- if( SQL_ERROR == SQL->Query(inter->sql_handle, StrBuf->Value(&buf))
- || SQL_SUCCESS != SQL->NextRow(inter->sql_handle) )
- {
+ if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))
+ || SQL_SUCCESS != SQL->NextRow(inter->sql_handle)) {
Sql_ShowDebug(inter->sql_handle);
SQL->FreeResult(inter->sql_handle);
StrBuf->Destroy(&buf);
return false;
- }
- else
- {
+ } else {
char* data;
SQL->GetData(inter->sql_handle, 0, &data, NULL); msg->id = atoi(data);
@@ -253,8 +250,7 @@ static bool inter_mail_DeleteAttach(int mail_id)
StrBuf->Printf(&buf, ", `card%d` = '0'", i);
StrBuf->Printf(&buf, " WHERE `id` = '%d'", mail_id);
- if( SQL_ERROR == SQL->Query(inter->sql_handle, StrBuf->Value(&buf)) )
- {
+ if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) {
Sql_ShowDebug(inter->sql_handle);
StrBuf->Destroy(&buf);