summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-10-10 22:43:41 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-13 16:11:30 +0200
commitf7daf04f81d49f57b18772031f80c3138576ba72 (patch)
treedbc612cfd09a84ff81c5b2f8bbdfec7d29aedbd1 /Userland/Services
parent8ac1e6e73babefc19fa2138dd8e4238984272958 (diff)
downloadserenity-f7daf04f81d49f57b18772031f80c3138576ba72.zip
SystemServer: Avoid uninitialized memory
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/SystemServer/main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Services/SystemServer/main.cpp b/Userland/Services/SystemServer/main.cpp
index c37c001854..2d6bd2343b 100644
--- a/Userland/Services/SystemServer/main.cpp
+++ b/Userland/Services/SystemServer/main.cpp
@@ -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;
}
}