mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
LibDeviceTree: Propagate try_append() errors while parsing paths
This commit is contained in:
parent
c56e1c5378
commit
f064f5f36e
1 changed files with 2 additions and 4 deletions
|
@ -113,11 +113,9 @@ static ErrorOr<ReadonlyBytes> slow_get_property_raw(StringView name, FlattenedDe
|
|||
// Name is a path like /path/to/node/property
|
||||
Vector<StringView, 16> path;
|
||||
TRY(name.for_each_split_view('/', SplitBehavior::Nothing, [&path](StringView view) -> ErrorOr<void> {
|
||||
if (path.size() == path.capacity()) {
|
||||
if (path.size() == path.capacity())
|
||||
return Error::from_errno(ENAMETOOLONG);
|
||||
}
|
||||
MUST(path.try_append(view));
|
||||
return {};
|
||||
return path.try_append(view);
|
||||
}));
|
||||
|
||||
bool check_property_name = path.size() == 1; // Properties on root node should be checked immediately
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue