mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
Remove usage of VLAs.
This commit is contained in:
parent
02bbefda20
commit
aa9d7d8ca1
7 changed files with 32 additions and 11 deletions
|
|
@ -13,9 +13,10 @@
|
|||
void ipc_send_workspace_command(struct swaybar *bar, const char *ws) {
|
||||
const char *fmt = "workspace \"%s\"";
|
||||
uint32_t size = snprintf(NULL, 0, fmt, ws);
|
||||
char command[size];
|
||||
char *command = malloc(sizeof(char) * size);
|
||||
snprintf(command, size, fmt, ws);
|
||||
ipc_single_command(bar->ipc_socketfd, IPC_COMMAND, command, &size);
|
||||
free(command);
|
||||
}
|
||||
|
||||
char *parse_font(const char *font) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue