mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 09:04:30 +00:00
Add a String::format() and use that in place of ksprintf() in the Kernel.
You're never gonna be right 100% of the time when guessing how much buffer space you need. This avoids having to make that type of decision in a bunch of cases. :^)
This commit is contained in:
@@ -14,9 +14,7 @@ MasterPTY::~MasterPTY()
|
||||
|
||||
String MasterPTY::pts_name() const
|
||||
{
|
||||
char buffer[32];
|
||||
ksprintf(buffer, "/dev/pts/%u", m_index);
|
||||
return buffer;
|
||||
return String::format("/dev/pts/%u", m_index);
|
||||
}
|
||||
|
||||
ssize_t MasterPTY::read(Process&, byte* buffer, size_t size)
|
||||
|
||||
Reference in New Issue
Block a user