mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibDeviceTree: Use unchecked_append() in path parsing
try_append() checks if the vector should increase capacity and if so grows the vector. unchecked_append() verifies the vector already has enough capacity, and will never grow the vector.
This commit is contained in:
parent
69f0339bac
commit
f8bdb584f8
Notes:
sideshowbarker
2024-07-17 00:27:16 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/f8bdb584f8 Pull-request: https://github.com/SerenityOS/serenity/pull/17607
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ static ErrorOr<ReadonlyBytes> slow_get_property_raw(StringView name, FlattenedDe
|
|||
return Error::from_errno(ENAMETOOLONG);
|
||||
}
|
||||
// This can never fail as all entries go into the inline buffer, enforced by the check above.
|
||||
MUST(path.try_append(view));
|
||||
path.unchecked_append(view);
|
||||
return {};
|
||||
}));
|
||||
|
||||
|
|
Loading…
Reference in a new issue