summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorveider <veider@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-04-03 01:03:00 +0000
committerveider <veider@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-04-03 01:03:00 +0000
commit7ae4ad581571866181d58ced35f9fa871672b7fa (patch)
tree0b3117c02eefd6f3dbbd111925765378bea4c9a5
parentf06a0799e01d7d7f0fd6b13925f48bea81a2bcea (diff)
downloadhercules-7ae4ad581571866181d58ced35f9fa871672b7fa.tar.gz
hercules-7ae4ad581571866181d58ced35f9fa871672b7fa.tar.bz2
hercules-7ae4ad581571866181d58ced35f9fa871672b7fa.tar.xz
hercules-7ae4ad581571866181d58ced35f9fa871672b7fa.zip
Fixed variable declarations breaking ANSI C
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1386 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-SVN.txt1
-rw-r--r--src/login_sql/login.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt
index 81437c295..ecc8d45ae 100644
--- a/Changelog-SVN.txt
+++ b/Changelog-SVN.txt
@@ -2,6 +2,7 @@
Date Added
04/03
+ * Fixed some variable declarations in SQL login.c causing compilation errors [veider]
* Added NetBSD support into Makefile (Still lots of warrnings during compilation [veider]
* Finished Valkyrie. Now it correctly works. Valhallana reborns players to High Novices. [Lupus]
(added missed kRO condition: to reborn, player shouldn't have money nor items(equipment) )
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index 45b9dd2f4..3e2c66e53 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -155,9 +155,9 @@ struct dbt *online_db;
//-----------------------------------------------------
void add_online_user(int account_id) {
+ int *p;
if(register_users_online <= 0)
return;
- int *p;
p = (int*)aMalloc(sizeof(int));
if (p == NULL) {
printf("add_online_user: memory allocation failure (malloc)!\n");
@@ -168,9 +168,9 @@ void add_online_user(int account_id) {
}
int is_user_online(int account_id) {
+ int *p;
if(register_users_online <= 0)
return 0;
- int *p;
p = (int*)numdb_search(online_db, account_id);
if (p == NULL)
@@ -180,9 +180,9 @@ int is_user_online(int account_id) {
}
void remove_online_user(int account_id) {
+ int *p;
if(register_users_online <= 0)
return;
- int *p;
p = (int*)numdb_erase(online_db,account_id);
aFree(p);
}