From 49442e5178296a58f8ca2e267a93b89c5cca8e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Sun, 24 Mar 2024 23:17:52 +0100 Subject: Add parentheses around '&&' within '||'. Silencing compiler's -Wparentheses warning. --- vis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vis.c b/vis.c index a26bccb..8d68907 100644 --- a/vis.c +++ b/vis.c @@ -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; } -- cgit v1.2.3