mirror of
https://github.com/swaywm/sway.git
synced 2024-11-10 20:44:01 +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
@ -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 New Issue
Block a user