mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
Rename len to msg_len. Avoids an aliased variable that was a little confusing to follow.
This commit is contained in:
parent
b9726afd48
commit
5587af1782
1 changed files with 3 additions and 3 deletions
|
@ -173,9 +173,9 @@ void invoke_swaybar(struct bar_config *bar) {
|
|||
char *command = malloc(len + 1);
|
||||
if (!command) {
|
||||
const char msg[] = "Unable to allocate swaybar command string";
|
||||
size_t len = sizeof(msg);
|
||||
if (write(filedes[1], &len, sizeof(int))) {};
|
||||
if (write(filedes[1], msg, len)) {};
|
||||
size_t msg_len = sizeof(msg);
|
||||
if (write(filedes[1], &msg_len, sizeof(int))) {};
|
||||
if (write(filedes[1], msg, msg_len)) {};
|
||||
close(filedes[1]);
|
||||
exit(1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue