mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 11:34:59 +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:
parent
b2fd51f561
commit
3f63be949a
14 changed files with 40 additions and 40 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue