summaryrefslogtreecommitdiffstats
path: root/sway/config
diff options
context:
space:
mode:
authorLibravatar Geoff Greer <geoff@greer.fm>2018-04-26 18:16:29 -0700
committerLibravatar Geoff Greer <geoff@greer.fm>2018-04-26 18:16:29 -0700
commit5587af1782539e2ea2c762597054a066bc0eeee7 (patch)
tree80e0130a14cca3499fa72c399b3c2825df900e62 /sway/config
parentinvoke_swaybar(): Set process group. Kill process group. (diff)
downloadsway-5587af1782539e2ea2c762597054a066bc0eeee7.tar.gz
sway-5587af1782539e2ea2c762597054a066bc0eeee7.tar.zst
sway-5587af1782539e2ea2c762597054a066bc0eeee7.zip
Rename len to msg_len. Avoids an aliased variable that was a little confusing to follow.
Diffstat (limited to 'sway/config')
-rw-r--r--sway/config/bar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/config/bar.c b/sway/config/bar.c
index cb9e82f8..5a97c3cc 100644
--- a/sway/config/bar.c
+++ b/sway/config/bar.c
@@ -173,9 +173,9 @@ void invoke_swaybar(struct bar_config *bar) {
173 char *command = malloc(len + 1); 173 char *command = malloc(len + 1);
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 len = sizeof(msg); 176 size_t msg_len = sizeof(msg);
177 if (write(filedes[1], &len, sizeof(int))) {}; 177 if (write(filedes[1], &msg_len, sizeof(int))) {};
178 if (write(filedes[1], msg, len)) {}; 178 if (write(filedes[1], msg, msg_len)) {};
179 close(filedes[1]); 179 close(filedes[1]);
180 exit(1); 180 exit(1);
181 } 181 }