Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 May 2019 08:59:22 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 238167] fs/nfsclient/nfs_clvnops.c: suspicious "if" statement
Message-ID:  <bug-238167-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238167

            Bug ID: 238167
           Summary: fs/nfsclient/nfs_clvnops.c: suspicious "if" statement
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: danfe@FreeBSD.org

PVS Studio reports: /usr/src/sys/fs/nfsclient/nfs_clvnops.c:2946:1: error: =
V523
The 'then' statement is equivalent to the 'else' statement.

The code indeed looks suspicious (shown with "svn blame"):

> 191783   rmacklem               BO_UNLOCK(bo);
> 191783   rmacklem               bremfree(bp);
> 191783   rmacklem               if (passone || !commit)
> 191783   rmacklem                   bp->b_flags |=3D B_ASYNC;
> 191783   rmacklem               else
> 191783   rmacklem                   bp->b_flags |=3D B_ASYNC;
> 191783   rmacklem               bwrite(bp);

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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