From 47ab4038ecf488b03c0e92b16837ef8e062a16cc Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 22 Aug 2015 11:27:04 +0100 Subject: [PATCH] Format session socket name in place into the sockaddr_un --- src/remote.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/remote.cc b/src/remote.cc index af5c850f..850fa59b 100644 --- a/src/remote.cc +++ b/src/remote.cc @@ -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; }