mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-26 19:22:30 -05:00
Kernel: Use move to avoid unnecessary ref/unref of network device RefPtr
Flagged by pvs-studio as a potential perf optimization.
This commit is contained in:
parent
24207d3795
commit
4fe99ff0d6
Notes:
sideshowbarker
2024-07-18 03:51:39 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/4fe99ff0d6c Pull-request: https://github.com/SerenityOS/serenity/pull/10053
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ KResult Socket::setsockopt(int level, int option, Userspace<const void*> user_va
|
|||
auto device = NetworkingManagement::the().lookup_by_name(ifname->view());
|
||||
if (!device)
|
||||
return ENODEV;
|
||||
m_bound_interface = device;
|
||||
m_bound_interface = move(device);
|
||||
return KSuccess;
|
||||
}
|
||||
case SO_KEEPALIVE:
|
||||
|
|
Loading…
Add table
Reference in a new issue