mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02: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:
committed by
Andreas Kling
parent
5e84320ecb
commit
7c950c2d01
Notes:
sideshowbarker
2024-07-18 22:03:52 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/7c950c2d014 Pull-request: https://github.com/SerenityOS/serenity/pull/5449 Reviewed-by: https://github.com/awesomekling
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user