From 689a6a5605fb52f40b2c13f7565e19334fd09842 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 24 Apr 2018 20:07:09 +1000 Subject: Use size_t instead of int and calloc instead of malloc --- sway/commands/for_window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/commands/for_window.c') diff --git a/sway/commands/for_window.c b/sway/commands/for_window.c index a6aa7187..dd5461f0 100644 --- a/sway/commands/for_window.c +++ b/sway/commands/for_window.c @@ -14,7 +14,7 @@ struct cmd_results *cmd_for_window(int argc, char **argv) { // add command to a criteria/command pair that is run against views when they appear. char *criteria = argv[0], *cmdlist = join_args(argv + 1, argc - 1); - struct criteria *crit = malloc(sizeof(struct criteria)); + struct criteria *crit = calloc(sizeof(struct criteria), 1); if (!crit) { return cmd_results_new(CMD_FAILURE, "for_window", "Unable to allocate criteria"); } -- cgit v1.2.3