summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2019-08-02 18:46:11 +0200
committerFurkan Sahin <furkan-dev@proton.me>2019-08-02 18:46:11 +0200
commitfdbc07c102bb4f0716fe512c6c2d4755453c94a4 (patch)
tree33540b093793b6b29be55171fefaa9a2dc9bd7f8
parent051b6626104858c4245a62d24c69187180a881e8 (diff)
Allocator sizeof operand mismatch
Result of 'calloc' is converted to a pointer of type 'char *', which is incompatible with sizeof operand type 'char **'
-rw-r--r--sway/config/output.c2
1 files changed, 1 insertions, 1 deletions
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;