mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
Kernel/Net: Don't allocate memory for adapters' names
Instead, use a FixedStringBuffer to store a string with up to 16 chars.
This commit is contained in:
@@ -14,9 +14,9 @@
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
NetworkAdapter::NetworkAdapter(NonnullOwnPtr<KString> interface_name)
|
||||
: m_name(move(interface_name))
|
||||
NetworkAdapter::NetworkAdapter(StringView interface_name)
|
||||
{
|
||||
m_name.store_characters(interface_name);
|
||||
}
|
||||
|
||||
NetworkAdapter::~NetworkAdapter() = default;
|
||||
|
||||
Reference in New Issue
Block a user