git: 84a0be4a239b - main - vfs: plug a dead store in kern_linkat_vp
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 16 Aug 2022 10:46:37 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=84a0be4a239bc3ed08a3cb5a74b1d768d705b8d7 commit 84a0be4a239bc3ed08a3cb5a74b1d768d705b8d7 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2022-08-16 10:45:48 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2022-08-16 10:46:29 +0000 vfs: plug a dead store in kern_linkat_vp Reported by: clang --analyze --- sys/kern/vfs_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index ba62fdb7e81e..c40d1092574e 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1643,7 +1643,7 @@ kern_linkat_vp(struct thread *td, struct vnode *vp, int fd, const char *path, vput(nd.ni_dvp); vrele(vp); return (EXDEV); - } else if ((error = vn_lock(vp, LK_EXCLUSIVE)) == 0) { + } else if (vn_lock(vp, LK_EXCLUSIVE) == 0) { error = can_hardlink(vp, td->td_ucred); #ifdef MAC if (error == 0)