diff options
Diffstat (limited to 'wayland/buffers.c')
-rw-r--r-- | wayland/buffers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wayland/buffers.c b/wayland/buffers.c index 1e5e5693..ba783b37 100644 --- a/wayland/buffers.c +++ b/wayland/buffers.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include "log.h" | 12 | #include "log.h" |
13 | 13 | ||
14 | static int create_pool_file(size_t size, char **name) { | 14 | static int create_pool_file(size_t size, char **name) { |
15 | static const char template[] = "/sway-client-XXXXXX"; | 15 | static const char template[] = "sway-client-XXXXXX"; |
16 | const char *path = getenv("XDG_RUNTIME_DIR"); | 16 | const char *path = getenv("XDG_RUNTIME_DIR"); |
17 | if (!path) { | 17 | if (!path) { |
18 | return -1; | 18 | return -1; |
@@ -23,7 +23,7 @@ static int create_pool_file(size_t size, char **name) { | |||
23 | *name = malloc( | 23 | *name = malloc( |
24 | strlen(template) + | 24 | strlen(template) + |
25 | strlen(path) + | 25 | strlen(path) + |
26 | (ts ? 1 : 0) + 1); | 26 | (ts ? 0 : 1) + 1); |
27 | sprintf(*name, "%s%s%s", path, ts ? "" : "/", template); | 27 | sprintf(*name, "%s%s%s", path, ts ? "" : "/", template); |
28 | 28 | ||
29 | int fd = mkstemp(*name); | 29 | int fd = mkstemp(*name); |