mirror of
https://github.com/swaywm/sway.git
synced 2024-11-13 05:54:11 +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) {
|
if (!cmd) {
|
||||||
sway_log(SWAY_ERROR, "Failed to allocate spawn_swaybg command");
|
sway_log(SWAY_ERROR, "Failed to allocate spawn_swaybg command");
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user