diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-11-29 03:05:19 -0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-30 11:16:35 +0100 |
commit | fa517b213a8ba9f20dc6835c159ac2e457d39a01 (patch) | |
tree | e39a191f40e40ab5dcfa84a457f1649d21767165 /Kernel | |
parent | e626d7098d6c3afbe83f2400b55565f8bc6f065a (diff) | |
download | serenity-fa517b213a8ba9f20dc6835c159ac2e457d39a01.zip |
Kernel: Handle string format errors in FileSystem APIs :^)
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/FileSystem/FIFO.cpp | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/InodeWatcher.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/FIFO.cpp b/Kernel/FileSystem/FIFO.cpp index 1fadae8c6b..6692a753fb 100644 --- a/Kernel/FileSystem/FIFO.cpp +++ b/Kernel/FileSystem/FIFO.cpp @@ -134,7 +134,7 @@ ErrorOr<size_t> FIFO::write(OpenFileDescription& fd, u64, const UserOrKernelBuff ErrorOr<NonnullOwnPtr<KString>> FIFO::pseudo_path(const OpenFileDescription&) const { - return KString::try_create(String::formatted("fifo:{}", m_fifo_id)); + return KString::formatted("fifo:{}", m_fifo_id); } ErrorOr<void> FIFO::stat(::stat& st) const diff --git a/Kernel/FileSystem/InodeWatcher.cpp b/Kernel/FileSystem/InodeWatcher.cpp index 69a9af8016..d4bc588e3b 100644 --- a/Kernel/FileSystem/InodeWatcher.cpp +++ b/Kernel/FileSystem/InodeWatcher.cpp @@ -83,7 +83,7 @@ ErrorOr<void> InodeWatcher::close() ErrorOr<NonnullOwnPtr<KString>> InodeWatcher::pseudo_path(const OpenFileDescription&) const { - return KString::try_create(String::formatted("InodeWatcher:({})", m_wd_to_watches.size())); + return KString::formatted("InodeWatcher:({})", m_wd_to_watches.size()); } void InodeWatcher::notify_inode_event(Badge<Inode>, InodeIdentifier inode_id, InodeWatcherEvent::Type event_type, String const& name) |