mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-30 08:18:49 +00:00
Kernel: Use ByteBuffer::zero_fill() instead of raw memset in Ext2
There was a typo in one of the memsets, use the type safe wrapper instead. Fix EXt
This commit is contained in:
parent
5e84320ecb
commit
7c950c2d01
Notes:
sideshowbarker
2024-07-18 22:03:52 +09:00
Author: https://github.com/bgianfo
Commit: 7c950c2d01
Pull-request: https://github.com/SerenityOS/serenity/pull/5449
Reviewed-by: https://github.com/awesomekling
1 changed files with 2 additions and 2 deletions
|
@ -343,7 +343,7 @@ KResult Ext2FS::write_block_list_for_inode(InodeIndex inode_index, ext2_inode& e
|
|||
|
||||
auto dind_block_contents = ByteBuffer::create_uninitialized(block_size());
|
||||
if (dind_block_new) {
|
||||
memset(dind_block_contents.data(), 0, dind_block_contents.size());
|
||||
dind_block_contents.zero_fill();
|
||||
dind_block_dirty = true;
|
||||
} else {
|
||||
auto buffer = UserOrKernelBuffer::for_kernel_buffer(dind_block_contents.data());
|
||||
|
@ -370,7 +370,7 @@ KResult Ext2FS::write_block_list_for_inode(InodeIndex inode_index, ext2_inode& e
|
|||
|
||||
auto ind_block_contents = ByteBuffer::create_uninitialized(block_size());
|
||||
if (ind_block_new) {
|
||||
memset(ind_block_contents.data(), 0, dind_block_contents.size());
|
||||
ind_block_contents.zero_fill();
|
||||
ind_block_dirty = true;
|
||||
} else {
|
||||
auto buffer = UserOrKernelBuffer::for_kernel_buffer(ind_block_contents.data());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue