mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Use Vector::try_append in Custody::try_serialize_absolute_path
This commit is contained in:
parent
194d1c884b
commit
6be2a51b10
Notes:
sideshowbarker
2024-07-17 21:04:03 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/6be2a51b10d Pull-request: https://github.com/SerenityOS/serenity/pull/11817 Reviewed-by: https://github.com/bgianfo ✅
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ ErrorOr<NonnullOwnPtr<KString>> Custody::try_serialize_absolute_path() const
|
|||
Vector<Custody const*, 32> custody_chain;
|
||||
size_t path_length = 0;
|
||||
for (auto const* custody = this; custody; custody = custody->parent()) {
|
||||
custody_chain.append(custody);
|
||||
TRY(custody_chain.try_append(custody));
|
||||
path_length += custody->m_name->length() + 1;
|
||||
}
|
||||
VERIFY(path_length > 0);
|
||||
|
|
Loading…
Reference in a new issue