Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 2023 09:22:11 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: d6fedc3f2d37 - stable/13 - vfs: Add a parenthese to vn_lock_pair() asserts to silence gcc
Message-ID:  <202307210922.36L9MB54094471@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=d6fedc3f2d37a640fa39575a9e5e69d9840a6b68

commit d6fedc3f2d37a640fa39575a9e5e69d9840a6b68
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-07-19 13:51:07 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-07-21 09:21:38 +0000

    vfs: Add a parenthese to vn_lock_pair() asserts to silence gcc
    
    (cherry picked from commit e38c634b77dec76c03613bd84b37ae22d3bb5699)
---
 sys/kern/vfs_vnops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 628e3aecc864..8f618a9ad46d 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -3888,9 +3888,9 @@ vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1,
 {
 	int error;
 
-	MPASS((lkflags1 & LK_SHARED) != 0 ^ (lkflags1 & LK_EXCLUSIVE) != 0);
+	MPASS(((lkflags1 & LK_SHARED) != 0) ^ ((lkflags1 & LK_EXCLUSIVE) != 0));
 	MPASS((lkflags1 & ~(LK_SHARED | LK_EXCLUSIVE | LK_NODDLKTREAT)) == 0);
-	MPASS((lkflags2 & LK_SHARED) != 0 ^ (lkflags2 & LK_EXCLUSIVE) != 0);
+	MPASS(((lkflags2 & LK_SHARED) != 0) ^ ((lkflags2 & LK_EXCLUSIVE) != 0));
 	MPASS((lkflags2 & ~(LK_SHARED | LK_EXCLUSIVE | LK_NODDLKTREAT)) == 0);
 
 	if (vp1 == NULL && vp2 == NULL)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307210922.36L9MB54094471>