From 09fdcb27e44e89f6c08a8945fe10d9977546771f Mon Sep 17 00:00:00 2001 From: Lance Date: Wed, 7 Jun 2006 01:26:17 +0000 Subject: * [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 --- Changelog-Trunk.txt | 4 ++++ src/char_sql/char.c | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 5842e962f..62220b2b5 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,10 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +2006/06/07 + * [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. [Lance] 2006/06/06 * Hopefully fixed for sure mobs getting extra stats when changing-class due to the mobs level up setting. [Skotlex] 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) -- cgit v1.2.3-70-g09d2