mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00
Kernel: Make PerformanceEventBuffer::to_json() return a KResult
There's a ton of things inside to_json() that could go wrong but we don't know about it yet. One step at a time.
This commit is contained in:
parent
6f992d784f
commit
905065f8c8
5 changed files with 8 additions and 12 deletions
|
@ -721,11 +721,7 @@ private:
|
|||
{
|
||||
if (!g_global_perf_events)
|
||||
return ENOENT;
|
||||
|
||||
// FIXME: to_json() should return a better error.
|
||||
if (!g_global_perf_events->to_json(builder))
|
||||
return ENOMEM;
|
||||
|
||||
TRY(g_global_perf_events->to_json(builder));
|
||||
return KSuccess;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue