mirror of
https://github.com/NickHu/sway
synced 2024-12-28 22:23:30 +01:00
Allocator sizeof operand mismatch
Result of 'calloc' is converted to a pointer of type 'char *', which is incompatible with sizeof operand type 'char **'
This commit is contained in:
parent
6e0565e9de
commit
7e5c2d7afa
1 changed files with 1 additions and 1 deletions
|
@ -568,7 +568,7 @@ bool spawn_swaybg(void) {
|
|||
}
|
||||
}
|
||||
|
||||
char **cmd = calloc(1, sizeof(char **) * length);
|
||||
char **cmd = calloc(length, sizeof(char *));
|
||||
if (!cmd) {
|
||||
sway_log(SWAY_ERROR, "Failed to allocate spawn_swaybg command");
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue