aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-03-24 23:17:52 +0100
committerRandy Palamar <randy@rnpnr.xyz>2024-03-25 21:00:13 -0600
commit49442e5178296a58f8ca2e267a93b89c5cca8e5b (patch)
treeb81a9498b16b37524b3c8784aeeaafaa5afeb008
parent915442440ae8227f7e6fe6fa795cba3be36928e8 (diff)
downloadvis-49442e5178296a58f8ca2e267a93b89c5cca8e5b.tar.gz
vis-49442e5178296a58f8ca2e267a93b89c5cca8e5b.tar.xz
Add parentheses around '&&' within '||'.
Silencing compiler's -Wparentheses warning.
-rw-r--r--vis.c4
1 files 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;
}