aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/assign.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-04-24 20:07:09 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-04-24 20:08:32 +1000
commit689a6a5605fb52f40b2c13f7565e19334fd09842 (patch)
tree10710cc575f77e3131e90c93483832468ab27a03 /sway/commands/assign.c
parentAdd assert to view_execute_criteria() (diff)
downloadsway-689a6a5605fb52f40b2c13f7565e19334fd09842.tar.gz
sway-689a6a5605fb52f40b2c13f7565e19334fd09842.tar.zst
sway-689a6a5605fb52f40b2c13f7565e19334fd09842.zip
Use size_t instead of int and calloc instead of malloc
Diffstat (limited to 'sway/commands/assign.c')
-rw-r--r--sway/commands/assign.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/assign.c b/sway/commands/assign.c
index bf0b1f63..eb7329aa 100644
--- a/sway/commands/assign.c
+++ b/sway/commands/assign.c
@@ -22,7 +22,7 @@ struct cmd_results *cmd_assign(int argc, char **argv) {
22 } 22 }
23 23
24 char *movecmd = "move container to workspace "; 24 char *movecmd = "move container to workspace ";
25 int arglen = strlen(movecmd) + strlen(*argv) + 1; 25 size_t arglen = strlen(movecmd) + strlen(*argv) + 1;
26 char *cmdlist = calloc(1, arglen); 26 char *cmdlist = calloc(1, arglen);
27 if (!cmdlist) { 27 if (!cmdlist) {
28 return cmd_results_new(CMD_FAILURE, "assign", "Unable to allocate command list"); 28 return cmd_results_new(CMD_FAILURE, "assign", "Unable to allocate command list");