mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
SystemServer: Avoid uninitialized memory
This commit is contained in:
parent
8ac1e6e73b
commit
f7daf04f81
Notes:
sideshowbarker
2024-07-18 02:47:16 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/f7daf04f81d Pull-request: https://github.com/SerenityOS/serenity/pull/10443 Reviewed-by: https://github.com/alimpfard
1 changed files with 1 additions and 2 deletions
|
@ -131,7 +131,6 @@ static void create_devfs_block_device(String name, mode_t mode, unsigned major,
|
|||
|
||||
static void populate_devfs_block_devices()
|
||||
{
|
||||
struct stat cur_file_stat;
|
||||
Core::DirIterator di("/sys/dev/block/", Core::DirIterator::SkipParentAndBaseDir);
|
||||
if (di.has_error()) {
|
||||
warnln("Failed to open /sys/dev/block - {}", di.error());
|
||||
|
@ -152,7 +151,7 @@ static void populate_devfs_block_devices()
|
|||
break;
|
||||
}
|
||||
default:
|
||||
warnln("Unknown block device {}:{}", major(cur_file_stat.st_rdev), minor(cur_file_stat.st_rdev));
|
||||
warnln("Unknown block device {}:{}", major_number, minor_number);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue