summaryrefslogtreecommitdiff
path: root/sway/ipc-server.c
diff options
context:
space:
mode:
authoremersion <[email protected]>2018-04-15 07:42:38 +0200
committerGitHub <[email protected]>2018-04-15 07:42:38 +0200
commit3ea2a9a85e7db6e9858ccf68a67b312cd6db36c5 (patch)
tree9d81001776f4e095de76a63d540ab1ab0ca45caf /sway/ipc-server.c
parentdcecfe6a996c89988f7639493395ebe224f8d9a8 (diff)
parent0feb25e0283657087dd73a06c1b5ae891e0896b3 (diff)
Merge pull request #1811 from martinetd/gcc_warnings
Fix gcc warnings
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r--sway/ipc-server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index 045802e1..39d1d0a7 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -64,7 +64,7 @@ void ipc_init(struct sway_server *server) {
// We want to use socket name set by user, not existing socket from another sway instance.
if (getenv("SWAYSOCK") != NULL && access(getenv("SWAYSOCK"), F_OK) == -1) {
- strncpy(ipc_sockaddr->sun_path, getenv("SWAYSOCK"), sizeof(ipc_sockaddr->sun_path));
+ strncpy(ipc_sockaddr->sun_path, getenv("SWAYSOCK"), sizeof(ipc_sockaddr->sun_path) - 1);
ipc_sockaddr->sun_path[sizeof(ipc_sockaddr->sun_path) - 1] = 0;
}