diff options
-rw-r--r-- | sway/config/bar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/config/bar.c b/sway/config/bar.c index 5a97c3cc..e790c911 100644 --- a/sway/config/bar.c +++ b/sway/config/bar.c | |||
@@ -174,7 +174,7 @@ void invoke_swaybar(struct bar_config *bar) { | |||
174 | if (!command) { | 174 | if (!command) { |
175 | const char msg[] = "Unable to allocate swaybar command string"; | 175 | const char msg[] = "Unable to allocate swaybar command string"; |
176 | size_t msg_len = sizeof(msg); | 176 | size_t msg_len = sizeof(msg); |
177 | if (write(filedes[1], &msg_len, sizeof(int))) {}; | 177 | if (write(filedes[1], &msg_len, sizeof(size_t))) {}; |
178 | if (write(filedes[1], msg, msg_len)) {}; | 178 | if (write(filedes[1], msg, msg_len)) {}; |
179 | close(filedes[1]); | 179 | close(filedes[1]); |
180 | exit(1); | 180 | exit(1); |
@@ -189,8 +189,8 @@ void invoke_swaybar(struct bar_config *bar) { | |||
189 | } | 189 | } |
190 | wlr_log(L_DEBUG, "Spawned swaybar %d", bar->pid); | 190 | wlr_log(L_DEBUG, "Spawned swaybar %d", bar->pid); |
191 | close(filedes[0]); | 191 | close(filedes[0]); |
192 | ssize_t len; | 192 | size_t len; |
193 | if (read(filedes[1], &len, sizeof(int)) == sizeof(int)) { | 193 | if (read(filedes[1], &len, sizeof(size_t)) == sizeof(size_t)) { |
194 | char *buf = malloc(len); | 194 | char *buf = malloc(len); |
195 | if(!buf) { | 195 | if(!buf) { |
196 | wlr_log(L_ERROR, "Cannot allocate error string"); | 196 | wlr_log(L_ERROR, "Cannot allocate error string"); |