1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:58:13 +00:00

Kernel: Remove useless return value from procfs_get_thread_stack

This commit is contained in:
Idan Horowitz 2022-01-16 00:04:24 +02:00
parent 4869dda79f
commit d3e7ec5a56
2 changed files with 4 additions and 5 deletions

View file

@ -19,12 +19,12 @@
namespace Kernel {
ErrorOr<size_t> Process::procfs_get_thread_stack(ThreadID thread_id, KBufferBuilder& builder) const
ErrorOr<void> Process::procfs_get_thread_stack(ThreadID thread_id, KBufferBuilder& builder) const
{
JsonArraySerializer array { builder };
auto thread = Thread::from_tid(thread_id);
if (!thread)
return Error::from_errno(ESRCH);
return ESRCH;
bool show_kernel_addresses = Process::current().is_superuser();
bool kernel_address_added = false;
for (auto address : Processor::capture_stack_trace(*thread, 1024)) {
@ -38,8 +38,7 @@ ErrorOr<size_t> Process::procfs_get_thread_stack(ThreadID thread_id, KBufferBuil
}
array.finish();
// FIXME: This return value seems useless.
return 0;
return {};
}
ErrorOr<void> Process::traverse_stacks_directory(FileSystemID fsid, Function<ErrorOr<void>(FileSystem::DirectoryEntryView const&)> callback) const