1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:57:35 +00:00

Kernel: Convert snprintf() => String::formatted()/number()

This commit is contained in:
Andreas Kling 2021-02-17 16:37:11 +01:00
parent 5f610417d0
commit 6c2f0316d9
3 changed files with 5 additions and 11 deletions

View file

@ -37,7 +37,7 @@ SlavePTY::SlavePTY(MasterPTY& master, unsigned index)
, m_master(master)
, m_index(index)
{
snprintf(m_tty_name, sizeof(m_tty_name), "/dev/pts/%u", m_index);
m_tty_name = String::formatted("/dev/pts/{}", m_index);
auto process = Process::current();
set_uid(process->uid());
set_gid(process->gid());

View file

@ -66,7 +66,7 @@ private:
RefPtr<MasterPTY> m_master;
time_t m_time_of_last_write { 0 };
unsigned m_index { 0 };
char m_tty_name[32];
String m_tty_name;
};
}