SystemServer: Avoid uninitialized memory

This commit is contained in:
Ben Wiederhake 2021-10-10 22:43:41 +02:00 committed by Andreas Kling
parent 8ac1e6e73b
commit f7daf04f81
Notes: sideshowbarker 2024-07-18 02:47:16 +09:00

View file

@ -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;
}
}