Kernel: Handle string format errors in FileSystem APIs :^)

This commit is contained in:
Brian Gianforcaro 2021-11-29 03:05:19 -08:00 committed by Andreas Kling
parent e626d7098d
commit fa517b213a
2 changed files with 2 additions and 2 deletions

View file

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

View file

@ -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)