From 7e5c2d7afa791d2a95acf53215a30fbbc20c2c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Fri, 2 Aug 2019 18:46:11 +0200 Subject: Allocator sizeof operand mismatch Result of 'calloc' is converted to a pointer of type 'char *', which is incompatible with sizeof operand type 'char **' --- sway/config/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/config/output.c b/sway/config/output.c index be3013a3..c41670d5 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -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; -- cgit v1.2.3