mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-21 07:15:49 +00:00
ext4_ext_tree_init: correct memset initialization
gcc -Wmemset-elt-size diagnosed this. The code was only initializing 1/4 of the array. However, it was actually harmless, as the only caller had done an M_ZERO allocation anyway. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45701
This commit is contained in:
parent
07cc7ea738
commit
f29bdea047
@ -711,7 +711,7 @@ ext4_ext_tree_init(struct inode *ip)
|
||||
|
||||
ip->i_flag |= IN_E4EXTENTS;
|
||||
|
||||
memset(ip->i_data, 0, EXT2_NDADDR + EXT2_NIADDR);
|
||||
memset(ip->i_data, 0, sizeof(ip->i_data));
|
||||
ehp = (struct ext4_extent_header *)ip->i_data;
|
||||
ehp->eh_magic = htole16(EXT4_EXT_MAGIC);
|
||||
ehp->eh_max = htole16(ext4_ext_space_root(ip));
|
||||
|
Loading…
Reference in New Issue
Block a user