Skip to content

Commit

Permalink
Add parentheses around '&&' within '||'.
Browse files Browse the repository at this point in the history
Silencing compiler's -Wparentheses warning.
  • Loading branch information
mcepl authored and rnpnr committed Mar 26, 2024
1 parent 9154424 commit 49442e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vis.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ static File *file_new(Vis *vis, const char *name) {
/* try to detect whether the same file is already open in another window */
for (File *file = vis->files; file; file = file->next) {
if (file->name) {
if (cmp_names && strcmp(file->name, name_absolute) == 0 ||
file->stat.st_dev == new.st_dev && file->stat.st_ino == new.st_ino) {
if ((cmp_names && strcmp(file->name, name_absolute) == 0) ||
(file->stat.st_dev == new.st_dev && file->stat.st_ino == new.st_ino)) {
existing = file;
break;
}
Expand Down

0 comments on commit 49442e5

Please sign in to comment.