mirror of
https://github.com/swaywm/sway.git
synced 2025-04-03 19:07:45 +03:00
Remove usage of VLAs.
This commit is contained in:
parent
02bbefda20
commit
aa9d7d8ca1
7 changed files with 32 additions and 11 deletions
|
@ -365,11 +365,12 @@ int swaynag_load_config(char *path, struct swaynag *swaynag, list_t *types) {
|
|||
}
|
||||
free(name);
|
||||
} else {
|
||||
char flag[nread + 3];
|
||||
char *flag = malloc(sizeof(char) * (nread + 3));
|
||||
sprintf(flag, "--%s", line);
|
||||
char *argv[] = {"swaynag", flag};
|
||||
result = swaynag_parse_options(2, argv, swaynag, types, type,
|
||||
NULL, NULL);
|
||||
free(flag);
|
||||
if (result != 0) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue