1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-01 16:32:54 +03:00

Format session socket name in place into the sockaddr_un

This commit is contained in:
Maxime Coste 2015-08-22 11:27:04 +01:00
parent 564ab7d942
commit 47ab4038ec

View File

@ -432,8 +432,7 @@ static sockaddr_un session_addr(StringView session)
{
sockaddr_un addr;
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, format("/tmp/kak-{}", session).c_str(),
sizeof(addr.sun_path) - 1);
format_to(addr.sun_path, "/tmp/kak-{}", session);
return addr;
}