Skip to content

Commit

Permalink
cmd_bar: Simplify bar-id condition
Browse files Browse the repository at this point in the history
  • Loading branch information
RedSoxFan committed Oct 13, 2018
1 parent f64b22f commit e246a78
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sway/commands/bar.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ struct cmd_results *cmd_bar(int argc, char **argv) {

bool spawn = false;
struct bar_config *bar = NULL;
if (!is_subcommand(argv[0]) ||
(strcmp(argv[0], "id") != 0 && is_subcommand(argv[1]))) {
if (strcmp(argv[0], "id") != 0 && is_subcommand(argv[1])) {
for (int i = 0; i < config->bars->length; ++i) {
struct bar_config *item = config->bars->items[i];
if (strcmp(item->id, argv[0]) == 0) {
Expand Down

0 comments on commit e246a78

Please sign in to comment.