From 813e1209795f7016fd1223c5ce96b2185eed5a9a Mon Sep 17 00:00:00 2001 From: Antonin Décimo Date: Sat, 10 Aug 2019 17:03:20 +0200 Subject: Remove redundant checks --- sway/commands/border.c | 2 +- sway/commands/fullscreen.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sway/commands') diff --git a/sway/commands/border.c b/sway/commands/border.c index 6be5b794..647663ac 100644 --- a/sway/commands/border.c +++ b/sway/commands/border.c @@ -75,7 +75,7 @@ struct cmd_results *cmd_border(int argc, char **argv) { } else if (strcmp(argv[0], "pixel") == 0) { set_border(container, B_PIXEL); } else if (strcmp(argv[0], "csd") == 0) { - if (!view || !view->xdg_decoration) { + if (!view->xdg_decoration) { return cmd_results_new(CMD_INVALID, "This window doesn't support client side decorations"); } diff --git a/sway/commands/fullscreen.c b/sway/commands/fullscreen.c index 0d7ba112..3392a7f7 100644 --- a/sway/commands/fullscreen.c +++ b/sway/commands/fullscreen.c @@ -35,7 +35,7 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) { bool is_fullscreen = false; for (struct sway_container *curr = container; curr; curr = curr->parent) { - if (curr && curr->fullscreen_mode != FULLSCREEN_NONE) { + if (curr->fullscreen_mode != FULLSCREEN_NONE) { container = curr; is_fullscreen = true; break; -- cgit v1.2.3