From fa2f2f4f2cba8cfb2d6d950c69d7c4348ba66205 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 28 Feb 2016 02:41:01 +0100 Subject: HPM Hooks Update Signed-off-by: Haru --- src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 30 ++++++++---------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'src/plugins/HPMHooking/HPMHooking_char.Hooks.inc') diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index 04dc90c6c..79b8b0a1a 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -161,8 +161,7 @@ int HP_chr_delete_char_sql(int char_id) { } struct DBData HP_chr_create_online_char_data(union DBKey key, va_list args) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); + struct DBData retVal___ = { 0 }; if( HPMHooks.count.HP_chr_create_online_char_data_pre ) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; @@ -469,8 +468,7 @@ void HP_chr_set_all_offline_sql(void) { } struct DBData HP_chr_create_charstatus(union DBKey key, va_list args) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); + struct DBData retVal___ = { 0 }; if( HPMHooks.count.HP_chr_create_charstatus_pre ) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; @@ -4753,8 +4751,7 @@ struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBT } union DBKey HP_DB_i2key(int key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); + union DBKey retVal___ = { 0 }; if( HPMHooks.count.HP_DB_i2key_pre ) { union DBKey (*preHookFunc) (int *key); *HPMforce_return = false; @@ -4781,8 +4778,7 @@ union DBKey HP_DB_i2key(int key) { } union DBKey HP_DB_ui2key(unsigned int key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); + union DBKey retVal___ = { 0 }; if( HPMHooks.count.HP_DB_ui2key_pre ) { union DBKey (*preHookFunc) (unsigned int *key); *HPMforce_return = false; @@ -4809,8 +4805,7 @@ union DBKey HP_DB_ui2key(unsigned int key) { } union DBKey HP_DB_str2key(const char *key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); + union DBKey retVal___ = { 0 }; if( HPMHooks.count.HP_DB_str2key_pre ) { union DBKey (*preHookFunc) (const char *key); *HPMforce_return = false; @@ -4837,8 +4832,7 @@ union DBKey HP_DB_str2key(const char *key) { } union DBKey HP_DB_i642key(int64 key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); + union DBKey retVal___ = { 0 }; if( HPMHooks.count.HP_DB_i642key_pre ) { union DBKey (*preHookFunc) (int64 *key); *HPMforce_return = false; @@ -4865,8 +4859,7 @@ union DBKey HP_DB_i642key(int64 key) { } union DBKey HP_DB_ui642key(uint64 key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); + union DBKey retVal___ = { 0 }; if( HPMHooks.count.HP_DB_ui642key_pre ) { union DBKey (*preHookFunc) (uint64 *key); *HPMforce_return = false; @@ -4893,8 +4886,7 @@ union DBKey HP_DB_ui642key(uint64 key) { } struct DBData HP_DB_i2data(int data) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); + struct DBData retVal___ = { 0 }; if( HPMHooks.count.HP_DB_i2data_pre ) { struct DBData (*preHookFunc) (int *data); *HPMforce_return = false; @@ -4921,8 +4913,7 @@ struct DBData HP_DB_i2data(int data) { } struct DBData HP_DB_ui2data(unsigned int data) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); + struct DBData retVal___ = { 0 }; if( HPMHooks.count.HP_DB_ui2data_pre ) { struct DBData (*preHookFunc) (unsigned int *data); *HPMforce_return = false; @@ -4949,8 +4940,7 @@ struct DBData HP_DB_ui2data(unsigned int data) { } struct DBData HP_DB_ptr2data(void *data) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); + struct DBData retVal___ = { 0 }; if( HPMHooks.count.HP_DB_ptr2data_pre ) { struct DBData (*preHookFunc) (void *data); *HPMforce_return = false; -- cgit v1.2.3-60-g2f50