summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-07 01:26:17 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-07 01:26:17 +0000
commit09fdcb27e44e89f6c08a8945fe10d9977546771f (patch)
treeedd4c6ca39d8d7f621fbd2b1ab4d4a40a326c397 /src/char_sql/char.c
parentfaa029b879249d548da05577ee9461b85b286f08 (diff)
downloadhercules-09fdcb27e44e89f6c08a8945fe10d9977546771f.tar.gz
hercules-09fdcb27e44e89f6c08a8945fe10d9977546771f.tar.bz2
hercules-09fdcb27e44e89f6c08a8945fe10d9977546771f.tar.xz
hercules-09fdcb27e44e89f6c08a8945fe10d9977546771f.zip
* [Optimized]:
- list and size not being initialized (size get intialized in default: switch case) Eliminated default case and initialized list and size at the beginning. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7021 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r--src/char_sql/char.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 507704523..4b5e2be59 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2837,8 +2837,8 @@ int parse_frommap(int fd) {
int fame = RFIFOL(fd, 6);
char type = RFIFOB(fd, 10);
char pos = RFIFOB(fd, 11);
- int size;
- struct fame_list *list;
+ int size = 0;
+ struct fame_list *list = NULL;
RFIFOSKIP(fd,12);
switch(type) {
@@ -2854,9 +2854,6 @@ int parse_frommap(int fd) {
size = fame_list_size_taekwon;
list = taekwon_fame_list;
break;
- default:
- size = 0;
- break;
}
if(!size) break; //No list.
if(pos)