From a00bea1fa1d542c3caa124436bb1ec9c1370ddee Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Mon, 20 Sep 2021 16:42:55 -0400 Subject: Replace strlcpy with snprintf This removes the last BSD-specific call. --- client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit 1.4.1