commit 7ead20bfcfbc3785d471944f4631b0144fdedeba
parent aad2f444f0bfc1cd7057bf55c9249dc36680af15
Author: sghctoma <sghctoma@gmail.com>
Date: Thu, 8 Nov 2018 13:57:04 +0100
Fix building with clang
The "struct sway_container *other" variable in swap.c was potentially
used uninitialized, depending on an "if" statement.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sway/commands/swap.c b/sway/commands/swap.c
@@ -181,7 +181,7 @@ struct cmd_results *cmd_swap(int argc, char **argv) {
}
struct sway_container *current = config->handler_context.container;
- struct sway_container *other;
+ struct sway_container *other = NULL;
char *value = join_args(argv + 3, argc - 3);
if (strcasecmp(argv[2], "id") == 0) {