diff options
author | Antonin Décimo <antonin.decimo@gmail.com> | 2019-08-02 18:46:11 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-08-02 20:55:49 +0300 |
commit | 7e5c2d7afa791d2a95acf53215a30fbbc20c2c4f (patch) | |
tree | 33540b093793b6b29be55171fefaa9a2dc9bd7f8 | |
parent | Add support for wlr_output's atomic API (diff) | |
download | sway-7e5c2d7afa791d2a95acf53215a30fbbc20c2c4f.tar.gz sway-7e5c2d7afa791d2a95acf53215a30fbbc20c2c4f.tar.zst sway-7e5c2d7afa791d2a95acf53215a30fbbc20c2c4f.zip |
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.c | 2 |
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) { | |||
568 | } | 568 | } |
569 | } | 569 | } |
570 | 570 | ||
571 | char **cmd = calloc(1, sizeof(char **) * length); | 571 | char **cmd = calloc(length, sizeof(char *)); |
572 | if (!cmd) { | 572 | if (!cmd) { |
573 | sway_log(SWAY_ERROR, "Failed to allocate spawn_swaybg command"); | 573 | sway_log(SWAY_ERROR, "Failed to allocate spawn_swaybg command"); |
574 | return false; | 574 | return false; |