diff --git a/repos/ports/src/virtualbox5/network.cpp b/repos/ports/src/virtualbox5/network.cpp index 8bed758258..7caad193f0 100644 --- a/repos/ports/src/virtualbox5/network.cpp +++ b/repos/ports/src/virtualbox5/network.cpp @@ -39,7 +39,6 @@ #include #include -#include #include @@ -187,7 +186,8 @@ class Nic_client public: - Nic_client(Genode::Env &env, PDRVNIC drvtap, char const *label) + Nic_client(Genode::Env &env, PDRVNIC drvtap, + Genode::Session::Label const &label) : _tx_block_alloc(_packet_allocator()), _nic(env, _tx_block_alloc, BUF_SIZE, BUF_SIZE, label), @@ -540,19 +540,17 @@ static DECLCALLBACK(int) drvNicConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uin N_("Configuration error: the above device/driver" " didn't export the network config interface!\n")); - char label[8]; uint64_t slot; rc = CFGMR3QueryInteger(pCfg, "Slot", &slot); if (RT_FAILURE(rc)) return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Configuration error: Failed to retrieve the network interface slot")); - Genode::snprintf(label, sizeof(label), "%d", slot); /* * Setup Genode nic_session connection */ try { - pThis->nic_client = new (vmm_heap()) Nic_client(genode_env(), pThis, label); + pThis->nic_client = new (vmm_heap()) Nic_client(genode_env(), pThis, slot); } catch (...) { return VERR_HOSTIF_INIT_FAILED; } diff --git a/repos/ports/src/virtualbox5/thread.cc b/repos/ports/src/virtualbox5/thread.cc index 55f06fd452..19bd89de65 100644 --- a/repos/ports/src/virtualbox5/thread.cc +++ b/repos/ports/src/virtualbox5/thread.cc @@ -70,13 +70,9 @@ static Genode::Cpu_connection * cpu_connection(RTTHREADTYPE type) if (con[type - 1]) return con[type - 1]; - char * data = new (vmm_heap()) char[16]; - - Genode::snprintf(data, 16, "vbox %u", type); - - con[type - 1] = new (vmm_heap()) Cpu_connection(genode_env(), data, + con[type - 1] = new (vmm_heap()) Cpu_connection(genode_env(), + { "vbox ", unsigned(type) }, prio_class(type)); - return con[type - 1]; }