about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-09-20 16:42:55 -0400
committerJune McEnroe <june@causal.agency>2021-09-20 16:42:55 -0400
commita00bea1fa1d542c3caa124436bb1ec9c1370ddee (patch)
tree531ed6e1b94637ac3c1b813a26dea8f3e8e1a404
parentReplace kqueue with poll, remove libutil dependency (diff)
downloadtorus-a00bea1fa1d542c3caa124436bb1ec9c1370ddee.tar.gz
torus-a00bea1fa1d542c3caa124436bb1ec9c1370ddee.zip
Replace strlcpy with snprintf
This removes the last BSD-specific call.
Diffstat (limited to '')
-rw-r--r--client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client.c b/client.c
index 431f425..bb2ee1b 100644
--- a/client.c
+++ b/client.c
@@ -702,7 +702,7 @@ int main(int argc, char *argv[]) {
 	if (client < 0) err(EX_OSERR, "socket");
 
 	struct sockaddr_un addr = { .sun_family = AF_LOCAL };
-	strlcpy(addr.sun_path, sockPath, sizeof(addr.sun_path));
+	snprintf(addr.sun_path, sizeof(addr.sun_path), "%s", sockPath);
 	int error = connect(client, (struct sockaddr *)&addr, SUN_LEN(&addr));
 	if (error) err(EX_NOINPUT, "%s", sockPath);