diff options
author | Haru <haru@dotalux.com> | 2015-05-19 01:59:33 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-05-19 03:08:22 +0200 |
commit | bd2109d614a443045c7bbbf632bb9035216e3623 (patch) | |
tree | 2e125e4ce2b6a8c60b5e2303b1e2b0a88386ff70 /src/map/map.c | |
parent | 6ac5a0ccfb601b81e1b84f6e86175d40bb16864b (diff) | |
download | hercules-bd2109d614a443045c7bbbf632bb9035216e3623.tar.gz hercules-bd2109d614a443045c7bbbf632bb9035216e3623.tar.bz2 hercules-bd2109d614a443045c7bbbf632bb9035216e3623.tar.xz hercules-bd2109d614a443045c7bbbf632bb9035216e3623.zip |
Fixed some issues reported by coverity scan [3/3]
- Automatically zeroed variables are now zeroed in the correct size,
regardless of padding.
- Special thanks to Ind.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/map/map.c b/src/map/map.c index c79d49c3e..a407722bb 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -6140,10 +6140,7 @@ void map_defaults(void) { map->bl_list_size = 0; //all in a big chunk, respects order - memset(&map->bl_head,0,sizeof(map->bl_head) - + sizeof(map->zone_all) - + sizeof(map->zone_pk) - ); + memset(ZEROED_BLOCK_POS(map), 0, ZEROED_BLOCK_SIZE(map)); map->cpsd = NULL; map->list = NULL; |