vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 2e73d13f85ef1ce823454b1b031bf8226d03d394
parent efb42f27a071c967cd66e3ca8dfc61d0e3433353
Author: Matěj Cepl <mcepl@cepl.eu>
Date:   Sun, 24 Mar 2024 23:17:52 +0100

Add parentheses around '&&' within '||'.

Silencing compiler's -Wparentheses warning.

Diffstat:
Mvis.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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; }